org.openorb.orb.net
Class AbstractClientRequest

java.lang.Object
  |
  +--org.omg.CORBA.LocalObject
        |
        +--org.openorb.orb.net.AbstractClientRequest
All Implemented Interfaces:
ClientRequest, org.omg.PortableInterceptor.ClientRequestInfo, org.omg.PortableInterceptor.ClientRequestInfoOperations, org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object, org.omg.PortableInterceptor.RequestInfo, org.omg.PortableInterceptor.RequestInfoOperations, java.io.Serializable
Direct Known Subclasses:
LocalClientRequest

public abstract class AbstractClientRequest
extends org.omg.CORBA.LocalObject
implements ClientRequest

Base class which implements some of the ClientRequest functionality.

Version:
$Revision: 1.9 $ $Date: 2004/05/13 23:54:13 $
Author:
Chris Wood
See Also:
Serialized Form

Fields inherited from interface org.openorb.orb.net.ClientRequest
OBJECT_HERE, STATE_COMPLETE, STATE_CREATED, STATE_MARSHAL, STATE_UNMARSHAL, STATE_WAITING, UNKNOWN_OBJECT
 
Constructor Summary
AbstractClientRequest(int request_id, org.omg.CORBA.Object target, Address address, ClientChannel channel)
          Creates new AbstractClientRequest
 
Method Summary
 void add_request_service_context(org.omg.IOP.ServiceContext service_context, boolean replace)
           
 Address address()
          Client address
 org.omg.Dynamic.Parameter[] arguments()
           
 ClientChannel channel()
          Client channel
 java.lang.String[] contexts()
           
 org.omg.IOP.TaggedProfile effective_profile()
          Profile as used in this request.
 org.omg.IOP.IOR effective_target_ior()
          Get the effective target IOR.
 org.omg.CORBA.Object effective_target()
          Return the effective_target object.
 boolean equals(java.lang.Object obj)
          Equality depends on request IDs
 org.omg.CORBA.TypeCode[] exceptions()
           
 org.omg.IOP.TaggedComponent get_effective_component(int id)
           
 org.omg.IOP.TaggedComponent[] get_effective_components(int id)
           
 org.omg.CORBA.Policy get_request_policy(int type)
           
 org.omg.IOP.ServiceContext get_request_service_context(int id)
           
 org.omg.IOP.ServiceContext[] get_request_service_contexts()
          Get all request service contexts that have been set.
 org.omg.CORBA.Any get_slot(int id)
           
protected  org.apache.avalon.framework.logger.Logger getLogger()
           
 int hashCode()
          Makes sure that equal requests have the same hashCode.
 java.lang.String[] operation_context()
           
 org.omg.CORBA.ORB orb()
          ORB associated with the target.
 int request_id()
          Request ID.
protected  boolean requestPolicyExists(int type)
          Checks to see if the specified request policy exists.
 org.omg.CORBA.Any result()
           
 org.omg.CORBA.CompletionStatus state_completion_status()
          This utility function returns the correct completion status to use in a system exception depending on the current state.
 org.omg.IOP.IOR target_ior()
          Get the target IOR.
 org.omg.CORBA.Object target()
          Object the request was created with.
 
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openorb.orb.net.ClientRequest
begin_marshal, cancel, forward_reference_ior, is_locate, is_poll, is_request, poll_response, receive_response, received_exception_id, received_system_exception, send_request, state, wait_for_response
 
Methods inherited from interface org.omg.PortableInterceptor.ClientRequestInfoOperations
received_exception
 
Methods inherited from interface org.omg.PortableInterceptor.RequestInfoOperations
forward_reference, get_reply_service_context, operation, reply_status, response_expected, sync_scope
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Constructor Detail

AbstractClientRequest

public AbstractClientRequest(int request_id,
                             org.omg.CORBA.Object target,
                             Address address,
                             ClientChannel channel)
Creates new AbstractClientRequest
Method Detail

channel

public ClientChannel channel()
Client channel
Specified by:
channel in interface ClientRequest

address

public Address address()
Client address
Specified by:
address in interface ClientRequest

request_id

public int request_id()
Request ID.
Specified by:
request_id in interface org.omg.PortableInterceptor.RequestInfoOperations

equals

public boolean equals(java.lang.Object obj)
Equality depends on request IDs
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Makes sure that equal requests have the same hashCode.
Overrides:
hashCode in class java.lang.Object

target_ior

public org.omg.IOP.IOR target_ior()
Get the target IOR. This ior is the marshalling ior of the object passed at creation time.
Specified by:
target_ior in interface ClientRequest

target

public org.omg.CORBA.Object target()
Object the request was created with.
Specified by:
target in interface org.omg.PortableInterceptor.ClientRequestInfoOperations

orb

public org.omg.CORBA.ORB orb()
ORB associated with the target.
Specified by:
orb in interface ClientRequest

effective_target_ior

public org.omg.IOP.IOR effective_target_ior()
Get the effective target IOR. This gets the IOR from the address passed in creation. Calling this function instead of effective_target avoids constructing an enclosing delegate/object.
Specified by:
effective_target_ior in interface ClientRequest

effective_target

public org.omg.CORBA.Object effective_target()
Return the effective_target object. This is the destination for this request.
Specified by:
effective_target in interface org.omg.PortableInterceptor.ClientRequestInfoOperations

effective_profile

public org.omg.IOP.TaggedProfile effective_profile()
Profile as used in this request.
Specified by:
effective_profile in interface org.omg.PortableInterceptor.ClientRequestInfoOperations

get_effective_component

public org.omg.IOP.TaggedComponent get_effective_component(int id)
Specified by:
get_effective_component in interface org.omg.PortableInterceptor.ClientRequestInfoOperations

get_effective_components

public org.omg.IOP.TaggedComponent[] get_effective_components(int id)
Specified by:
get_effective_components in interface org.omg.PortableInterceptor.ClientRequestInfoOperations

requestPolicyExists

protected boolean requestPolicyExists(int type)
Checks to see if the specified request policy exists.
Parameters:
type - the policy type
Returns:
true if the policy exists, false otherwise

get_request_policy

public org.omg.CORBA.Policy get_request_policy(int type)
Specified by:
get_request_policy in interface org.omg.PortableInterceptor.ClientRequestInfoOperations

arguments

public org.omg.Dynamic.Parameter[] arguments()
Specified by:
arguments in interface org.omg.PortableInterceptor.RequestInfoOperations

exceptions

public org.omg.CORBA.TypeCode[] exceptions()
Specified by:
exceptions in interface org.omg.PortableInterceptor.RequestInfoOperations

contexts

public java.lang.String[] contexts()
Specified by:
contexts in interface org.omg.PortableInterceptor.RequestInfoOperations

operation_context

public java.lang.String[] operation_context()
Specified by:
operation_context in interface org.omg.PortableInterceptor.RequestInfoOperations

result

public org.omg.CORBA.Any result()
Specified by:
result in interface org.omg.PortableInterceptor.RequestInfoOperations

get_slot

public org.omg.CORBA.Any get_slot(int id)
                           throws org.omg.PortableInterceptor.InvalidSlot
Specified by:
get_slot in interface org.omg.PortableInterceptor.RequestInfoOperations

add_request_service_context

public void add_request_service_context(org.omg.IOP.ServiceContext service_context,
                                        boolean replace)
Specified by:
add_request_service_context in interface org.omg.PortableInterceptor.ClientRequestInfoOperations

get_request_service_context

public org.omg.IOP.ServiceContext get_request_service_context(int id)
Specified by:
get_request_service_context in interface org.omg.PortableInterceptor.RequestInfoOperations

get_request_service_contexts

public org.omg.IOP.ServiceContext[] get_request_service_contexts()
Get all request service contexts that have been set. From MARSHAL onward this will be a constant list.
Specified by:
get_request_service_contexts in interface ClientRequest

state_completion_status

public org.omg.CORBA.CompletionStatus state_completion_status()
This utility function returns the correct completion status to use in a system exception depending on the current state.

getLogger

protected org.apache.avalon.framework.logger.Logger getLogger()