fr.dyade.aaa.agent
Interface MessageConsumer
- HttpNetwork, Network, NGNetwork, PoolNetwork, SimpleNetwork, SSLNetwork, StreamNetwork
public interface MessageConsumer
The parent interface for all messages consumers.
Network.
void | delete() - Deletes the component, removes all persistent datas.
|
String | getDomainName() - Returns the corresponding domain's name.
|
String | getName() - Returns this
MessageConsumer 's name.
|
fr.dyade.aaa.agent.MessageQueue | getQueue() - Get this consumer's
MessageQueue .
|
void | insert(fr.dyade.aaa.agent.Message msg) - Insert a message in the
MessageQueue .
|
boolean | isRunning() - Tests if the component is alive.
|
void | post(fr.dyade.aaa.agent.Message msg) - Adds a message in "ready to deliver" list.
|
void | restore() - Restores logical clock information from persistent storage.
|
void | save() - Saves logical clock information to persistent storage.
|
void | start() - Causes this component to begin execution.
|
void | stop() - Forces the component to stop executing.
|
void | validate() - Validates all messages pushed in queue during transaction session.
|
delete
public void delete()
throws IllegalStateException
Deletes the component, removes all persistent datas. The component
may have been previously stopped, and removed from MessageConsumer
list.
This operation use Transaction calls, you may use commit to validate it.
Transaction
getDomainName
public String getDomainName()
Returns the corresponding domain's name.
- this domain's name.
getName
public String getName()
Returns this MessageConsumer
's name.
- this
MessageConsumer
's name.
getQueue
public fr.dyade.aaa.agent.MessageQueue getQueue()
Get this consumer's MessageQueue
. Use in administration and
debug tasks, should be replaced by a common attribute.
- this
MessageConsumer
's queue.
insert
public void insert(fr.dyade.aaa.agent.Message msg)
Insert a message in the MessageQueue
.
This method is used during initialisation to restore the component
state from persistent storage.
msg
- the message
isRunning
public boolean isRunning()
Tests if the component is alive. A MessageConsumer
is alive
if it has been started and has not yet stopped.
- true if this
MessageConsumer
is alive; false
otherwise.
post
public void post(fr.dyade.aaa.agent.Message msg)
throws Exception
Adds a message in "ready to deliver" list. This method allocates a
new time stamp to the message ; be Careful, changing the stamp imply
the filename change too.
restore
public void restore()
throws Exception
Restores logical clock information from persistent storage.
save
public void save()
throws IOException
Saves logical clock information to persistent storage.
start
public void start()
throws Exception
Causes this component to begin execution.
stop
stop
public void stop()
Forces the component to stop executing.
start
validate
public void validate()
Validates all messages pushed in queue during transaction session.
Copyright B) 2004 Scalagent - All rights reserved