com.agentfactory.platform.service
Class PlatformServiceManager

java.lang.Object
  extended by java.util.Observable
      extended by com.agentfactory.platform.service.PlatformServiceManager

public class PlatformServiceManager
extends java.util.Observable

This class implements management functionality to support the activation of multiple message transport services on a single agent platform. TODO - robertr - 13-Aug-2004 - Rem, is a factory initialisation needed for the manager itself? TODO - robertr - 13-Aug-2004 - Should this class, along with the other service classes be added into the main Agent Factory platform. Otherwise, should all agent management system stuff be removed from the agent factory platform, and just kept as a plugin.


Field Summary
static int CLASS_LOG_LEVEL
           
 
Method Summary
 void addService(PlatformService inService)
          Registers a FIPA message transport service with the manager, which in turn starts the service.
 void addService(PlatformServiceDescriptor descriptor)
          Second method that allows the class name (in string form) to be used to add a FIPA message transport service.
 PlatformService bindToService(java.lang.String name, Agent agent)
           
 AgentPlatform getAgentPlatform()
           
 java.util.ArrayList getAvailableMTS(java.lang.String name)
           
 java.lang.String getPlatformName()
           
 PlatformService getService(java.lang.String name)
           
 PlatformService getService(java.lang.String name, AgentPlatform platform)
           
 java.util.ArrayList getServiceNames()
           
 java.lang.String getServiceType(java.lang.String name)
           
static PlatformServiceManager newInstance(AgentPlatform agentPlatform)
          Factory method that returns a message transport manager instance.
static PlatformServiceManager newInstance(java.util.Vector descriptors, AgentPlatform agentPlatform)
          Factory method that returns a message transport manager instance.
 void removeService(java.lang.String id)
           
 void shutdown()
          Method used to shtudown all Message Transport Services registered to this MessageTransportManager
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_LOG_LEVEL

public static final int CLASS_LOG_LEVEL
See Also:
Constant Field Values
Method Detail

newInstance

public static PlatformServiceManager newInstance(AgentPlatform agentPlatform)
Factory method that returns a message transport manager instance.


newInstance

public static PlatformServiceManager newInstance(java.util.Vector descriptors,
                                                 AgentPlatform agentPlatform)
Factory method that returns a message transport manager instance.


addService

public void addService(PlatformService inService)
Registers a FIPA message transport service with the manager, which in turn starts the service.

Parameters:
inService - the message transport service to be registered.

addService

public void addService(PlatformServiceDescriptor descriptor)
Second method that allows the class name (in string form) to be used to add a FIPA message transport service. This method creates an instance of the service, and delegates the other addMessageTransport method.

Parameters:
descriptor - a descriptor for the message transport service to be created.

removeService

public void removeService(java.lang.String id)

shutdown

public void shutdown()
Method used to shtudown all Message Transport Services registered to this MessageTransportManager


bindToService

public PlatformService bindToService(java.lang.String name,
                                     Agent agent)

getPlatformName

public java.lang.String getPlatformName()

getAgentPlatform

public AgentPlatform getAgentPlatform()

getServiceNames

public java.util.ArrayList getServiceNames()

getService

public PlatformService getService(java.lang.String name)

getServiceType

public java.lang.String getServiceType(java.lang.String name)

getService

public PlatformService getService(java.lang.String name,
                                  AgentPlatform platform)

getAvailableMTS

public java.util.ArrayList getAvailableMTS(java.lang.String name)