com.ls.lars.communication
Class ClientMessengerFactory

java.lang.Object
  |
  +--com.ls.lars.communication.ClientMessengerFactory

public class ClientMessengerFactory
extends Object

This messenger factory returns an instance of one of several possible messenger classes depending on the data provided to it. All messengers returned by this class have the common parent class Messenger and common methods, but each messenger performs his task (bearer of messages) differently.

Note: A messenger returned by this class reacts as a client side messenger when starting the connection protocol. Therefore the MessengerFactory cannot be used for implementing listeners (components, that wait for incoming communication requests).

Version:
$Revision: 1.8 $
Author:
Last modified by $Author: MFehrenbach $

Constructor Summary
ClientMessengerFactory()
           
 
Method Summary
static com.ls.lars.communication.Messenger getMessenger(String agentName, Map parameterList)
          Creates a messenger depending on the type specified in the parameterList.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientMessengerFactory

public ClientMessengerFactory()
Method Detail

getMessenger

public static com.ls.lars.communication.Messenger getMessenger(String agentName,
                                                               Map parameterList)
                                                        throws ConnectionException
Creates a messenger depending on the type specified in the parameterList.
Parameters:
agentName - the name of the agent, the created messenger is for
parameterList - the list with parameters
Returns:
a new messenger
Throws:
ConnectionException - If a connection cannot be established