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

java.lang.Object
  |
  +--org.objectweb.david.libs.services.CosTransactions.handler.TSHandler
        |
        +--org.objectweb.david.libs.services.CosTransactions.handler.DavidTSHandler
All Implemented Interfaces:
Service, 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
protected DavidTSHandler(Context c, Object[] used_components)
          Builds a new Jeremie transaction service handler instance.
 
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

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

used_components must be an array of 4 objects. The first is an Integer whose value is the transaction service id; If the value equals Integer.MAX_VALUE, then the value defaults to service_id; the second is a (possibly null) Sender instance; the third is a possibly null Receiver instance; the fourth is a DavidStreamFactory instance.

Parameters:
c - unused
used_components - the components used to initialize the new DavidTSHandler.
Throws:
JonathanException - if something goes wrong.
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.
Overrides:
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.
Overrides:
decodeContext in class TSHandler
Parameters:
ctx - the IOP service context containing the encoded propagation context.
Returns:
the decoded propagation context.