org.objectweb.david.libs.services.CosTransactions.handler
Class DavidTSHandler

java.lang.Object
  extended byorg.objectweb.david.libs.services.CosTransactions.handler.TSHandler
      extended byorg.objectweb.david.libs.services.CosTransactions.handler.DavidTSHandler
All Implemented Interfaces:
Service, org.omg.CORBA.TSIdentification

public class DavidTSHandler
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  DavidStreamFactory mf
          The marshaller factory parameter used to encode/decode contexts.
 
Fields inherited from class org.objectweb.david.libs.services.CosTransactions.handler.TSHandler
receiver, sender, service_id
 
Constructor Summary
DavidTSHandler(int service_id, org.omg.CosTSPortability.Sender sender, org.omg.CosTSPortability.Receiver receiver, DavidStreamFactory mf)
           
DavidTSHandler(org.omg.CosTSPortability.Sender sender, org.omg.CosTSPortability.Receiver receiver, DavidStreamFactory mf)
           
 
Method Summary
protected  org.omg.CosTransactions.PropagationContext decodeContext(org.omg.IOP.ServiceContext sc)
          Decodes a Transaction Service propagation context from an IOP service context.
protected  org.omg.IOP.ServiceContext encodeContext(org.omg.CosTransactions.PropagationContext ctx)
          Encodes a Transaction Service propagation context into an IOP service context.
 
Methods inherited from class org.objectweb.david.libs.services.CosTransactions.handler.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 DavidStreamFactory mf
The marshaller factory parameter used to encode/decode contexts.

Constructor Detail

DavidTSHandler

public DavidTSHandler(int service_id,
                      org.omg.CosTSPortability.Sender sender,
                      org.omg.CosTSPortability.Receiver receiver,
                      DavidStreamFactory mf)
               throws org.objectweb.jonathan.apis.kernel.JonathanException

DavidTSHandler

public DavidTSHandler(org.omg.CosTSPortability.Sender sender,
                      org.omg.CosTSPortability.Receiver receiver,
                      DavidStreamFactory mf)
               throws org.objectweb.jonathan.apis.kernel.JonathanException
Method Detail

encodeContext

protected org.omg.IOP.ServiceContext encodeContext(org.omg.CosTransactions.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 org.omg.CosTransactions.PropagationContext decodeContext(org.omg.IOP.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.