org.openorb.orb.net
Class LocalServerRequest

java.lang.Object
  |
  +--org.omg.CORBA.LocalObject
        |
        +--org.openorb.orb.net.AbstractServerRequest
              |
              +--org.openorb.orb.net.LocalServerRequest
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 final class LocalServerRequest
extends AbstractServerRequest

This class represents a server request for a server that is hosted on the same ORB than the client

Version:
$Revision: 1.3 $ $Date: 2003/11/27 22:38:47 $
Author:
Erik Putrycz
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
LocalServerRequest(ServerManager serverManager, 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)
          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.
 org.omg.CORBA.portable.OutputStream getReplyStream()
          Returns the ReplyStream of this request
 boolean is_reply_exception()
          I removed all the additional marshalling parameters for exception and I kept only the effective arguments
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.
 
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

LocalServerRequest

public LocalServerRequest(ServerManager serverManager,
                          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)
Constructor.
Parameters:
serverManager - The server manager associated with this request.
request_id - The request id of this request.
argument_stream - the argument stream that will be given to the server
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.
Method Detail

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

getReplyStream

public org.omg.CORBA.portable.OutputStream getReplyStream()
Returns the ReplyStream of this request
Returns:
the request output stream

is_reply_exception

public boolean is_reply_exception()
I removed all the additional marshalling parameters for exception and I kept only the effective arguments
Returns:
true if the reply of this request is an exception

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

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

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 an OBJECT_NOT_FOUND 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

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