Package com.sun.corba.se.impl.protocol
Class CorbaServerRequestDispatcherImpl
java.lang.Object
com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl
- All Implemented Interfaces:
ServerRequestDispatcher,CorbaServerRequestDispatcher
public class CorbaServerRequestDispatcherImpl
extends Object
implements CorbaServerRequestDispatcher
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckServerId(ObjectKey okey) protected voidvoiddispatch(MessageMediator messageMediator) This method coordinates the processing of a message received on the server side.protected CorbaMessageMediatordispatchToServant(Object servant, CorbaMessageMediator req, byte[] objectId, ObjectAdapter objectAdapter) protected voidprotected ObjectgetServantWithPI(CorbaMessageMediator request, ObjectAdapter objectAdapter, byte[] objectId, ObjectKeyTemplate oktemp, String operation) protected CorbaMessageMediatorprotected voidhandleNullServant(String operation, NullServant nserv) Always throws OBJECT_NOT_EXIST if operation is not a special method.XXX/REVISIT: We do not want to look for a servant in the POA/ServantManager case, but we could in most other cases.protected StringopAndId(CorbaMessageMediator mediator) protected booleanprocessCodeSetContext(CorbaMessageMediator request, ServiceContexts contexts) Handles setting the connection's code sets if required.protected CorbaMessageMediatorprotected CorbaMessageMediatorsendingReply(CorbaMessageMediator req, Any excany) Must always be called, just after the servant's method returns.
-
Field Details
-
orb
-
-
Constructor Details
-
CorbaServerRequestDispatcherImpl
-
-
Method Details
-
locate
XXX/REVISIT: We do not want to look for a servant in the POA/ServantManager case, but we could in most other cases. The OA could have a method that returns true if the servant MAY exist, and false only if the servant definitely DOES NOT exist. XXX/REVISIT: We may wish to indicate OBJECT_HERE by some mechanism other than returning a null result. Called from ORB.locate when a LocateRequest arrives. Result is not always absolutely correct: may indicate OBJECT_HERE for non-existent objects, which is resolved on invocation. This "bug" is unavoidable, since in general the object may be destroyed between a locate and a request. Note that this only checks that the appropriate ObjectAdapter is available, not that the servant actually exists. Need to signal one of OBJECT_HERE, OBJECT_FORWARD, OBJECT_NOT_EXIST.- Specified by:
locatein interfaceCorbaServerRequestDispatcher- Returns:
- Result is null if object is (possibly) implemented here, otherwise an IOR indicating objref to forward the request to.
- Throws:
OBJECT_NOT_EXIST- is thrown if we know the object does not exist here, and we are not forwarding.
-
dispatch
Description copied from interface:ServerRequestDispatcherThis method coordinates the processing of a message received on the server side. For example, this may involve finding an "object adapter" which would return Ties/Servants to handle the request.- Specified by:
dispatchin interfaceServerRequestDispatcher
-
getServantWithPI
protected Object getServantWithPI(CorbaMessageMediator request, ObjectAdapter objectAdapter, byte[] objectId, ObjectKeyTemplate oktemp, String operation) throws OADestroyed - Throws:
OADestroyed
-
checkServerId
-
handleNullServant
Always throws OBJECT_NOT_EXIST if operation is not a special method. If operation is _non_existent or _not_existent, this will just return without performing any action, so that _non_existent can return false. Always throws OBJECT_NOT_EXIST for any other special method. Update for issue 4385. -
consumeServiceContexts
-
dispatchToServant
protected CorbaMessageMediator dispatchToServant(Object servant, CorbaMessageMediator req, byte[] objectId, ObjectAdapter objectAdapter) -
handleDynamicResult
protected CorbaMessageMediator handleDynamicResult(ServerRequestImpl sreq, CorbaMessageMediator req) -
sendingReply
-
sendingReply
Must always be called, just after the servant's method returns. Creates the ReplyMessage header and puts in the transaction context if necessary. -
processCodeSetContext
Handles setting the connection's code sets if required. Returns true if the CodeSetContext was in the request, false otherwise. -
dprint
-
opAndId
-