Package com.sun.corba.ee.impl.protocol
Class ClientDelegateImpl
java.lang.Object
org.omg.CORBA.portable.Delegate
org.omg.CORBA_2_3.portable.Delegate
com.sun.corba.ee.spi.protocol.ClientDelegate
com.sun.corba.ee.impl.protocol.ClientDelegateImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ContactInfoListprivate ORBprivate static final ORBUtilSystemException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcreate_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result) Creates a Request instance for use in the Dynamic Invocation Interface.create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Creates a Request instance for use in the Dynamic Invocation Interface.Returns a duplicate of the object reference provided.private voideffectiveTargetIOR(IOR ior) private voidprivate voidbooleanThis method overrides the org.omg.CORBA.portable.Delegate.equals method, and does the equality check based on IOR equality.private voidprivate voidprivate voidprivate voidget_codebase(Object self) Returns the codebase for object reference provided.get_interface_def(Object obj) Return an InterfaceDef for the object reference provided.The ORB associated * with an invocation.private ClientRequestDispatcherGet the CorbaContactInfoList which represents they encoding/protocol/transport combinations that may be used to contact the service.private IIOPAddressgetPrimaryAddress(IOR ior) intReturns an ORB-internal identifier (hashcode) for this object reference.inthashCode()intProvides the implementation to override the hashCode() method of the delegating CORBA object.invoke(Object self, OutputStream output) invoke is called by a stub to invoke an operation.booleanChecks if the object reference is an instance of the given interface.booleanis_equivalent(Object obj, Object ref) Determines if the two object references are equivalent.booleanReturns true if this object is implemented by a local servant.booleannon_existent(Object obj) Determines whether the server object for the object reference has been destroyed.Provides a reference to the orb associated with its parameter.voidReleases resources associated with the object reference provided.voidreleaseReply(Object self, InputStream input) releaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed.Creates a Request instance for use in the Dynamic Invocation Interface.request is called by a stub to obtain an OutputStream for marshaling arguments.private voidrequestInfo(String operation, ContactInfo info) private voidprivate voidretryingRequest(Exception exc) voidservant_postinvoke(Object self, ServantObject servant) servant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant.servant_preinvoke(Object self, String operation, Class expectedType) Returns a Java reference to the servant which should be used for this request.private voidprivate voidProvides the implementation to override the toString() method of the delegating CORBA object.Methods inherited from class org.omg.CORBA.portable.Delegate
get_domain_managers, get_policy, set_policy_override
-
Field Details
-
orb
-
wrapper
-
contactInfoList
-
-
Constructor Details
-
ClientDelegateImpl
-
-
Method Details
-
getBroker
Description copied from class:ClientDelegateThe ORB associated * with an invocation.- Specified by:
getBrokerin classClientDelegate- Returns:
- ORB
-
getContactInfoList
Description copied from class:ClientDelegateGet the CorbaContactInfoList which represents they encoding/protocol/transport combinations that may be used to contact the service.- Specified by:
getContactInfoListin classClientDelegate- Returns:
- CorbaContactInfoList
-
requestInfo
-
retryingRequest
-
enter_totalInvocation
@InfoMethod(tpName="totalInvocation", tpType=ENTER) private void enter_totalInvocation() -
exit_totalInvocation
@InfoMethod(tpName="totalInvocation", tpType=EXIT) private void exit_totalInvocation() -
enter_hasNextNext
@InfoMethod(tpName="hasNextNext", tpType=ENTER) private void enter_hasNextNext() -
exit_hasNextNext
@InfoMethod(tpName="hasNextNext", tpType=EXIT) private void exit_hasNextNext() -
getPrimaryAddress
-
targetIOR
-
effectiveTargetIOR
-
request
Description copied from class:Delegaterequest is called by a stub to obtain an OutputStream for marshaling arguments. The stub must supply the operation name, and indicate if a response is expected (i.e is this a oneway call).- Overrides:
requestin classDelegate- Parameters:
self- The object reference which delegated to this delegate.operation- a string containing the operation name. The operation name corresponds to the operation name as it would be encoded in a GIOP request.responseExpected- false if the operation is a one way operation, and true otherwise.- Returns:
- OutputStream the OutputStream into which request arguments can be marshaled.
- See Also:
-
invoke
public InputStream invoke(Object self, OutputStream output) throws ApplicationException, RemarshalException Description copied from class:Delegateinvoke is called by a stub to invoke an operation. The stub provides an OutputStream that was previously returned by a request() call. invoke returns an InputStream which contains the marshaled reply. If an exception occurs, invoke may throw an ApplicationException object which contains an InputStream from which the user exception state may be unmarshaled.- Overrides:
invokein classDelegate- Parameters:
self- The object reference which delegated to this delegate.output- the OutputStream which contains marshaled arguments- Returns:
- input the InputStream from which reply parameters can be unmarshaled.
- Throws:
ApplicationException- thrown when implementation throws (upon invocation) an exception defined as part of its remote method definition.RemarshalException- thrown when remarshalling fails.- See Also:
-
releaseReply
Description copied from class:DelegatereleaseReply may optionally be called by a stub to release a reply stream back to the ORB when the unmarshaling has completed. The stub passes the InputStream returned by invoke() or ApplicationException.getInputStream(). A null value may also be passed to releaseReply, in which case the method is a noop.- Overrides:
releaseReplyin classDelegate- Parameters:
self- The object reference which delegated to this delegate.input- the InputStream returned from invoke().- See Also:
-
getClientRequestDispatcher
-
get_interface_def
Description copied from class:DelegateReturn an InterfaceDef for the object reference provided.- Specified by:
get_interface_defin classDelegate- Parameters:
obj- The object reference whose InterfaceDef needs to be returned- Returns:
- the InterfaceDef
-
foundMyId
@InfoMethod private void foundMyId() -
foundIdInRepostioryId
@InfoMethod private void foundIdInRepostioryId() -
callingServer
@InfoMethod private void callingServer() -
serverReturned
@InfoMethod private void serverReturned() -
retryingRequest
@InfoMethod private void retryingRequest() -
is_a
Description copied from class:DelegateChecks if the object reference is an instance of the given interface. -
non_existent
Description copied from class:DelegateDetermines whether the server object for the object reference has been destroyed.- Specified by:
non_existentin classDelegate- Parameters:
obj- The object reference which delegated to this delegate.- Returns:
- true if the ORB knows authoritatively that the server object does not exist, false otherwise
-
duplicate
Description copied from class:DelegateReturns a duplicate of the object reference provided. -
release
Description copied from class:DelegateReleases resources associated with the object reference provided. -
is_equivalent
Description copied from class:DelegateDetermines if the two object references are equivalent.- Specified by:
is_equivalentin classDelegate- Parameters:
obj- The object reference which delegated to this delegate.ref- The object reference to check equivalence against.- Returns:
- true if the objects are CORBA-equivalent.
-
equals
This method overrides the org.omg.CORBA.portable.Delegate.equals method, and does the equality check based on IOR equality. -
hashCode
Description copied from class:DelegateProvides the implementation to override the hashCode() method of the delegating CORBA object. -
hash
Description copied from class:DelegateReturns an ORB-internal identifier (hashcode) for this object reference. -
request
Description copied from class:DelegateCreates a Request instance for use in the Dynamic Invocation Interface. -
create_request
public Request create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result) Description copied from class:DelegateCreates a Request instance for use in the Dynamic Invocation Interface.- Specified by:
create_requestin classDelegate- Parameters:
obj- The object reference which delegated to this delegate.ctx- The context to be used.operation- The name of the operation to be invoked.arg_list- The arguments to the operation in the form of an NVList.result- A container for the result as a NamedValue.- Returns:
- The created Request object.
-
create_request
public Request create_request(Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) Description copied from class:DelegateCreates a Request instance for use in the Dynamic Invocation Interface.- Specified by:
create_requestin classDelegate- Parameters:
obj- The object reference which delegated to this delegate.ctx- The context to be used.operation- The name of the operation to be invoked.arg_list- The arguments to the operation in the form of an NVList.result- A container for the result as a NamedValue.exclist- A list of possible exceptions the operation can throw.ctxlist- A list of context strings that need to be resolved and sent with the Request.- Returns:
- The created Request object.
-
orb
Description copied from class:DelegateProvides a reference to the orb associated with its parameter. -
is_local
Returns true if this object is implemented by a local servant. REVISIT: locatedIOR should be replaced with a method call that returns the current IOR for this request (e.g. ContactInfoChooser). -
servant_preinvoke
Description copied from class:DelegateReturns a Java reference to the servant which should be used for this request. servant_preinvoke() is invoked by a local stub. If a ServantObject object is returned, then its servant field has been set to an object of the expected type (Note: the object may or may not be the actual servant instance). The local stub may cast the servant field to the expected type, and then invoke the operation directly. The ServantRequest object is valid for only one invocation, and cannot be used for more than one invocation.- Overrides:
servant_preinvokein classDelegate- Parameters:
self- The object reference which delegated to this delegate.operation- a string containing the operation name. The operation name corresponds to the operation name as it would be encoded in a GIOP request.expectedType- a Class object representing the expected type of the servant. The expected type is the Class object associated with the operations class of the stub's interface (e.g. A stub for an interface Foo, would pass the Class object for the FooOperations interface).- Returns:
- a ServantObject object. The method may return a null value if it does not wish to support this optimization (e.g. due to security, transactions, etc). The method must return null if the servant is not of the expected type.
-
servant_postinvoke
Description copied from class:Delegateservant_postinvoke() is invoked by the local stub after the operation has been invoked on the local servant. This method must be called if servant_preinvoke() returned a non-null value, even if an exception was thrown by the servant's method. For this reason, the call to servant_postinvoke() should be placed in a Java finally clause.- Overrides:
servant_postinvokein classDelegate- Parameters:
self- The object reference which delegated to this delegate.servant- the instance of the ServantObject returned from the servant_preinvoke() method.
-
get_codebase
Description copied from class:DelegateReturns the codebase for object reference provided.- Overrides:
get_codebasein classDelegate- Parameters:
self- the object reference whose codebase needs to be returned.- Returns:
- the codebase as a space delimited list of url strings or null if none.
-
toString
Description copied from class:DelegateProvides the implementation to override the toString() method of the delegating CORBA object. -
hashCode
public int hashCode()
-