kaos.core.service.transport.cougaar
Class CougaarTransportSystem

java.lang.Object
  extended by kaos.core.service.transport.cougaar.CougaarTransportSystem

public class CougaarTransportSystem
extends java.lang.Object


Constructor Summary
CougaarTransportSystem(CougaarServiceRoot sr)
           
 
Method Summary
 MessageTransportService getMessageTransportService(Locator l)
          Returns a message transport service capable of supporting the locators underlying message transport type.
 MessageTransportService[] getMessageTransportServices()
          Returns an myEnumeration of the available underlying message transport services.
 ServiceProperties getServiceProperties()
          Allows getter access to the services properties.
 MessageReceiver newMessageReceiver(JasBean env)
          A convenience method directed to a transport service specified by the provided environment returning a new message receiving endpoint.
 MessageSender newMessageSender(JasBean env)
          A convenience method directed to a transport service specified by the provided environment returning a new message sending endpoint.
 void sendMessage(TransportMessage msg)
          A convenience method directed to a message sending endpoint specified by the message receiver's locator.
 void sendMessage(TransportMessage msg, Locator loc)
          A convenience method directed to a message sending endpoint specified by the provided locator.
 void setServiceProperties(ServiceProperties props)
          Allows setter access to the services properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CougaarTransportSystem

public CougaarTransportSystem(CougaarServiceRoot sr)
Method Detail

getServiceProperties

public ServiceProperties getServiceProperties()
                                       throws ServiceException,
                                              ServiceFailure
Allows getter access to the services properties.

Returns:
the properties of the service.
Throws:
ServiceException
ServiceFailure

setServiceProperties

public void setServiceProperties(ServiceProperties props)
                          throws ServiceException,
                                 ServiceFailure
Allows setter access to the services properties.

Parameters:
props - setting a set of properties for the service.
Throws:
ServiceException
ServiceFailure

getMessageTransportServices

public MessageTransportService[] getMessageTransportServices()
                                                      throws TransportFailure
Returns an myEnumeration of the available underlying message transport services.

Returns:
an array of transport services available to the agent.
Throws:
TransportFailure - if any transport related failure occurs.

getMessageTransportService

public MessageTransportService getMessageTransportService(Locator l)
                                                   throws NotLocatableException,
                                                          TransportFailure
Returns a message transport service capable of supporting the locators underlying message transport type.

Parameters:
l - specifies the transport service required.
Returns:
a transport service specified by the argument.
Throws:
NotLocatableException - if a message transport service is not available supporting the specified locator.
TransportFailure - if any transport related failure occurs.

newMessageSender

public MessageSender newMessageSender(JasBean env)
                               throws NotLocatableException,
                                      TransportFailure
A convenience method directed to a transport service specified by the provided environment returning a new message sending endpoint.

Parameters:
env - the environment specifing a particular transport service.
Returns:
MessageSender a message sending endpoint capable of supporting the specified environment.
Throws:
NotLocatableException - if a message transport service is not available supporting the specified environment.
TransportFailure - if any transport related failure occurs.

newMessageReceiver

public MessageReceiver newMessageReceiver(JasBean env)
                                   throws NotLocatableException,
                                          TransportFailure
A convenience method directed to a transport service specified by the provided environment returning a new message receiving endpoint.

Parameters:
env - the environment specifing a particular transport service.
Returns:
MessageReceiver a message receiving endpoint capable of supporting the specified environment.
Throws:
NotLocatableException - if a message transport service is not available supporting the specified environment.
TransportFailure - if any transport related failure occurs.

sendMessage

public void sendMessage(TransportMessage msg)
                 throws NotLocatableException,
                        NoSuchTransportException,
                        TransportFailure
A convenience method directed to a message sending endpoint specified by the message receiver's locator.

Parameters:
msg - the message to send to the receiving agent.
Throws:
NotLocatableException - if the receiver's implicit Locator does not correspond to a remote endpoint.
NoSuchTransportException - if a message transport service is not available to support the specified environment
TransportFailure - if any transport related failure occurs.

sendMessage

public void sendMessage(TransportMessage msg,
                        Locator loc)
                 throws NotLocatableException,
                        NoSuchTransportException,
                        TransportFailure
A convenience method directed to a message sending endpoint specified by the provided locator.

Parameters:
msg - the message to send to the receiving agent.
loc - the Locator of the receiving agent.
Throws:
NotLocatableException - if loc does not correspond to a remote endpoint.
NoSuchTransportException - if a message transport service is not available to support the specified environment
TransportFailure - if any transport related failure occurs.