Package com.sun.corba.ee.impl.protocol
Class ServerRequestDispatcherImpl
java.lang.Object
com.sun.corba.ee.impl.protocol.ServerRequestDispatcherImpl
- All Implemented Interfaces:
ServerRequestDispatcher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ORBprivate static final POASystemExceptionprivate static final ORBUtilSystemException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckServerId(ObjectKey okey) private voidprotected voidconsumeServiceContexts(MessageMediator request) voiddispatch(MessageMediator request) protected MessageMediatordispatchToServant(Object servant, MessageMediator req, byte[] objectId, ObjectAdapter objectAdapter) private voidexceptionMessage(String msg, Throwable thr) private ObjectAdapterfindObjectAdapter(ObjectKeyTemplate oktemp) private voidgeneralMessage(String msg) private ObjectgetServant(ObjectAdapter objectAdapter, byte[] objectId, String operation) protected ObjectgetServantWithPI(MessageMediator request, ObjectAdapter objectAdapter, byte[] objectId, ObjectKeyTemplate oktemp, String operation) protected MessageMediatorhandleDynamicResult(ServerRequestImpl sreq, MessageMediator req) protected voidhandleNullServant(String operation, NullServant nserv) Always throws OBJECT_NOT_EXIST if operation is not a special method.Called from ORB.locate when a LocateRequest arrives.private voidobjectInfo(String msg, Object obj) private voidoperationAndId(String operation, int rid) protected booleanprocessCodeSetContext(MessageMediator request, ServiceContexts contexts) Handles setting the connection's code sets if required.private voidreleaseServant(ObjectAdapter objectAdapter) protected MessageMediatorprotected MessageMediatorsendingReply(MessageMediator req, Any excany) Must always be called, just after the servant's method returns.
-
Field Details
-
wrapper
-
poaWrapper
-
orb
-
-
Constructor Details
-
ServerRequestDispatcherImpl
-
-
Method Details
-
locate
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 interfaceServerRequestDispatcher- Parameters:
okey- key to object to locate- 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.
-
generalMessage
-
exceptionMessage
-
dispatch
- Specified by:
dispatchin interfaceServerRequestDispatcher
-
releaseServant
-
getServant
private Object getServant(ObjectAdapter objectAdapter, byte[] objectId, String operation) throws OADestroyed - Throws:
OADestroyed
-
getServantWithPI
protected Object getServantWithPI(MessageMediator request, ObjectAdapter objectAdapter, byte[] objectId, ObjectKeyTemplate oktemp, String operation) throws OADestroyed - Throws:
OADestroyed
-
checkServerId
-
findObjectAdapter
-
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.- Parameters:
operation- Name of method to getnserv- Servant throw associatedExceptionif not such method exists.
-
objectInfo
-
consumeServiceContexts
-
dispatchToServant
protected MessageMediator dispatchToServant(Object servant, MessageMediator req, byte[] objectId, ObjectAdapter objectAdapter) -
handleDynamicResult
-
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.- Parameters:
req- original requestexcany-Anythat contains an exception- Returns:
- Response that contains the exception
-
codeSetServiceContextInfo
-
processCodeSetContext
Handles setting the connection's code sets if required. Returns true if the CodeSetContext was in the request, false otherwise.- Parameters:
request- request to processcontexts- context to check- Returns:
- if the CodeSetContext was in the request
-
operationAndId
-