org.objectweb.david.libs.services.java_serial
Class JavaSerialService

java.lang.Object
  extended byorg.objectweb.david.libs.services.java_serial.JavaSerialService
All Implemented Interfaces:
org.objectweb.jonathan.apis.kernel.Factory, JAVA_SERIAL_SERVICE, Service

public class JavaSerialService
extends java.lang.Object
implements Service, org.objectweb.jonathan.apis.kernel.Factory, JAVA_SERIAL_SERVICE

The Java Serial Service is used by clients that wish to use Java Serialization instead of CDR serialization to encode values. It may be used only if the server reference contains an indication that the server supports Java serialization. Service information is passed only with requests. Replies use the same encoding as replies.


Field Summary
 
Fields inherited from interface org.objectweb.david.apis.services.java_serial.JAVA_SERIAL_SERVICE
TAG_JAVA_SERIAL
 
Constructor Summary
JavaSerialService()
          Creates an instance of the service.
 
Method Summary
 org.omg.IOP.ServiceContext getReplyContext(int request_id, org.objectweb.jonathan.apis.kernel.Context ignored)
          Returns null;
 org.omg.IOP.ServiceContext getRequestContext(int request_id, boolean response_expected, byte[] object_key, org.objectweb.jonathan.apis.kernel.Context message_context)
          Returns an indication whether java serialization is used.
 void handleReplyContext(org.omg.IOP.ServiceContext context, int request_id, org.objectweb.jonathan.apis.kernel.Context ignored)
          This method is called by the services handler to let the operations related to the target service be performed on reply arrival.
 void handleRequestContext(org.omg.IOP.ServiceContext context, int request_id, boolean response_expected, byte[] object_key, org.objectweb.jonathan.apis.kernel.Context message_context)
          This method is called by the services handler to let the operations related to the target service be performed on request arrival.
 java.lang.Object newObject(org.objectweb.jonathan.apis.kernel.Context c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaSerialService

public JavaSerialService()
Creates an instance of the service.

Method Detail

newObject

public java.lang.Object newObject(org.objectweb.jonathan.apis.kernel.Context c)
Specified by:
newObject in interface org.objectweb.jonathan.apis.kernel.Factory

getRequestContext

public org.omg.IOP.ServiceContext getRequestContext(int request_id,
                                                    boolean response_expected,
                                                    byte[] object_key,
                                                    org.objectweb.jonathan.apis.kernel.Context message_context)
Returns an indication whether java serialization is used.

Specified by:
getRequestContext in interface Service
Parameters:
request_id - the request identifier (ignored);
response_expected - indicates whether a response is expected or not (ignored);
object_key - the request target object key (ignored).
message_context - the context of the request marshaller.
Returns:
always null.

getReplyContext

public org.omg.IOP.ServiceContext getReplyContext(int request_id,
                                                  org.objectweb.jonathan.apis.kernel.Context ignored)
Returns null;

Specified by:
getReplyContext in interface Service
Parameters:
request_id - the corresponding request id (unused).
ignored - the context of the reply marshaller.
Returns:
a service context.

handleRequestContext

public void handleRequestContext(org.omg.IOP.ServiceContext context,
                                 int request_id,
                                 boolean response_expected,
                                 byte[] object_key,
                                 org.objectweb.jonathan.apis.kernel.Context message_context)
This method is called by the services handler to let the operations related to the target service be performed on request arrival.

Specified by:
handleRequestContext in interface Service
Parameters:
context - the service context of the request;
request_id - the request identifier;
response_expected - indicates whether a response is expected or not;
object_key - the request target object key.
message_context - the context of the request unmarshaller.

handleReplyContext

public void handleReplyContext(org.omg.IOP.ServiceContext context,
                               int request_id,
                               org.objectweb.jonathan.apis.kernel.Context ignored)
This method is called by the services handler to let the operations related to the target service be performed on reply arrival.

Specified by:
handleReplyContext in interface Service
Parameters:
context - the service context of the reply;
request_id - the corresponding request identifier.
ignored - the context of the reply unmarshaller.