examples.communication
Interface LauncherService

All Known Implementing Classes:
Launcher

public interface LauncherService

This interface is used as a service from examples.communication.Launcher in order to get information (error or identification) from the agents of type examples.communication.Agent.

Author:
Zaharina Velikova, Jan Peters
See Also:
Launcher

Field Summary
static String PUBLISH_KEY
          The key under wich this service is going to be published.
 
Method Summary
 void reportError(String nickName, Throwable throwable)
          When an agent throws an exception(error) it should report it to the others using its nickname and the exception object(error).
 boolean reportName(String nickName, String implicitName, String servicePath, int type)
          When an agent is created it informs the launcher for his implicit name, nickname, the path under which it has published its AgentService interface and its type(Sender, Receiver or Transceiver).
 

Field Detail

PUBLISH_KEY

public static final String PUBLISH_KEY
The key under wich this service is going to be published.

Method Detail

reportError

public void reportError(String nickName,
                        Throwable throwable)
When an agent throws an exception(error) it should report it to the others using its nickname and the exception object(error).

Parameters:
nickName - the nickname of the agent which throws an exception throwable the Throwable object.
throwable - DOCUMENT ME!

reportName

public boolean reportName(String nickName,
                          String implicitName,
                          String servicePath,
                          int type)
When an agent is created it informs the launcher for his implicit name, nickname, the path under which it has published its AgentService interface and its type(Sender, Receiver or Transceiver).

Parameters:
nickName - the String representation of the nickname of the agent. implicitName the String representation of the implicit name of the agent. servicePath the String representation of the path under which the agent has published its AgentService. type 1 = SENDER 2 = RECEIVER 3 = TRANSCEIVER
implicitName - DOCUMENT ME!
servicePath - DOCUMENT ME!
type - DOCUMENT ME!
Returns:
true - if there were no error while transferring the parameters false - otherwise


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.