public final class TupleCentreContainer
extends java.lang.Object
public static RespectTC createTC(TucsonTupleCentreId id, int q, int defPort) throws InvalidTupleCentreIdException
id
- the identifier of the tuple centre this wrapper refers toq
- the size of the input queuedefPort
- the default listening portInvalidTupleCentreIdException
- if the given tuple centre identifier is not a valid TuCSoN
tuple centre identifierpublic static void destroyTC()
public static void disablePersistency(TucsonTupleCentreId ttcid, java.lang.String persistencyPath)
ttcid
- the id of the tuple centre to make persistentpersistencyPath
- the path where to store persistency informationpublic static java.lang.Object doBlockingOperation(int type, TucsonAgentId aid, TucsonTupleCentreId tid, java.lang.Object o) throws TucsonInvalidLogicTupleException, TucsonOperationNotPossibleException
type
- the type code of the operation requestedaid
- the identifier of the agent requesting the operationtid
- the identifier of the tuple centre target of the operationo
- the tuple or tuples list argument of the operationTucsonInvalidLogicTupleException
- if the given argument is not a valid tuple or tuples listTucsonOperationNotPossibleException
- if the operation cannot be performedpublic static java.lang.Object doBlockingOperation(int type, TucsonTupleCentreId aid, TucsonTupleCentreId tid, LogicTuple t) throws TucsonInvalidLogicTupleException, TucsonOperationNotPossibleException
type
- the type code of the operation requestedaid
- the identifier of the tuple centre requesting the operationtid
- the identifier of the tuple centre target of the operationt
- the tuple or argument of the operationTucsonInvalidLogicTupleException
- if the given argument is not a valid tuple or tuples listTucsonOperationNotPossibleException
- if the operation cannot be performedpublic static java.lang.Object doBlockingSpecOperation(int type, TucsonAgentId aid, TucsonTupleCentreId tid, LogicTuple t) throws TucsonOperationNotPossibleException, TucsonInvalidSpecificationException
type
- the type code of the operation requestedaid
- the identifier of the agent requesting the operationtid
- the identifier of the tuple centre target of the operationt
- the tuple argument of the operationTucsonOperationNotPossibleException
- if the operation cannot be performedTucsonInvalidSpecificationException
- if the given tuple is not a valid representation of a ReSpecT
specificationpublic static java.lang.Object doBlockingSpecOperation(int type, TucsonTupleCentreId tcid, TucsonTupleCentreId tid, LogicTuple t) throws TucsonOperationNotPossibleException, TucsonInvalidSpecificationException
type
- the type code of the operation requestedtcid
- the identifier of the tuple centre requesting the operationtid
- the identifier of the tuple centre target of the operationt
- the tuple argument of the operationTucsonOperationNotPossibleException
- if the operation cannot be performedTucsonInvalidSpecificationException
- if the given tuple is not a valid representation of a ReSpecT
specificationpublic static ITupleCentreOperation doEnvironmentalOperation(int type, TucsonAgentId aid, TucsonTupleCentreId tid, LogicTuple t, OperationCompletionListener l) throws OperationTimeOutException, TucsonOperationNotPossibleException, UnreachableNodeException
type
- the type codeof the ReSpecT operation to be executedaid
- the identifier of the TuCSoN agent requesting the operationtid
- the identifier of the tuple centre target of the operationt
- the tuple argument of the operationl
- the listener for operation completionTucsonOperationNotPossibleException
- if the requested operation cannot be performed for some
reasonUnreachableNodeException
- if the TuCSoN tuple centre target of the notification cannot
be reached over the networkOperationTimeOutException
- if the notification operation expires timeoutpublic static ITupleCentreOperation doEnvironmentalOperation(int type, TucsonTupleCentreId aid, TucsonTupleCentreId tid, LogicTuple t, OperationCompletionListener l) throws TucsonOperationNotPossibleException, UnreachableNodeException, OperationTimeOutException
type
- the type codeof the ReSpecT operation to be executedaid
- the identifier of the tuple centre requesting the operationtid
- the identifier of the tuple centre target of the operationt
- the tuple argument of the operationl
- the listener for operation completionTucsonOperationNotPossibleException
- if the requested operation cannot be performed for some
reasonUnreachableNodeException
- if the TuCSoN tuple centre target of the notification cannot
be reached over the networkOperationTimeOutException
- if the notification operation expires timeoutpublic static java.lang.Object doManagementOperation(int type, TucsonTupleCentreId tid, java.lang.Object obj)
type
- the type code of the operation requestedtid
- the identifier of the tuple centre target of the operationobj
- the argument of the management operationpublic static ITupleCentreOperation doNonBlockingOperation(int type, TucsonAgentId aid, TucsonTupleCentreId tid, LogicTuple t, OperationCompletionListener l) throws TucsonInvalidLogicTupleException, TucsonOperationNotPossibleException
type
- the type code of the operation requestedaid
- the identifier of the agent requesting the operationtid
- the identifier of the tuple centre target of the operationt
- the tuple argument of the operationl
- the listener for operation completionTucsonInvalidLogicTupleException
- if the given tuple is not a valid representation of a tupleTucsonOperationNotPossibleException
- if the operation cannot be performedpublic static ITupleCentreOperation doNonBlockingOperation(int type, TucsonTupleCentreId tcid, TucsonTupleCentreId tid, LogicTuple t, OperationCompletionListener l) throws TucsonInvalidLogicTupleException, TucsonOperationNotPossibleException
type
- the type code of the operation requestedtcid
- the identifier of the tuple centre requesting the operationtid
- the identifier of the tuple centre target of the operationt
- the tuple argument of the operationl
- the listener for operation completionTucsonInvalidLogicTupleException
- if the given tuple is not a valid representation of a tupleTucsonOperationNotPossibleException
- if the operation cannot be performedpublic static ITupleCentreOperation doNonBlockingSpecOperation(int type, TucsonAgentId aid, TucsonTupleCentreId tid, LogicTuple t, OperationCompletionListener l) throws TucsonInvalidLogicTupleException, TucsonOperationNotPossibleException
type
- the type code of the operation requestedaid
- the identifier of the agent requesting the operationtid
- the identifier of the tuple centre target of the operationt
- the tuple argument of the operationl
- the listener for operation completionTucsonInvalidLogicTupleException
- if the given tuple is not a valid representation of a tupleTucsonOperationNotPossibleException
- if the operation cannot be performedpublic static ITupleCentreOperation doNonBlockingSpecOperation(int type, TucsonTupleCentreId tcid, TucsonTupleCentreId tid, LogicTuple t, OperationCompletionListener l) throws TucsonInvalidLogicTupleException, TucsonOperationNotPossibleException
type
- the type code of the operation requestedtcid
- the identifier of the tuple centre requesting the operationtid
- the identifier of the tuple centre target of the operationt
- the tuple argument of the operationl
- the listener for operation completionTucsonInvalidLogicTupleException
- if the given tuple is not a valid representation of a tupleTucsonOperationNotPossibleException
- if the operation cannot be performedpublic static void enablePersistency(TucsonTupleCentreId ttcid, java.lang.String persistencyPath)
ttcid
- the id of the tuple centre to make persistentpersistencyPath
- the path where to store persistency informationpublic static void recoveryPersistent(TucsonTupleCentreId ttcid, java.lang.String persistencyPath, java.lang.String file)
ttcid
- the id of the tuple centre to make persistentpersistencyPath
- the path where to store persistency informationfile
- the name of the file to recover