org.openorb.orb.iiop
Class IIOPServerRequest

java.lang.Object
  |
  +--org.omg.CORBA.LocalObject
        |
        +--org.openorb.orb.net.AbstractServerRequest
              |
              +--org.openorb.orb.iiop.IIOPServerRequest
All Implemented Interfaces:
org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object, org.omg.PortableInterceptor.RequestInfo, org.omg.PortableInterceptor.RequestInfoOperations, org.omg.CORBA.portable.ResponseHandler, java.io.Serializable, ServerRequest, org.omg.PortableInterceptor.ServerRequestInfo, org.omg.PortableInterceptor.ServerRequestInfoOperations

public class IIOPServerRequest
extends AbstractServerRequest

This class represents a client request.

Author:
Unknown
See Also:
Serialized Form

Fields inherited from interface org.openorb.orb.net.ServerRequest
OBJECT_HERE, STATE_COMPLETE, STATE_CREATED, STATE_FIND_ADAPTER, STATE_PROCESSING, STATE_QUEUED, STATE_REPLY, UNKNOWN_OBJECT
 
Constructor Summary
IIOPServerRequest(ServerManager svrmgr, IIOPServerChannel channel, int request_id, byte[] object_id, org.omg.GIOP.Version version)
          Constructor.
IIOPServerRequest(ServerManager svrmgr, IIOPServerChannel channel, int request_id, org.omg.CORBA.portable.InputStream argument_stream, byte[] object_id, java.lang.String operation, byte sync_scope, org.omg.IOP.ServiceContext[] request_service_contexts, org.omg.GIOP.Version version)
          Constructor.
IIOPServerRequest(ServerManager svrmgr, IIOPServerChannel channel, int request_id, org.omg.CORBA.portable.InputStream argument_stream, org.omg.GIOP.Version version)
          Constructor.
IIOPServerRequest(ServerManager svrmgr, IIOPServerChannel channel, int request_id, org.omg.GIOP.Version version)
          Constructor.
 
Method Summary
protected  org.omg.CORBA.portable.OutputStream begin_marshal_reply()
          Create a stream for marshaling a successful response.
protected  org.omg.CORBA.portable.OutputStream begin_marshal_user_exception()
          Create a stream for marshaling a user exception response.
protected  void complete_reply(org.omg.CORBA.portable.OutputStream os)
          Complete the marshaling process.
 BufferSource getRequestSource()
          Return the request source member.
 Transport getTransport()
          Return the underlying transport.
protected  void marshal_forward_request(org.omg.CORBA.Object target, boolean permanent)
          Send a forward request result.
protected  void marshal_locate_reply(boolean object_is_here)
          Reply to a locate request.
protected  void marshal_system_exception(java.lang.String repo_id, org.omg.CORBA.SystemException ex)
          Send a system exception result.
protected  void release_request()
          Release any resources associated with the request.
 void setRequestSource(BufferSource request_source)
          Set the request source member.
 org.omg.GIOP.Version version()
          Return the GIOP version.
 
Methods inherited from class org.openorb.orb.net.AbstractServerRequest
adapter_id, adapter, adapter, add_reply_service_context, argument_stream, arguments, begin_request, channel, client_cancel, contexts, createExceptionReply, createReply, disableServiceContextExceptions, dispatch, enableServiceContextExceptions, equals, exceptions, forward_reference_ior, forward_reference, get_reply_service_context, get_reply_service_contexts, get_request_service_context, get_server_policy, get_slot, getLogger, hashCode, init, init, is_locate, object_id, object_key, operation_context, operation, orb, reply_status, request_id, response_expected, result, sending_exception, sending_system_exception_id, sending_system_exception, server_cancel, set_slot, state_completion_status, state, sync_scope, target_is_a, target_most_derived_interface, toString
 
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, wait, wait, wait
 
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

IIOPServerRequest

public IIOPServerRequest(ServerManager svrmgr,
                         IIOPServerChannel channel,
                         int request_id,
                         org.omg.CORBA.portable.InputStream argument_stream,
                         byte[] object_id,
                         java.lang.String operation,
                         byte sync_scope,
                         org.omg.IOP.ServiceContext[] request_service_contexts,
                         org.omg.GIOP.Version version)
Constructor.
Parameters:
svrmgr - The server manager associated with this request.
channel - Channel on which this request has been received on.
request_id - The request id of this request.
argument_stream - ???
object_id - The object id of this request.
operation - The name of the operation to execute.
sync_scope - The synchronization scope (See Messaging spec.)
request_service_contexts - An array of service contexts. associated with this request.
version - The GIOP version of this request.

IIOPServerRequest

public IIOPServerRequest(ServerManager svrmgr,
                         IIOPServerChannel channel,
                         int request_id,
                         org.omg.CORBA.portable.InputStream argument_stream,
                         org.omg.GIOP.Version version)
Constructor.
Parameters:
svrmgr - The server manager associated with this request.
channel - Channel on which this request has been received on.
request_id - The request id of this request.
argument_stream - ???
version - The GIOP version of this request.

IIOPServerRequest

public IIOPServerRequest(ServerManager svrmgr,
                         IIOPServerChannel channel,
                         int request_id,
                         byte[] object_id,
                         org.omg.GIOP.Version version)
Constructor.
Parameters:
svrmgr - The server manager associated with this request.
channel - Channel on which this request has been received on.
request_id - The request id of this request.
object_id - The object id of this request.
version - The GIOP version of this request.

IIOPServerRequest

public IIOPServerRequest(ServerManager svrmgr,
                         IIOPServerChannel channel,
                         int request_id,
                         org.omg.GIOP.Version version)
Constructor.
Parameters:
svrmgr - The server manager associated with this request.
channel - Channel on which this request has been received on.
request_id - The request id of this request.
version - The GIOP version of this request.
Method Detail

version

public org.omg.GIOP.Version version()
Return the GIOP version.

setRequestSource

public void setRequestSource(BufferSource request_source)
Set the request source member.
Parameters:
request_source - The source buffer of a request.

getRequestSource

public BufferSource getRequestSource()
Return the request source member.
Returns:
The source buffer of a request.

getTransport

public Transport getTransport()
Return the underlying transport. This is necessary for the SSL extension in order to get the SSLServerSocket. The SSLServerSocket has the certificates connected and the CSIv2 layer needs the distinguished name from the first client certificate when mutual authentication is done by the SSL transport.
Returns:
An instance of type Transport.

marshal_system_exception

protected void marshal_system_exception(java.lang.String repo_id,
                                        org.omg.CORBA.SystemException ex)
Send a system exception result. Note that a failed locate request will always result in a system exception, which this function is free to convert into a failed locate reply. This may throw a system exception indicating a transport problem.
Overrides:
marshal_system_exception in class AbstractServerRequest

marshal_forward_request

protected void marshal_forward_request(org.omg.CORBA.Object target,
                                       boolean permanent)
Send a forward request result. This may throw a system exception indicating a transport problem.
Overrides:
marshal_forward_request in class AbstractServerRequest

marshal_locate_reply

protected void marshal_locate_reply(boolean object_is_here)
Reply to a locate request. This argument to this function will be true when called from this class, however marshal_system_exception may convert a system exception response into a locate failure. This may throw a system exception indicating a transport problem.
Overrides:
marshal_locate_reply in class AbstractServerRequest

begin_marshal_reply

protected org.omg.CORBA.portable.OutputStream begin_marshal_reply()
Create a stream for marshaling a successful response. This is paired with a call to complete_marshal. The returned stream may throw a system exception at any time to indicate transport problems.
Overrides:
begin_marshal_reply in class AbstractServerRequest

begin_marshal_user_exception

protected org.omg.CORBA.portable.OutputStream begin_marshal_user_exception()
Create a stream for marshaling a user exception response. This is paired with a call to complete_marshal. The returned stream may throw a system exception at any time to indicate transport problems.
Overrides:
begin_marshal_user_exception in class AbstractServerRequest

complete_reply

protected void complete_reply(org.omg.CORBA.portable.OutputStream os)
Complete the marshaling process. Paired with a call to begin_marshal_* . This may throw a system exception to indicate transport problems.
Overrides:
complete_reply in class AbstractServerRequest

release_request

protected void release_request()
Release any resources associated with the request. This is called when the complete state is entered.
Overrides:
release_request in class AbstractServerRequest