org.objectweb.jeremie.services.handler.CosTransactions
Class JRMITSHandler

java.lang.Object
  extended byorg.objectweb.jeremie.services.handler.CosTransactions.TSHandler
      extended byorg.objectweb.jeremie.services.handler.CosTransactions.JRMITSHandler
All Implemented Interfaces:
Service, TSIdentification

public class JRMITSHandler
extends TSHandler

Provides an implementation of a CORBA COS Transaction service handler that conforms to the CosTSPortability module but that uses Java specific (i.e., non CORBA) means of encoding and decoding transaction contexts.


Field Summary
protected  org.objectweb.jonathan.presentation.api.MarshallerFactory mf
          The marshaller factory parameter used to encode/decode contexts.
 
Fields inherited from class org.objectweb.jeremie.services.handler.CosTransactions.TSHandler
receiver, sender, service_id
 
Constructor Summary
JRMITSHandler(int service_id, Sender sender, Receiver receiver, org.objectweb.jonathan.presentation.api.MarshallerFactory marshaller_factory)
          Builds a new Jeremie transaction service handler instance.
JRMITSHandler(Sender sender, Receiver receiver, org.objectweb.jonathan.presentation.api.MarshallerFactory marshaller_factory)
          Builds a new Jeremie transaction service handler instance.
 
Method Summary
protected  PropagationContext decodeContext(ServiceContext sc)
          Decodes a Transaction Service propagation context from an IOP service context.
protected  ServiceContext encodeContext(PropagationContext ctx)
          Encodes a Transaction Service propagation context into an IOP service context.
 
Methods inherited from class org.objectweb.jeremie.services.handler.CosTransactions.TSHandler
getReplyContext, getRequestContext, handleReplyContext, handleRequestContext, identify_receiver, identify_sender
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mf

protected org.objectweb.jonathan.presentation.api.MarshallerFactory mf
The marshaller factory parameter used to encode/decode contexts.

Constructor Detail

JRMITSHandler

public JRMITSHandler(int service_id,
                     Sender sender,
                     Receiver receiver,
                     org.objectweb.jonathan.presentation.api.MarshallerFactory marshaller_factory)
              throws org.objectweb.jonathan.apis.kernel.JonathanException
Builds a new Jeremie transaction service handler instance. If the transaction service id value equals Integer.MAX_VALUE, then the value defaults to service_id;

Parameters:
service_id - the transaction service id
sender - a (possibly null) Sender instance;
receiver - a possibly null Receiver instance;
marshaller_factory - a marshaller factory
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - if something goes wrong.

JRMITSHandler

public JRMITSHandler(Sender sender,
                     Receiver receiver,
                     org.objectweb.jonathan.presentation.api.MarshallerFactory marshaller_factory)
              throws org.objectweb.jonathan.apis.kernel.JonathanException
Builds a new Jeremie transaction service handler instance.

Parameters:
sender - a (possibly null) Sender instance;
receiver - a possibly null Receiver instance;
marshaller_factory - a marshaller factory
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - if something goes wrong.
Method Detail

encodeContext

protected ServiceContext encodeContext(PropagationContext ctx)
Encodes a Transaction Service propagation context into an IOP service context.

Specified by:
encodeContext in class TSHandler
Parameters:
ctx - the propagation context to be encoded.
Returns:
the resulting IOP service context.

decodeContext

protected PropagationContext decodeContext(ServiceContext sc)
Decodes a Transaction Service propagation context from an IOP service context.

Specified by:
decodeContext in class TSHandler
Parameters:
sc - a ServiceContext instance.
Returns:
the decoded propagation context.