solar.service.transport
Interface TransportService

All Superinterfaces:
EventHandler, RequestHandler, Service
All Known Implementing Classes:
BaseTransportService

public interface TransportService
extends Service

Interface for transport network layer, either based on IP or P2P.

Version:
$Id: TransportService.java,v 1.14 2003/10/05 18:51:04 glchen Exp $
Author:
Guanling Chen

Method Summary
 void addTransportListener(TransportListener listener)
          Add a transport listener.
 Address getAddressByKey(java.lang.String key)
          Return a peer address based on the specified key.
 Address getLocalAddress()
          Return local address for this transport service.
 Transport getTransport()
          Return the transport module (dealing with individual protocol).
 void removeTransportListener(TransportListener listener)
          Remove a transport listener.
 void send(Adu adu, Address dest)
          Send an application data unit to destination address.
 void send(Adu adu, Address dest, Id multiplex)
          Send an application data unit to destination address.
 
Methods inherited from interface solar.service.Service
getName, getServiceManager, handleDispatchUnit, hasInited, init, initDependents, setName, setServiceManager, start, stop
 
Methods inherited from interface solar.api.EventHandler
handleEvent
 
Methods inherited from interface solar.api.RequestHandler
handleRequest
 

Method Detail

getLocalAddress

public Address getLocalAddress()
Return local address for this transport service.


getAddressByKey

public Address getAddressByKey(java.lang.String key)
                        throws TransportException
Return a peer address based on the specified key.

TransportException

getTransport

public Transport getTransport()
Return the transport module (dealing with individual protocol).


send

public void send(Adu adu,
                 Address dest)
          throws TransportException
Send an application data unit to destination address.

TransportException

send

public void send(Adu adu,
                 Address dest,
                 Id multiplex)
          throws TransportException
Send an application data unit to destination address.

TransportException

addTransportListener

public void addTransportListener(TransportListener listener)
Add a transport listener.


removeTransportListener

public void removeTransportListener(TransportListener listener)
Remove a transport listener.