|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Represents a context.
| Field Summary | |
static int |
CURRENT_CONTEXT
Constant representing the recently used context. |
static int |
FINAL
Constant representing a final state. |
static int |
INITIAL
Constant representing the initial state. |
static int |
NEW_CONTEXT
Constant representing a new context. |
static int |
NO_CONTEXT
Constant representing a non-defined context. |
static short |
SEMISTABLE
Constant representing a semistable state. |
static short |
STABLE
Constant representing a stable state. |
static short |
UNSTABLE
Constant representing an unstable state. |
| Method Summary | |
int |
getContextID()
Returns the ID of this context. |
short |
getMode()
Returns the mode of this context (stable, unstable, semistable). |
AMETASPlaceUser |
getPlaceUser()
Returns a reference to the Place User. |
AMETASServiceObject |
getServiceObject()
Returns the reference to the service object. |
int |
getStateID()
Return the current state of the context by its ID. |
void |
nextState(int nStateID,
short nMode)
Makes the context proceed to the next state. |
void |
processMessage(AMETASMessage msg)
Processes the message. |
void |
setContextID(int nID)
Sets the ID of this context. |
void |
setParameters(java.lang.Object[] aParam)
Set the parameters of the context. |
void |
setPlaceUser(AMETASPlaceUser pu)
Sets the reference to the Place User. |
void |
setServiceObject(AMETASServiceObject so)
Defines the reference to the service object. |
| Field Detail |
public static final int NO_CONTEXT
public static final int CURRENT_CONTEXT
public static final int NEW_CONTEXT
public static final int FINAL
public static final int INITIAL
public static final short STABLE
public static final short UNSTABLE
public static final short SEMISTABLE
| Method Detail |
public void setContextID(int nID)
nID - Context ID.public int getContextID()
public void setPlaceUser(AMETASPlaceUser pu)
pu - Reference to the Place User.public AMETASPlaceUser getPlaceUser()
public void setServiceObject(AMETASServiceObject so)
public AMETASServiceObject getServiceObject()
public int getStateID()
public void nextState(int nStateID,
short nMode)
nStateID - ID of the new state.nMode - Stability of the new state (STABLE, UNSTABLE, SEMISTABLE).public short getMode()
public void setParameters(java.lang.Object[] aParam)
aParam - Parameters.
public void processMessage(AMETASMessage msg)
throws MessagePushbackException,
MessageRejectedException,
ContextTerminatedException
msg - Message to be processed. Must be null when the current state is unstable
in this context.
MessagePushbackException - when the message is not processed but neither
rejected. This is required for semistable states when the state shall proceed along
the unstable path even though there were a suitable message.
MessageRejectedException - when the message is not accepted by the context
in the current state.
ContextTerminatedException - when the context processing must be aborted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||