public abstract class AbstractTupleCentreOperation extends java.lang.Object implements ITupleCentreOperation
Modifier and Type | Field and Description |
---|---|
protected OperationCompletionListener |
listener |
protected boolean |
operationCompleted |
protected static int |
OPTYPE_ABORT_OP |
protected static int |
OPTYPE_ADD_INSP |
protected static int |
OPTYPE_ADD_OBS |
protected static int |
OPTYPE_GET |
protected static int |
OPTYPE_GET_INSPS |
protected static int |
OPTYPE_GET_S |
protected static int |
OPTYPE_GET_TRSET |
protected static int |
OPTYPE_GET_TSET |
protected static int |
OPTYPE_GET_WSET |
protected static int |
OPTYPE_GO_CMD |
protected static int |
OPTYPE_HAS_INSP |
protected static int |
OPTYPE_HAS_OBS |
protected static int |
OPTYPE_IN |
protected static int |
OPTYPE_IN_ALL |
protected static int |
OPTYPE_IN_S |
protected static int |
OPTYPE_INP |
protected static int |
OPTYPE_INP_S |
static int |
OPTYPE_IS_STEP_MODE |
protected static int |
OPTYPE_NEXT_STEP |
protected static int |
OPTYPE_NO |
protected static int |
OPTYPE_NO_ALL |
protected static int |
OPTYPE_NO_S |
protected static int |
OPTYPE_NOP |
protected static int |
OPTYPE_NOP_S |
protected static int |
OPTYPE_OUT |
protected static int |
OPTYPE_OUT_ALL |
protected static int |
OPTYPE_OUT_S |
protected static int |
OPTYPE_RD |
protected static int |
OPTYPE_RD_ALL |
protected static int |
OPTYPE_RD_S |
protected static int |
OPTYPE_RDP |
protected static int |
OPTYPE_RDP_S |
protected static int |
OPTYPE_RMV_INSP |
protected static int |
OPTYPE_RMV_OBS |
protected static int |
OPTYPE_SET |
protected static int |
OPTYPE_SET_S |
protected static int |
OPTYPE_SET_SPY |
protected static int |
OPTYPE_SET_WSET |
protected static int |
OPTYPE_SPAWN |
protected static int |
OPTYPE_STEP_MODE |
protected static int |
OPTYPE_STOP_CMD |
protected static int |
OPTYPE_UIN |
protected static int |
OPTYPE_UINP |
protected static int |
OPTYPE_UNO |
protected static int |
OPTYPE_UNOP |
protected static int |
OPTYPE_URD |
protected static int |
OPTYPE_URDP |
protected static int |
RESET |
protected java.lang.Object |
token
used for possible synchronisation
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractTupleCentreOperation(int t,
java.util.List<Tuple> tupleList) |
protected |
AbstractTupleCentreOperation(int t,
java.util.List<Tuple> tupleList,
OperationCompletionListener l) |
protected |
AbstractTupleCentreOperation(int ty,
Tuple t) |
protected |
AbstractTupleCentreOperation(int ty,
Tuple t,
OperationCompletionListener l) |
protected |
AbstractTupleCentreOperation(int ty,
TupleTemplate t) |
protected |
AbstractTupleCentreOperation(int ty,
TupleTemplate t,
OperationCompletionListener l) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(OperationCompletionListener lis) |
long |
getId()
Get operation identifier
|
Tuple |
getPredicate() |
Tuple |
getPrimitive() |
TupleTemplate |
getTemplateArgument() |
Tuple |
getTupleArgument() |
java.util.List<Tuple> |
getTupleListArgument() |
java.util.List<Tuple> |
getTupleListResult() |
Tuple |
getTupleResult() |
int |
getType() |
boolean |
isGet() |
boolean |
isGetS() |
boolean |
isIn() |
boolean |
isInAll() |
boolean |
isInp() |
boolean |
isInpS() |
boolean |
isInS() |
boolean |
isNo() |
boolean |
isNoAll() |
boolean |
isNop() |
boolean |
isNopS() |
boolean |
isNoS() |
boolean |
isOperationCompleted()
Tests if the operation is completed
|
boolean |
isOut() |
boolean |
isOutAll() |
boolean |
isOutS() |
boolean |
isRd() |
boolean |
isRdAll() |
boolean |
isRdp() |
boolean |
isRdpS() |
boolean |
isRdS() |
boolean |
isResultDefined()
Tests if the result is defined
|
boolean |
isResultFailure() |
boolean |
isResultSuccess() |
boolean |
isSet() |
boolean |
isSetS() |
boolean |
isSpawn() |
boolean |
isUin() |
boolean |
isUinp() |
boolean |
isUno() |
boolean |
isUnop() |
boolean |
isUrd() |
boolean |
isUrdp() |
void |
notifyCompletion()
Changes the state of the operation to complete.
|
void |
removeListener() |
void |
setListener(OperationCompletionListener l) |
void |
setOpResult(TCCycleResult.Outcome o) |
void |
setTupleListResult(java.util.List<Tuple> t) |
void |
setTupleResult(Tuple t) |
void |
waitForOperationCompletion()
Wait for operation completion
Current execution flow is blocked until the operation is completed
|
void |
waitForOperationCompletion(long ms)
Wait for operation completion, with time out
Current execution flow is blocked until the operation is completed or a
maximum waiting time is elapsed
|
public static final int OPTYPE_IS_STEP_MODE
protected static final int OPTYPE_ABORT_OP
protected static final int OPTYPE_ADD_INSP
protected static final int OPTYPE_ADD_OBS
protected static final int OPTYPE_GET
protected static final int OPTYPE_GET_INSPS
protected static final int OPTYPE_GET_S
protected static final int OPTYPE_GET_TRSET
protected static final int OPTYPE_GET_TSET
protected static final int OPTYPE_GET_WSET
protected static final int OPTYPE_GO_CMD
protected static final int OPTYPE_HAS_INSP
protected static final int OPTYPE_HAS_OBS
protected static final int OPTYPE_IN
protected static final int OPTYPE_IN_ALL
protected static final int OPTYPE_IN_S
protected static final int OPTYPE_INP
protected static final int OPTYPE_INP_S
protected static final int OPTYPE_NEXT_STEP
protected static final int OPTYPE_NO
protected static final int OPTYPE_NO_ALL
protected static final int OPTYPE_NO_S
protected static final int OPTYPE_NOP
protected static final int OPTYPE_NOP_S
protected static final int OPTYPE_OUT
protected static final int OPTYPE_OUT_ALL
protected static final int OPTYPE_OUT_S
protected static final int OPTYPE_RD
protected static final int OPTYPE_RD_ALL
protected static final int OPTYPE_RD_S
protected static final int OPTYPE_RDP
protected static final int OPTYPE_RDP_S
protected static final int OPTYPE_RMV_INSP
protected static final int OPTYPE_RMV_OBS
protected static final int OPTYPE_SET
protected static final int OPTYPE_SET_S
protected static final int OPTYPE_SET_SPY
protected static final int OPTYPE_SET_WSET
protected static final int OPTYPE_SPAWN
protected static final int OPTYPE_STEP_MODE
protected static final int OPTYPE_STOP_CMD
protected static final int OPTYPE_UIN
protected static final int OPTYPE_UINP
protected static final int OPTYPE_UNO
protected static final int OPTYPE_UNOP
protected static final int OPTYPE_URD
protected static final int OPTYPE_URDP
protected static final int RESET
protected OperationCompletionListener listener
protected boolean operationCompleted
protected java.lang.Object token
protected AbstractTupleCentreOperation(int t, java.util.List<Tuple> tupleList)
t
- the type code of the operationtupleList
- the list of tuples argument of the operationprotected AbstractTupleCentreOperation(int t, java.util.List<Tuple> tupleList, OperationCompletionListener l)
t
- the type code of the operationtupleList
- the list of tuples argument of the operationl
- the listener for operation completionprotected AbstractTupleCentreOperation(int ty, Tuple t)
ty
- the type code of the operationt
- the tuple argument of the operationprotected AbstractTupleCentreOperation(int ty, Tuple t, OperationCompletionListener l)
ty
- the type code of the operationt
- the tuple argument of the operationl
- the listener for operation completionprotected AbstractTupleCentreOperation(int ty, TupleTemplate t)
ty
- the type code of the operationt
- the tuple template argument of the operationprotected AbstractTupleCentreOperation(int ty, TupleTemplate t, OperationCompletionListener l)
ty
- the type code of the operationt
- the tuple template argument of the operationl
- the listener for operation completionpublic void addListener(OperationCompletionListener lis)
lis
- the listener for operation completion to addpublic long getId()
getId
in interface ITupleCentreOperation
public Tuple getPredicate()
public Tuple getPrimitive()
public TupleTemplate getTemplateArgument()
getTemplateArgument
in interface ITupleCentreOperation
public Tuple getTupleArgument()
getTupleArgument
in interface ITupleCentreOperation
public java.util.List<Tuple> getTupleListArgument()
getTupleListArgument
in interface ITupleCentreOperation
public java.util.List<Tuple> getTupleListResult()
getTupleListResult
in interface ITupleCentreOperation
public Tuple getTupleResult()
getTupleResult
in interface ITupleCentreOperation
public int getType()
public boolean isGet()
isGet
in interface ITupleCentreOperation
get
operationpublic boolean isGetS()
isGetS
in interface ITupleCentreOperation
get_s
operationpublic boolean isIn()
isIn
in interface ITupleCentreOperation
in
operationpublic boolean isInAll()
isInAll
in interface ITupleCentreOperation
in_all
operationpublic boolean isInp()
isInp
in interface ITupleCentreOperation
inp
operationpublic boolean isInpS()
inp_s
public boolean isInS()
in_s
public boolean isNo()
isNo
in interface ITupleCentreOperation
no
operationpublic boolean isNoAll()
isNoAll
in interface ITupleCentreOperation
no_all
public boolean isNop()
isNop
in interface ITupleCentreOperation
nop
operationpublic boolean isNopS()
nop_s
public boolean isNoS()
no_s
public boolean isOperationCompleted()
ITupleCentreOperation
isOperationCompleted
in interface ITupleCentreOperation
public boolean isOut()
isOut
in interface ITupleCentreOperation
out
operationpublic boolean isOutAll()
isOutAll
in interface ITupleCentreOperation
out_all
operationpublic boolean isOutS()
out_s
public boolean isRd()
isRd
in interface ITupleCentreOperation
rd
operationpublic boolean isRdAll()
isRdAll
in interface ITupleCentreOperation
rd_all
operationpublic boolean isRdp()
isRdp
in interface ITupleCentreOperation
rdp
operationpublic boolean isRdpS()
rdp_s
public boolean isRdS()
rd_s
public boolean isResultDefined()
public boolean isResultFailure()
isResultFailure
in interface ITupleCentreOperation
public boolean isResultSuccess()
isResultSuccess
in interface ITupleCentreOperation
public boolean isSet()
isSet
in interface ITupleCentreOperation
set
operationpublic boolean isSetS()
isSetS
in interface ITupleCentreOperation
set_s
operationpublic boolean isSpawn()
spawn
public boolean isUin()
isUin
in interface ITupleCentreOperation
uin
operationpublic boolean isUinp()
isUinp
in interface ITupleCentreOperation
uinp
operationpublic boolean isUno()
public boolean isUnop()
public boolean isUrd()
isUrd
in interface ITupleCentreOperation
urd
operationpublic boolean isUrdp()
isUrdp
in interface ITupleCentreOperation
urdp
operationpublic void notifyCompletion()
public void removeListener()
public void setListener(OperationCompletionListener l)
l
- the listener for operation completionpublic void setOpResult(TCCycleResult.Outcome o)
o
- the outcome of the operationpublic void setTupleListResult(java.util.List<Tuple> t)
t
- the list of tuples result of the operationpublic void setTupleResult(Tuple t)
t
- the tuple result of the operationpublic void waitForOperationCompletion()
ITupleCentreOperation
waitForOperationCompletion
in interface ITupleCentreOperation
public void waitForOperationCompletion(long ms) throws OperationTimeOutException
ITupleCentreOperation
waitForOperationCompletion
in interface ITupleCentreOperation
ms
- maximum waiting timeOperationTimeOutException
- if the given timeout expires prior to operation completion