fr.dyade.aaa.agent
Interface MessageConsumer

All Known Implementing Classes:
Network

public interface MessageConsumer

The parent interface for all messages consumers.

See Also:
Engine, Network.

Method Summary
 void delete()
          Deletes the component, removes all persistent datas.
 java.lang.String getDomainName()
          Returns the corresponding domain's name.
 java.lang.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.
 

Method Detail

getName

public java.lang.String getName()
Returns this MessageConsumer's name.

Returns:
this MessageConsumer's name.

getDomainName

public java.lang.String getDomainName()
Returns the corresponding domain's name.

Returns:
this domain's name.

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.

Parameters:
msg - the message

save

public void save()
          throws java.io.IOException
Saves logical clock information to persistent storage.

Throws:
java.io.IOException

restore

public void restore()
             throws java.lang.Exception
Restores logical clock information from persistent storage.

Throws:
java.lang.Exception

post

public void post(fr.dyade.aaa.agent.Message msg)
          throws java.lang.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.

Throws:
java.lang.Exception

validate

public void validate()
Validates all messages pushed in queue during transaction session.


start

public void start()
           throws java.lang.Exception
Causes this component to begin execution.

Throws:
java.lang.Exception
See Also:
stop

stop

public void stop()
Forces the component to stop executing.

See Also:
start

delete

public void delete()
            throws java.lang.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.

Throws:
java.lang.IllegalStateException
See Also:
Transaction

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.

Returns:
this MessageConsumer's queue.

isRunning

public boolean isRunning()
Tests if the component is alive. A MessageConsumer is alive if it has been started and has not yet stopped.

Returns:
true if this MessageConsumer is alive; false otherwise.


Copyright ? 2004 Scalagent - All rights reserved