org.codehaus.xfire.transport
Class DefaultTransportManager

java.lang.Object
  extended by org.codehaus.xfire.transport.DefaultTransportManager
All Implemented Interfaces:
RegistrationEventListener, TransportManager
Direct Known Subclasses:
LoomTransportManager, PlexusTransportManager

public class DefaultTransportManager
extends java.lang.Object
implements TransportManager, RegistrationEventListener

The default TransportManager implementation.

Author:
Dan Diephouse

Field Summary
 
Fields inherited from interface org.codehaus.xfire.transport.TransportManager
ROLE
 
Constructor Summary
DefaultTransportManager()
           
DefaultTransportManager(ServiceRegistry registry)
          Creates a DefaultTransportManager.
 
Method Summary
 void disable(java.lang.String transport, java.lang.String serviceName)
           
 void disableAll(java.lang.String serviceName)
           
 void enable(java.lang.String transport, java.lang.String serviceName)
           
 void enableAll(java.lang.String serviceName)
           
 void endpointRegistered(RegistrationEvent event)
          Notifies this RegistrationEventListener that the ServiceEndpointRegistry has registered an endpoint.
 void endpointUnregistered(RegistrationEvent event)
          Notifies this RegistrationEventListener that the ServiceEndpointRegistry has deregistered an endpoint.
 ServiceRegistry getServiceRegistry()
           
 Transport getTransport(java.lang.String name)
           
 Transport getTransportForUri(java.lang.String uri)
          Find the best transport for a particular URI.
 java.util.Collection getTransports()
           
 java.util.Collection getTransports(java.lang.String service)
          Get the transports applicable to a particular service.
 void initialize()
          Initializes transports for each service.
protected  void initializeTransports()
           
 boolean isEnabled(java.lang.String service, java.lang.String transportName)
          Determine if a transport is enabled for a particular service.
 void register(Transport transport)
           
 void setServiceRegistry(ServiceRegistry serviceRegistry)
           
 void unregister(Transport transport)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTransportManager

public DefaultTransportManager()

DefaultTransportManager

public DefaultTransportManager(ServiceRegistry registry)
Creates a DefaultTransportManager. A LocalTransport and DeadLetterTransport are registered automatically.

Parameters:
xfire -
Method Detail

getServiceRegistry

public ServiceRegistry getServiceRegistry()

setServiceRegistry

public void setServiceRegistry(ServiceRegistry serviceRegistry)

initialize

public void initialize()
Initializes transports for each service. This also registers a LocalTransport and DeadLetterTransport.


initializeTransports

protected void initializeTransports()
Parameters:
registry -

register

public void register(Transport transport)
Specified by:
register in interface TransportManager

unregister

public void unregister(Transport transport)
Specified by:
unregister in interface TransportManager

getTransport

public Transport getTransport(java.lang.String name)
Specified by:
getTransport in interface TransportManager
See Also:
TransportManager.getTransports(java.lang.String)

enable

public void enable(java.lang.String transport,
                   java.lang.String serviceName)
Specified by:
enable in interface TransportManager

disable

public void disable(java.lang.String transport,
                    java.lang.String serviceName)
Specified by:
disable in interface TransportManager

getTransports

public java.util.Collection getTransports(java.lang.String service)
Description copied from interface: TransportManager
Get the transports applicable to a particular service.

Specified by:
getTransports in interface TransportManager
Parameters:
service -
Returns:
See Also:
TransportManager.getTransports(java.lang.String)

getTransports

public java.util.Collection getTransports()
Specified by:
getTransports in interface TransportManager

enableAll

public void enableAll(java.lang.String serviceName)
Specified by:
enableAll in interface TransportManager
Parameters:
serviceName -

disableAll

public void disableAll(java.lang.String serviceName)
Specified by:
disableAll in interface TransportManager
Parameters:
serviceName -

isEnabled

public boolean isEnabled(java.lang.String service,
                         java.lang.String transportName)
Description copied from interface: TransportManager
Determine if a transport is enabled for a particular service.

Specified by:
isEnabled in interface TransportManager
Parameters:
service -
transportName -
Returns:

endpointRegistered

public void endpointRegistered(RegistrationEvent event)
Notifies this RegistrationEventListener that the ServiceEndpointRegistry has registered an endpoint.

Specified by:
endpointRegistered in interface RegistrationEventListener
Parameters:
event - an event object describing the source of the event

endpointUnregistered

public void endpointUnregistered(RegistrationEvent event)
Notifies this RegistrationEventListener that the ServiceEndpointRegistry has deregistered an endpoint.

Specified by:
endpointUnregistered in interface RegistrationEventListener
Parameters:
event - an event object describing the source of the event

getTransportForUri

public Transport getTransportForUri(java.lang.String uri)
Description copied from interface: TransportManager
Find the best transport for a particular URI.

Specified by:
getTransportForUri in interface TransportManager
Returns:


Copyright © 2004-2005 Codehaus. All Rights Reserved.