CorbaMessageMediator.java revision 608:7e06bf1dcb09
1/* 2 * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26package com.sun.corba.se.spi.protocol; 27 28import java.nio.ByteBuffer; 29 30import org.omg.CORBA.INTERNAL; 31import org.omg.CORBA.SystemException; 32import org.omg.CORBA.portable.ResponseHandler; 33import org.omg.CORBA.portable.UnknownException; 34import org.omg.CORBA_2_3.portable.InputStream; 35import org.omg.CORBA_2_3.portable.OutputStream; 36 37import com.sun.corba.se.pept.broker.Broker; 38import com.sun.corba.se.pept.protocol.MessageMediator; 39import com.sun.corba.se.pept.encoding.InputObject; 40import com.sun.corba.se.pept.encoding.OutputObject; 41import com.sun.corba.se.pept.protocol.ProtocolHandler; 42import com.sun.corba.se.pept.transport.Connection; 43 44import com.sun.corba.se.spi.ior.IOR; 45import com.sun.corba.se.spi.ior.ObjectKey; 46import com.sun.corba.se.spi.ior.iiop.GIOPVersion; 47import com.sun.corba.se.spi.protocol.CorbaProtocolHandler; 48import com.sun.corba.se.spi.servicecontext.ServiceContexts; 49 50import com.sun.corba.se.impl.protocol.giopmsgheaders.LocateReplyMessage; 51import com.sun.corba.se.impl.protocol.giopmsgheaders.LocateReplyOrReplyMessage; 52import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; 53import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase; 54import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageHandler; 55import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage; 56import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_0; 57import com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage; 58import com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_0; 59 60/** 61 * @author Harold Carr 62 */ 63public interface CorbaMessageMediator 64 extends 65 MessageMediator, 66 ResponseHandler 67{ 68 public void setReplyHeader(LocateReplyOrReplyMessage header); 69 public LocateReplyMessage getLocateReplyHeader(); 70 public ReplyMessage getReplyHeader(); 71 public void setReplyExceptionDetailMessage(String message); 72 public RequestMessage getRequestHeader(); 73 public GIOPVersion getGIOPVersion(); 74 public byte getEncodingVersion(); 75 public int getRequestId(); 76 public Integer getRequestIdInteger(); 77 public boolean isOneWay(); 78 public short getAddrDisposition(); 79 public String getOperationName(); 80 public ServiceContexts getRequestServiceContexts(); 81 public ServiceContexts getReplyServiceContexts(); 82 public Message getDispatchHeader(); 83 public void setDispatchHeader(Message msg); 84 public ByteBuffer getDispatchBuffer(); 85 public void setDispatchBuffer(ByteBuffer byteBuffer); 86 public int getThreadPoolToUse(); 87 public byte getStreamFormatVersion(); // REVIST name ForRequest? 88 public byte getStreamFormatVersionForReply(); 89 90 // REVISIT - not sure if the final fragment and DII stuff should 91 // go here. 92 93 public void sendCancelRequestIfFinalFragmentNotSent(); 94 95 public void setDIIInfo(org.omg.CORBA.Request request); 96 public boolean isDIIRequest(); 97 public Exception unmarshalDIIUserException(String repoId, 98 InputStream inputStream); 99 public void setDIIException(Exception exception); 100 public void handleDIIReply(InputStream inputStream); 101 102 103 public boolean isSystemExceptionReply(); 104 public boolean isUserExceptionReply(); 105 public boolean isLocationForwardReply(); 106 public boolean isDifferentAddrDispositionRequestedReply(); 107 public short getAddrDispositionReply(); 108 public IOR getForwardedIOR(); 109 public SystemException getSystemExceptionReply(); 110 111 //////////////////////////////////////////////////// 112 // 113 // Server side 114 // 115 116 public ObjectKey getObjectKey(); 117 public void setProtocolHandler(CorbaProtocolHandler protocolHandler); 118 public CorbaProtocolHandler getProtocolHandler(); 119 120 //////////////////////////////////////////////////// 121 // 122 // ResponseHandler 123 // 124 125 public org.omg.CORBA.portable.OutputStream createReply(); 126 public org.omg.CORBA.portable.OutputStream createExceptionReply(); 127 128 //////////////////////////////////////////////////// 129 // 130 // from core.ServerRequest 131 // 132 133 public boolean executeReturnServantInResponseConstructor(); 134 135 public void setExecuteReturnServantInResponseConstructor(boolean b); 136 137 public boolean executeRemoveThreadInfoInResponseConstructor(); 138 139 public void setExecuteRemoveThreadInfoInResponseConstructor(boolean b); 140 141 public boolean executePIInResponseConstructor(); 142 143 public void setExecutePIInResponseConstructor( boolean b ); 144} 145 146// End of file. 147