org.jacorb.orb
Class Delegate

java.lang.Object
  extended byorg.omg.CORBA.portable.Delegate
      extended byorg.omg.CORBA_2_3.portable.Delegate
          extended byorg.jacorb.orb.Delegate
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable

public final class Delegate
extends Delegate
implements org.apache.avalon.framework.configuration.Configurable

JacORB implementation of CORBA object reference

Version:
$Id: Delegate.java,v 1.118 2006/05/12 14:39:54 alphonse.bendt Exp $
Author:
Gerald Brose

Constructor Summary
Delegate(ORB orb, IOR ior)
           
Delegate(ORB orb, ParsedIOR pior)
           
Delegate(ORB orb, java.lang.String object_reference)
           
Delegate(ORB orb, java.lang.String object_reference, boolean _donotcheckexceptions)
          special constructor for appligator
 
Method Summary
 int _get_TCKind()
           
 void configure(org.apache.avalon.framework.configuration.Configuration config)
           
 Request create_request(Object self, Context ctx, java.lang.String operation, NVList args, NamedValue result)
           
 Request create_request(Object self, Context ctx, java.lang.String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
           
 boolean doNotCheckExceptions()
           
 Object duplicate(Object self)
           
 boolean equals(java.lang.Object obj)
           
 boolean equals(Object self, java.lang.Object obj)
           
protected  void finalize()
          Called when a client-side stub is garbage-collected.
 Policy get_client_policy(int policy_type)
          Gets the effective overriding policy with the given type from the client-side, or null if this policy type is unset.
 java.lang.String get_codebase(Object self)
           
 DomainManager[] get_domain_managers(Object self)
           
 Object get_interface_def(Object self)
           
 InterfaceDef get_interface(Object self)
          Deprecated. Deprecated by CORBA 2.3
 java.util.Set get_pending_replies()
           
 Policy get_policy(Object self, int policy_type)
          The get_policy operation returns the policy object of the specified type, which applies to this object.
 Policy get_policy(Object self, int policy_type, OutputStream os)
           
 java.lang.String getIDString()
           
 IOR getIOR()
           
 byte[] getObjectId()
           
 byte[] getObjectKey()
           
 ParsedIOR getParsedIOR()
           
 POA getPOA()
           
 ObjectImpl getReference(POA _poa)
           
 long getRelativeRequestTimeout()
           
 long getRelativeRoundtripTimeout()
           
 UtcT getReplyEndTime()
           
 UtcT getReplyStartTime()
           
 UtcT getRequestEndTime()
           
 UtcT getRequestStartTime()
           
 short getSyncScope()
           
 int hash(Object self, int x)
           
 int hashCode()
           
 int hashCode(Object self)
           
 InputStream invoke(Object self, OutputStream os)
          Invokes a synchronous operation using this object reference by sending the request marshalled in the OutputStream.
 void invoke(Object self, OutputStream os, ReplyHandler replyHandler)
          Invokes an asynchronous operation using this object reference by sending the request marshalled in the OutputStream.
 void invokeInterceptors(ClientRequestInfoImpl info, short op)
           
 boolean is_a(Object self, java.lang.String logical_type_id)
          Determines whether the object denoted by self has type logical_type_id or a subtype of it
 boolean is_equivalent(Object self, Object obj)
           
 boolean is_local(Object self)
           
 boolean is_nil()
           
 void lockBarrier()
           
 boolean non_existent(Object self)
           
 void openBarrier()
           
 ORB orb(Object self)
           
 void rebind(Object o)
           
 void rebind(ParsedIOR p)
           
 void rebind(java.lang.String object_reference)
           
 void release(Object self)
          Called to indicate that this Delegate will no longer be used by the client.
 void releaseReply(Object self, InputStream is)
          releases the InputStream
 void replyDone(ReplyPlaceholder placeholder)
           
 Request request(Object self, java.lang.String operation)
           
 OutputStream request(Object self, java.lang.String operation, boolean responseExpected)
           
 void resolvePOA(Object self)
           
 void servant_postinvoke(Object self, ServantObject servant)
          Overrides servant_postinvoke() in org.omg.CORBA.portable.Delegate
called from generated stubs after a local operation
 ServantObject servant_preinvoke(Object self, java.lang.String operation, java.lang.Class expectedType)
          Overrides servant_preinvoke() in org.omg.CORBA.portable.Delegate
called from generated stubs before a local operation
 Object set_policy_override(Object self, Policy[] policies, SetOverrideType set_add)
           
 java.lang.String toString()
           
 java.lang.String toString(Object self)
           
 java.lang.String typeId()
           
 void waitOnBarrier()
           
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Delegate

public Delegate(ORB orb,
                ParsedIOR pior)

Delegate

public Delegate(ORB orb,
                java.lang.String object_reference)

Delegate

public Delegate(ORB orb,
                IOR ior)

Delegate

public Delegate(ORB orb,
                java.lang.String object_reference,
                boolean _donotcheckexceptions)
special constructor for appligator

Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration config)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

doNotCheckExceptions

public boolean doNotCheckExceptions()

_get_TCKind

public int _get_TCKind()

rebind

public void rebind(java.lang.String object_reference)

rebind

public void rebind(Object o)

rebind

public void rebind(ParsedIOR p)

create_request

public Request create_request(Object self,
                              Context ctx,
                              java.lang.String operation,
                              NVList args,
                              NamedValue result)
Specified by:
create_request in class Delegate

create_request

public Request create_request(Object self,
                              Context ctx,
                              java.lang.String operation,
                              NVList arg_list,
                              NamedValue result,
                              ExceptionList exceptions,
                              ContextList contexts)
Specified by:
create_request in class Delegate

duplicate

public Object duplicate(Object self)
Specified by:
duplicate in class Delegate

equals

public boolean equals(java.lang.Object obj)

equals

public boolean equals(Object self,
                      java.lang.Object obj)
Overrides:
equals in class Delegate

finalize

protected void finalize()
                 throws java.lang.Throwable
Called when a client-side stub is garbage-collected. In effect, this method causes the Delegate to unregister itself from the underlying GIOPConnection. If there are no other Delegates using that connection, it will be closed and disposed of altogether.

Throws:
java.lang.Throwable

get_domain_managers

public DomainManager[] get_domain_managers(Object self)
Overrides:
get_domain_managers in class Delegate

get_policy

public Policy get_policy(Object self,
                         int policy_type)
The get_policy operation returns the policy object of the specified type, which applies to this object. It returns the effective Policy for the object reference. The effective Policy is the one that would be used if a request were made. This Policy is determined first by obtaining the effective override for the PolicyType as returned by get_client_policy. The effective override is then compared with the Policy as specified in the IOR.

The effective Policy is determined by reconciling the effective override and the IOR-specified Policy. If the two policies cannot be reconciled, the standard system exception INV_POLICY is raised with standard minor code 1. The absence of a Policy value in the IOR implies that any legal value may be used.

Overrides:
get_policy in class Delegate

get_client_policy

public Policy get_client_policy(int policy_type)
Gets the effective overriding policy with the given type from the client-side, or null if this policy type is unset. (Implementation is incomplete, we don't check PolicyCurrent, i.e. at the thread-level)


get_policy

public Policy get_policy(Object self,
                         int policy_type,
                         OutputStream os)

getRequestEndTime

public UtcT getRequestEndTime()

getReplyEndTime

public UtcT getReplyEndTime()

getRequestStartTime

public UtcT getRequestStartTime()

getReplyStartTime

public UtcT getReplyStartTime()

getRelativeRoundtripTimeout

public long getRelativeRoundtripTimeout()

getRelativeRequestTimeout

public long getRelativeRequestTimeout()

getSyncScope

public short getSyncScope()

get_interface

public InterfaceDef get_interface(Object self)
Deprecated. Deprecated by CORBA 2.3

Specified by:
get_interface in class Delegate

get_interface_def

public Object get_interface_def(Object self)
Overrides:
get_interface_def in class Delegate

getIOR

public IOR getIOR()

getObjectId

public byte[] getObjectId()

getObjectKey

public byte[] getObjectKey()

getParsedIOR

public ParsedIOR getParsedIOR()

resolvePOA

public void resolvePOA(Object self)

getPOA

public POA getPOA()

getReference

public ObjectImpl getReference(POA _poa)

hash

public int hash(Object self,
                int x)
Specified by:
hash in class Delegate

hashCode

public int hashCode()

hashCode

public int hashCode(Object self)
Overrides:
hashCode in class Delegate

invoke

public void invoke(Object self,
                   OutputStream os,
                   ReplyHandler replyHandler)
            throws ApplicationException,
                   RemarshalException
Invokes an asynchronous operation using this object reference by sending the request marshalled in the OutputStream. The reply will be directed to the supplied ReplyHandler.

Throws:
ApplicationException
RemarshalException

invoke

public InputStream invoke(Object self,
                          OutputStream os)
                   throws ApplicationException,
                          RemarshalException
Invokes a synchronous operation using this object reference by sending the request marshalled in the OutputStream.

Overrides:
invoke in class Delegate
Returns:
the reply, if a reply is expected for this request. If no reply is expected, returns null.
Throws:
ApplicationException
RemarshalException

invokeInterceptors

public void invokeInterceptors(ClientRequestInfoImpl info,
                               short op)
                        throws RemarshalException
Throws:
RemarshalException

is_a

public boolean is_a(Object self,
                    java.lang.String logical_type_id)
Determines whether the object denoted by self has type logical_type_id or a subtype of it

Specified by:
is_a in class Delegate

is_equivalent

public boolean is_equivalent(Object self,
                             Object obj)
Specified by:
is_equivalent in class Delegate

getIDString

public java.lang.String getIDString()

is_local

public boolean is_local(Object self)
Overrides:
is_local in class Delegate
Returns:
true if this object lives on a local POA and interceptors are not installed. When interceptors are installed this returns false so that stubs do not call direct to implementation, avoiding installed interceptors.

is_nil

public boolean is_nil()

non_existent

public boolean non_existent(Object self)
Specified by:
non_existent in class Delegate

orb

public ORB orb(Object self)
Overrides:
orb in class Delegate

release

public void release(Object self)
Called to indicate that this Delegate will no longer be used by the client. The Delegate unregisters itself from the underlying GIOPConnection. If there are no other Delegates using that connection, it will be closed and disposed of altogether.

Specified by:
release in class Delegate

releaseReply

public void releaseReply(Object self,
                         InputStream is)
releases the InputStream

Overrides:
releaseReply in class Delegate

request

public Request request(Object self,
                       java.lang.String operation)
Specified by:
request in class Delegate

request

public OutputStream request(Object self,
                            java.lang.String operation,
                            boolean responseExpected)
Overrides:
request in class Delegate

servant_postinvoke

public void servant_postinvoke(Object self,
                               ServantObject servant)
Overrides servant_postinvoke() in org.omg.CORBA.portable.Delegate
called from generated stubs after a local operation

Overrides:
servant_postinvoke in class Delegate

servant_preinvoke

public ServantObject servant_preinvoke(Object self,
                                       java.lang.String operation,
                                       java.lang.Class expectedType)
Overrides servant_preinvoke() in org.omg.CORBA.portable.Delegate
called from generated stubs before a local operation

Overrides:
servant_preinvoke in class Delegate

toString

public java.lang.String toString()

toString

public java.lang.String toString(Object self)
Overrides:
toString in class Delegate

typeId

public java.lang.String typeId()

set_policy_override

public Object set_policy_override(Object self,
                                  Policy[] policies,
                                  SetOverrideType set_add)
Overrides:
set_policy_override in class Delegate

get_codebase

public java.lang.String get_codebase(Object self)
Overrides:
get_codebase in class Delegate

get_pending_replies

public java.util.Set get_pending_replies()

replyDone

public void replyDone(ReplyPlaceholder placeholder)

lockBarrier

public void lockBarrier()

waitOnBarrier

public void waitOnBarrier()

openBarrier

public void openBarrier()