|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectguarana.framework.task.Gateway
public class Gateway
Represents an entry/exit in a task. The gateway must be bound to as slot.
Constructor Summary | |
---|---|
Gateway(GatewayType type,
Task task)
Constructs a new gateway without a name, of an specific type and associates it with the given task. |
|
Gateway(String name,
GatewayType type,
Task task)
Constructs a new gateway with a given name, type and associates it with the given task. |
Method Summary | |
---|---|
void |
bind(Slot slot)
Binds an slot to this gateway. |
Message<?> |
getMessage()
Invoked only on an input gateway and returns a message to be processed. |
String |
getName()
Returns the name of this source. |
int |
getNumber()
Returns the corresponding number of this gateway. |
Slot |
getSlot()
Returns the slot associated with this gateway. |
GatewayType |
getType()
Returns the type of this slot. |
void |
setMessage(Message<?> message)
Invoked only on an output gateway to set an output message. |
void |
setName(String name)
Sets the name of this source. |
void |
setNumber(int number)
Sets the corresponding number of this gateway. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Gateway(GatewayType type, Task task)
type
- The type of this gateway.task
- The task to which this new gateway belongs.public Gateway(String name, GatewayType type, Task task)
name
- The name of this gateway.type
- The type of this new gateway.task
- The task to which this new gateway belongs.Method Detail |
---|
public void bind(Slot slot) throws InvalidParameterException
slot
- The slot.
InvalidParameterException
- if the slot parameter is null
.public Message<?> getMessage() throws NullPointerException
null
if there is no message.
NullPointerException
- if there is no Slot associated with this Gateway.public void setMessage(Message<?> message)
message
- The message to set as output in the output gateway.public void setName(String name)
setName
in interface ISource
name
- The name of this source.public String getName()
getName
in interface ISource
public Slot getSlot()
public GatewayType getType()
GatewayType
public void setNumber(int number)
number
- The corresponding number.public int getNumber()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |