org.objectweb.jotm.jta.jeremie

Class TSHandler

Implemented Interfaces:
Service

public class TSHandler
extends Object
implements Service

Constructor Summary

TSHandler(Context c, Object[] used_components)
Builds a new Jeremie transaction service handler instance.

Method Summary

ServiceContext
getReplyContext(int id, Context k)
Returns a reply context.
ServiceContext
getRequestContext(int id, boolean r, byte[] key, Context k)
Returns a request context.
void
handleReplyContext(ServiceContext context, int id, Context k)
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 id, boolean r, byte[] key, Context k)
This method is called by the services handler to let the operations related to the target service be performed on request arrival.

Constructor Details

TSHandler

public TSHandler(Context c,
                 Object[] used_components)
            throws JonathanException
Builds a new Jeremie transaction service handler instance.

Parameters:
c - unused
used_components - the components used to initialize the new TSHandler.

Method Details

getReplyContext

public ServiceContext getReplyContext(int id,
                                      Context k)
Returns a reply context.

Returns:
a service context.


getRequestContext

public ServiceContext getRequestContext(int id,
                                        boolean r,
                                        byte[] key,
                                        Context k)
Returns a request context.

Returns:
a service context.


handleReplyContext

public void handleReplyContext(ServiceContext context,
                               int id,
                               Context k)
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;


handleRequestContext

public void handleRequestContext(ServiceContext context,
                                 int id,
                                 boolean r,
                                 byte[] key,
                                 Context k)
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;