org.objectweb.jeremie.services.handler.api
Interface Service

All Known Implementing Classes:
JRMITSHandler, TSHandler

public interface Service

Interface offered by a service to the services handler.


Method Summary
 ServiceContext getReplyContext(int request_id, org.objectweb.jonathan.apis.kernel.Context message_context)
          Returns a reply context.
 ServiceContext getRequestContext(int request_id, boolean response_expected, byte[] object_key, org.objectweb.jonathan.apis.kernel.Context message_context)
          Returns a request context.
 void handleReplyContext(ServiceContext context, int request_id, 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 reply arrival.
 void handleRequestContext(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.
 

Method Detail

getRequestContext

ServiceContext getRequestContext(int request_id,
                                 boolean response_expected,
                                 byte[] object_key,
                                 org.objectweb.jonathan.apis.kernel.Context message_context)
Returns a request context.

Parameters:
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 marshaller.
Returns:
a service context.

getReplyContext

ServiceContext getReplyContext(int request_id,
                               org.objectweb.jonathan.apis.kernel.Context message_context)
Returns a reply context.

Parameters:
request_id - the corresponding request id.
message_context - the context of the reply marshaller.
Returns:
a service context.

handleRequestContext

void handleRequestContext(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.

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

void handleReplyContext(ServiceContext context,
                        int request_id,
                        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 reply arrival.

Parameters:
context - the service context of the reply;
request_id - the corresponding request identifier.
message_context - the context of the reply unmarshaller.