Package com.sun.jts.CosTransactions
Class ControlImpl
- java.lang.Object
-
- org.omg.PortableServer.Servant
-
- com.sun.jts.codegen.otsidl.JControlPOA
-
- com.sun.jts.CosTransactions.ControlImpl
-
- All Implemented Interfaces:
JControlOperations,Serializable,org.omg.CORBA.Object,org.omg.CORBA.portable.IDLEntity,org.omg.CORBA.portable.InvokeHandler,org.omg.CosTransactions.Control,org.omg.CosTransactions.ControlOperations
public class ControlImpl extends JControlPOA implements org.omg.CosTransactions.Control
The ControlImpl interface is our implementation of the standard Control interface. It provides operations to set and subsequently obtain the Terminator and Coordinator objects from the given context. Our implementation also provides a method to obtain the corresponding transaction identifiers, and stacking methods.- Version:
- 0.01
- Author:
- Simon Holdsworth, IBM Corporation
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intassociationprotected org.omg.CosTransactions.PropagationContextcachedContextprotected com.sun.jts.CosTransactions.CoordinatorImplcoordprotected org.omg.CosTransactions.CoordinatorcoordRefprotected GlobalTIDglobalTIDprotected booleaninSuspendedprotected LonglocalTIDprotected intoutgoingprotected booleanrepresentsRemoteprotected ControlImplstackedprotected booleantemporaryprotected com.sun.jts.CosTransactions.TerminatorImpltermprotected org.omg.CosTransactions.TerminatortermRefprotected org.omg.CosTransactions.StatustranState
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.omg.CORBA.Request_create_request(org.omg.CORBA.Context ctx, String operation, org.omg.CORBA.NVList arg_list, org.omg.CORBA.NamedValue result)org.omg.CORBA.Request_create_request(org.omg.CORBA.Context ctx, String operation, org.omg.CORBA.NVList arg_list, org.omg.CORBA.NamedValue result, org.omg.CORBA.ExceptionList exceptions, org.omg.CORBA.ContextList contexts)org.omg.CORBA.Object_duplicate()org.omg.CORBA.DomainManager[]_get_domain_managers()org.omg.CORBA.Object_get_interface_def()org.omg.CORBA.Policy_get_policy(int policy_type)int_hash(int maximum)boolean_is_a(String repository_id)boolean_is_equivalent(org.omg.CORBA.Object that)boolean_non_existent()void_release()org.omg.CORBA.Request_request(String operation)org.omg.CORBA.Object_set_policy_override(org.omg.CORBA.Policy[] policies, org.omg.CORBA.SetOverrideType set_add)voiddoFinalize()Cleans up the state of the object.booleanequals(Object o)Added to prevent null delegate problem.org.omg.CosTransactions.Coordinatorget_coordinator()Returns the Coordinator for the transaction.org.omg.CosTransactions.Coordinatorget_localCoordinator()Returns the Coordinator for the transaction.org.omg.CosTransactions.Terminatorget_localTerminator()org.omg.CosTransactions.Terminatorget_terminator()Returns the Terminator object for the transaction.GlobalTIDgetGlobalTID()Returns the identifier that globally represents the transactionorg.omg.CosTransactions.otid_tgetGlobalTID(org.omg.CosTransactions.StatusHolder status)Returns the identifier that globally represents the transaction, and a value that indicates the state of the transaction.longgetLocalTID(org.omg.CosTransactions.StatusHolder status)Returns the identifier that locally represents the transaction, and a value that indicates the state of the transaction.org.omg.CosTransactions.StatusgetTranState()Returns the state of the transaction as the Control object knows it.inthashCode()Added because this class overrides equals() method.static ControlImplservant(JControl control)Returns the ControlImpl which serves the given object.voidsetTranState(org.omg.CosTransactions.Status newState)Sets the state of the transaction as the Control object knows it.-
Methods inherited from class com.sun.jts.codegen.otsidl.JControlPOA
_all_interfaces, _invoke, _this, _this
-
-
-
-
Field Detail
-
temporary
protected boolean temporary
-
inSuspended
protected boolean inSuspended
-
tranState
protected org.omg.CosTransactions.Status tranState
-
coord
protected com.sun.jts.CosTransactions.CoordinatorImpl coord
-
coordRef
protected org.omg.CosTransactions.Coordinator coordRef
-
term
protected com.sun.jts.CosTransactions.TerminatorImpl term
-
termRef
protected org.omg.CosTransactions.Terminator termRef
-
stacked
protected ControlImpl stacked
-
globalTID
protected GlobalTID globalTID
-
localTID
protected Long localTID
-
representsRemote
protected boolean representsRemote
-
cachedContext
protected org.omg.CosTransactions.PropagationContext cachedContext
-
outgoing
protected int outgoing
-
association
protected int association
-
-
Method Detail
-
doFinalize
public void doFinalize()
Cleans up the state of the object.
-
getGlobalTID
public GlobalTID getGlobalTID()
Returns the identifier that globally represents the transaction- Returns:
- The global identifier.
-
getGlobalTID
public org.omg.CosTransactions.otid_t getGlobalTID(org.omg.CosTransactions.StatusHolder status) throws org.omg.CORBA.SystemExceptionReturns the identifier that globally represents the transaction, and a value that indicates the state of the transaction.- Specified by:
getGlobalTIDin interfaceJControlOperations- Parameters:
status- An object to hold the status value, or null.- Returns:
- The global identifier.
- Throws:
org.omg.CORBA.SystemException- An error occurred. The minor code indicates the reason for the exception.
-
getLocalTID
public long getLocalTID(org.omg.CosTransactions.StatusHolder status) throws org.omg.CORBA.SystemExceptionReturns the identifier that locally represents the transaction, and a value that indicates the state of the transaction.If the transaction represented by the Control object has been completed, the identifier is still returned if possible.
- Specified by:
getLocalTIDin interfaceJControlOperations- Parameters:
status- An object to hold the status value, or null.- Returns:
- The local transaction identifier.
- Throws:
org.omg.CORBA.SystemException- An error occurred. The minor code indicates the reason for the exception.
-
get_terminator
public org.omg.CosTransactions.Terminator get_terminator() throws org.omg.CosTransactions.Unavailable, org.omg.CORBA.SystemExceptionReturns the Terminator object for the transaction. We raise the Unavailable exception when there is no Terminator. If the transaction has been completed, an appropriate exception is raised. This operation is part of the OMG interface and must not return any exceptions other than those defined in the OMG interface.- Specified by:
get_terminatorin interfaceorg.omg.CosTransactions.ControlOperations- Returns:
- The Terminator for the transaction.
- Throws:
org.omg.CosTransactions.Unavailable- The Terminator object is not available.org.omg.CORBA.SystemException- The operation failed.
-
get_localTerminator
public org.omg.CosTransactions.Terminator get_localTerminator() throws org.omg.CosTransactions.Unavailable, org.omg.CORBA.SystemException- Throws:
org.omg.CosTransactions.Unavailableorg.omg.CORBA.SystemException
-
get_coordinator
public org.omg.CosTransactions.Coordinator get_coordinator() throws org.omg.CosTransactions.Unavailable, org.omg.CORBA.SystemExceptionReturns the Coordinator for the transaction. If the transaction has been completed, an appropriate exception is raised. This operation is part of the OMG interface and must not return any exceptions other than those defined in the OMG interface.- Specified by:
get_coordinatorin interfaceorg.omg.CosTransactions.ControlOperations- Returns:
- The Coordinator for the transaction.
- Throws:
org.omg.CosTransactions.Unavailable- The Coordinator is not available.org.omg.CORBA.SystemException- The operation failed.
-
get_localCoordinator
public org.omg.CosTransactions.Coordinator get_localCoordinator() throws org.omg.CosTransactions.Unavailable, org.omg.CORBA.SystemExceptionReturns the Coordinator for the transaction. If the transaction has been completed, an appropriate exception is raised. This operation is part of the OMG interface and must not return any exceptions other than those defined in the OMG interface.- Returns:
- The Coordinator for the transaction.
- Throws:
org.omg.CosTransactions.Unavailable- The Coordinator is not available.org.omg.CORBA.SystemException- The operation failed.
-
getTranState
public org.omg.CosTransactions.Status getTranState()
Returns the state of the transaction as the Control object knows it.- Specified by:
getTranStatein interfaceJControlOperations- Returns:
- The transaction state.
-
setTranState
public void setTranState(org.omg.CosTransactions.Status newState)
Sets the state of the transaction as the Control object knows it. No checking is done to verify the state change is valid.- Specified by:
setTranStatein interfaceJControlOperations- Parameters:
int- The new state.
-
servant
public static final ControlImpl servant(JControl control)
Returns the ControlImpl which serves the given object.- Parameters:
The- CORBA Object.- Returns:
- The ControlImpl object which serves it.
-
equals
public boolean equals(Object o)
Added to prevent null delegate problem.
-
hashCode
public int hashCode()
Added because this class overrides equals() method.
-
_duplicate
public org.omg.CORBA.Object _duplicate()
- Specified by:
_duplicatein interfaceorg.omg.CORBA.Object
-
_release
public void _release()
- Specified by:
_releasein interfaceorg.omg.CORBA.Object
-
_is_a
public boolean _is_a(String repository_id)
- Specified by:
_is_ain interfaceorg.omg.CORBA.Object- Overrides:
_is_ain classorg.omg.PortableServer.Servant
-
_is_equivalent
public boolean _is_equivalent(org.omg.CORBA.Object that)
- Specified by:
_is_equivalentin interfaceorg.omg.CORBA.Object
-
_non_existent
public boolean _non_existent()
- Specified by:
_non_existentin interfaceorg.omg.CORBA.Object- Overrides:
_non_existentin classorg.omg.PortableServer.Servant
-
_hash
public int _hash(int maximum)
- Specified by:
_hashin interfaceorg.omg.CORBA.Object
-
_request
public org.omg.CORBA.Request _request(String operation)
- Specified by:
_requestin interfaceorg.omg.CORBA.Object
-
_create_request
public org.omg.CORBA.Request _create_request(org.omg.CORBA.Context ctx, String operation, org.omg.CORBA.NVList arg_list, org.omg.CORBA.NamedValue result)- Specified by:
_create_requestin interfaceorg.omg.CORBA.Object
-
_create_request
public org.omg.CORBA.Request _create_request(org.omg.CORBA.Context ctx, String operation, org.omg.CORBA.NVList arg_list, org.omg.CORBA.NamedValue result, org.omg.CORBA.ExceptionList exceptions, org.omg.CORBA.ContextList contexts)- Specified by:
_create_requestin interfaceorg.omg.CORBA.Object
-
_get_interface_def
public org.omg.CORBA.Object _get_interface_def()
- Specified by:
_get_interface_defin interfaceorg.omg.CORBA.Object- Overrides:
_get_interface_defin classorg.omg.PortableServer.Servant
-
_get_policy
public org.omg.CORBA.Policy _get_policy(int policy_type)
- Specified by:
_get_policyin interfaceorg.omg.CORBA.Object
-
_get_domain_managers
public org.omg.CORBA.DomainManager[] _get_domain_managers()
- Specified by:
_get_domain_managersin interfaceorg.omg.CORBA.Object
-
_set_policy_override
public org.omg.CORBA.Object _set_policy_override(org.omg.CORBA.Policy[] policies, org.omg.CORBA.SetOverrideType set_add)- Specified by:
_set_policy_overridein interfaceorg.omg.CORBA.Object
-
-