public class TransactedSessionImpl extends BaseTransactedSessionImpl implements TransactedSession
BaseTransactedSessionImpl.AllowedOperation| Constructor and Description |
|---|
TransactedSessionImpl(TransactedSessionManager mgr,
JCSMPChannelProperties channelProperties) |
| Modifier and Type | Method and Description |
|---|---|
void |
allowOperation(BaseTransactedSessionImpl.AllowedOperation op) |
void |
close()
Rollback the active transaction and close the
TransactedSession. |
void |
closeFlow(Closeable c) |
void |
commit()
Commit the active transaction.
|
FlowReceiver |
createFlow(XMLMessageListener listener,
ConsumerFlowProperties flowProps,
EndpointProperties endpointProps)
Creates a consumer flow within this
TransactedSession and
associates it to this session. |
FlowReceiver |
createFlow(XMLMessageListener listener,
ConsumerFlowProperties flowProps,
EndpointProperties endpointProps,
FlowEventHandler flowEventHander)
Creates a consumer flow within this
TransactedSession and
associates it to this session. |
XMLMessageProducer |
createProducer(ProducerFlowProperties fprop,
JCSMPStreamingPublishEventHandler callback)
Creates a producer flow within this
TransactedSession and
associates it to this session. |
XMLMessageProducer |
createProducer(ProducerFlowProperties fprop,
JCSMPStreamingPublishEventHandler callback,
JCSMPProducerEventHandler eventCallback)
Creates a producer flow within this
TransactedSession and
associates it to this session. |
void |
enqueueFlowToClose(Closeable flow)
When a flow requests to be closed, it is added to a queue of flows to
close, until the time the next transaction begins.
|
boolean |
equals(Object obj)
hashcode and equals to support shoving this into a Set
|
Integer |
getConnTag() |
TSState |
getCurrentSessionState() |
boolean |
getExpectsAcks() |
JCSMPBasicSession |
getParentSession() |
TransactionStatus |
getStatus()
Gets the status of the current transaction.
|
AssuredCtrlHeaderParameters.ParamTransactionId |
getTransactionId() |
void |
handleControlMessage(AssuredCtrlEnums.TransactionCtrlMessageType mtype,
AssuredCtrlHeaderBean adctrl,
JCSMPErrorResponseException err_resp) |
void |
handleInterruptedException(JCSMPInterruptedException e) |
void |
handleTransportException(JCSMPTransportException e) |
void |
handleUnrecoverableException(JCSMPException e) |
int |
hashCode()
hashcode and equals to support shoving this into a HashSet
|
boolean |
hasUnboundSubFlows() |
boolean |
isXA() |
void |
notifyBound(String txSessionName,
long txSessionId,
AssuredCtrlEnums.TransactedSessionState routerState,
AssuredCtrlHeaderParameters.ParamTransactionId routerTid) |
void |
notifyFinishedAdRetransmissions() |
void |
notifyFlowRebindFinished() |
void |
notifyUnknownName() |
void |
notifyVridChange() |
void |
processFlowsToClose()
When the transaction state machine enters ACTIVE again (new transaction),
everything queued for closing will be closed.
|
boolean |
reconnectInProgress() |
void |
rollback()
Rollback the active transaction.
|
void |
setConnTag(Integer connTag) |
void |
setTransactionID(long txid) |
boolean |
startAdRetransmission() |
boolean |
switchStateIfNotIn(TSState newstate) |
String |
toString() |
addInputStep, addOutputStep, beforeEnqueue, getName, getTransactedSessionId, getTransactionSteps, notifyPostReconnect, setNamegetNamepublic TransactedSessionImpl(TransactedSessionManager mgr, JCSMPChannelProperties channelProperties)
public JCSMPBasicSession getParentSession()
public void allowOperation(BaseTransactedSessionImpl.AllowedOperation op) throws InvalidOperationException
allowOperation in class BaseTransactedSessionImplInvalidOperationExceptionpublic void notifyVridChange()
notifyVridChange in class BaseTransactedSessionImplpublic void notifyUnknownName()
notifyUnknownName in class BaseTransactedSessionImplpublic void setConnTag(Integer connTag)
public Integer getConnTag()
public TransactionStatus getStatus()
TransactedSessiongetStatus in interface TransactedSessionpublic void commit()
throws RollbackException,
JCSMPException
TransactedSessioncommit in interface TransactedSessionRollbackException - If the transaction was rolled back unexpectedly.TransactionResultUnknownException - If the transaction result is unknown. This could happen when the transacted session
could not be resumed after a session reconnection.JCSMPException - On other exceptions.public void rollback()
throws JCSMPException
TransactedSessionrollback in interface TransactedSessionJCSMPException - On exception.public boolean reconnectInProgress()
public boolean hasUnboundSubFlows()
public FlowReceiver createFlow(XMLMessageListener listener, ConsumerFlowProperties flowProps, EndpointProperties endpointProps) throws JCSMPException
TransactedSessionTransactedSession and
associates it to this session.
The semantics and error conditions of this call are identical to
JCSMPSession.createFlow(XMLMessageListener, ConsumerFlowProperties, EndpointProperties).
createFlow in interface TransactedSessionJCSMPExceptionpublic FlowReceiver createFlow(XMLMessageListener listener, ConsumerFlowProperties flowProps, EndpointProperties endpointProps, FlowEventHandler flowEventHander) throws JCSMPException
TransactedSessionTransactedSession and
associates it to this session.
The semantics and error conditions of this call are identical to
JCSMPSession.createFlow(XMLMessageListener, ConsumerFlowProperties, EndpointProperties, FlowEventHandler).
createFlow in interface TransactedSessionJCSMPExceptionpublic XMLMessageProducer createProducer(ProducerFlowProperties fprop, JCSMPStreamingPublishEventHandler callback) throws JCSMPException
TransactedSessionTransactedSession and
associates it to this session. A maximum of one (1) producer flow may be
created per TransactedSession. Only streaming producers
are allowed, so callback must not be null.createProducer in interface TransactedSessionfprop - The producer flow properties. Not used and should be null.callback - he event handler which has to implement the at least the interface JCSMPStreamingPublishEventHandler.InvalidOperationException - If the peer capabilities do not support features requested in
this operation.JCSMPException - On other errors.public XMLMessageProducer createProducer(ProducerFlowProperties fprop, JCSMPStreamingPublishEventHandler callback, JCSMPProducerEventHandler eventCallback) throws JCSMPException
TransactedSessionTransactedSession and
associates it to this session. A maximum of one (1) producer flow may be
created per TransactedSession. Only streaming producers
are allowed, so callback must not be null.createProducer in interface TransactedSessionfprop - The producer flow properties. Not used and should be null.callback - A stream event handlereventCallback - A producer event handlerInvalidOperationException - If the peer capabilities do not support features requested in
this operation.JCSMPException - On other errors.
public void close()
TransactedSessionTransactedSession. This call closes all subordinate
guaranteed delivery flows (producers / consumers).close in interface TransactedSessionpublic void handleTransportException(JCSMPTransportException e)
public void handleInterruptedException(JCSMPInterruptedException e)
public void handleUnrecoverableException(JCSMPException e)
public AssuredCtrlHeaderParameters.ParamTransactionId getTransactionId()
public void notifyBound(String txSessionName, long txSessionId, AssuredCtrlEnums.TransactedSessionState routerState, AssuredCtrlHeaderParameters.ParamTransactionId routerTid) throws JCSMPException
JCSMPExceptionpublic void notifyFlowRebindFinished()
throws JCSMPException
JCSMPExceptionpublic void setTransactionID(long txid)
public boolean switchStateIfNotIn(TSState newstate) throws JCSMPException
JCSMPExceptionpublic TSState getCurrentSessionState()
public void handleControlMessage(AssuredCtrlEnums.TransactionCtrlMessageType mtype, AssuredCtrlHeaderBean adctrl, JCSMPErrorResponseException err_resp)
public int hashCode()
public boolean equals(Object obj)
public boolean getExpectsAcks()
getExpectsAcks in class BaseTransactedSessionImplpublic void closeFlow(Closeable c)
closeFlow in class BaseTransactedSessionImplpublic void enqueueFlowToClose(Closeable flow)
public void processFlowsToClose()
public void notifyFinishedAdRetransmissions()
public boolean startAdRetransmission()
public boolean isXA()
isXA in class BaseTransactedSessionImplCopyright 2004-2020 Solace Corporation. All rights reserved.