|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class the interface for the GuardFilter
,
which holds up incoming and outgoing agents for auditing
purpose.
Method Summary | |
void |
activate(boolean flag)
This method activates or deactivates the guard filter. |
TrustedListener |
addListener(Listener listener)
Adds a Listener . |
AgentContext |
getAgentContext(String name)
Returns the AgentContext to the agent
with the given name, if the agents is waiting at the guard. |
SortedSet |
getAgentNames()
Returns the names of all agents, which are waiting at the guard. |
boolean |
isActivated()
Returns the current state of the guard filter. |
boolean |
rejectAgent(String name)
Descards the agent with the given name. |
boolean |
rejectAllAgents()
Descards all agents. |
boolean |
releaseAgent(String name)
Releases the agent with the given name by letting it pass the filter. |
boolean |
releaseAllAgents()
Releases all agent by letting it pass the filter. |
Method Detail |
public void activate(boolean flag)
flag
- true
to activate
false
to deactivate the filter.public boolean isActivated()
true
if the filter is activated,
false
otherwise.public TrustedListener addListener(Listener listener)
Listener
.
The Listener
will receive events of the type
String
every time an a change has occured
within the agent name list.
Listener
instances passed to this method shall
be wrapped in a TrustedListener
which is then
returned.
listener
- The Listener
to be registered.
TrustedListener
that wraps around
the given Listener
.
NullPointerException
- if listener
is null
.public SortedSet getAgentNames()
SortedSet
containing entries
of the type String
.public AgentContext getAgentContext(String name)
AgentContext
to the agent
with the given name, if the agents is waiting at the guard.
name
- The agent's name.
AgentContext
of the waiting agent,
null
otherwise.public boolean releaseAgent(String name)
name
- The agent's name.
true
if the agent with the
given name was waiting, false
otherwise.public boolean releaseAllAgents()
true
if at least one agent
was waiting, false
otherwise.public boolean rejectAgent(String name)
name
- The agent's name.
true
if the agent with the
given name was waiting, false
otherwise.public boolean rejectAllAgents()
true
if at least one agent
waiting, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |