org.talend.esb.servicelocator.cxf.internal
Class SingleBusLocatorRegistrar

java.lang.Object
  extended by org.talend.esb.servicelocator.cxf.internal.SingleBusLocatorRegistrar
All Implemented Interfaces:
org.apache.cxf.endpoint.ServerLifeCycleListener, ServiceLocator.PostConnectAction

public class SingleBusLocatorRegistrar
extends Object
implements org.apache.cxf.endpoint.ServerLifeCycleListener, ServiceLocator.PostConnectAction

The LocatorRegistrar is responsible for registering the endpoints of CXF Servers at the Service Locator. The Servers endpoint can either be registered explicitly or the LocatorRegistrar can be enabled to listen for all Servers that are in the process to start and to register them all.

If a server which was registered before stops the LocatorRegistrar automatically unregisters from the Service Locator.


Constructor Summary
SingleBusLocatorRegistrar(org.apache.cxf.Bus bus)
           
 
Method Summary
 void process(ServiceLocator lc)
          Execute this after the connection to the Service Locator is established or re-established.
 void registerServer(org.apache.cxf.endpoint.Server server)
           
 void registerServer(org.apache.cxf.endpoint.Server server, SLProperties props)
           
 void setEndpointPrefix(String endpointPrefix)
           
 void setEndpointPrefixes(Map<String,String> endpointPrefixes)
           
 void setServiceLocator(ServiceLocator serviceLocator)
           
 void startListenForServers()
           
 void startServer(org.apache.cxf.endpoint.Server server)
           
 void stopListenForServers()
           
 void stopServer(org.apache.cxf.endpoint.Server server)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleBusLocatorRegistrar

public SingleBusLocatorRegistrar(org.apache.cxf.Bus bus)
Method Detail

startServer

public void startServer(org.apache.cxf.endpoint.Server server)
Specified by:
startServer in interface org.apache.cxf.endpoint.ServerLifeCycleListener

stopServer

public void stopServer(org.apache.cxf.endpoint.Server server)
Specified by:
stopServer in interface org.apache.cxf.endpoint.ServerLifeCycleListener

startListenForServers

public void startListenForServers()

stopListenForServers

public void stopListenForServers()

process

public void process(ServiceLocator lc)
Description copied from interface: ServiceLocator.PostConnectAction
Execute this after the connection to the Service Locator is established or re-established.

Specified by:
process in interface ServiceLocator.PostConnectAction
Parameters:
lc - the Service Locator client that just successfully connected to the server, must not be null

setEndpointPrefix

public void setEndpointPrefix(String endpointPrefix)

setEndpointPrefixes

public void setEndpointPrefixes(Map<String,String> endpointPrefixes)

setServiceLocator

public void setServiceLocator(ServiceLocator serviceLocator)

registerServer

public void registerServer(org.apache.cxf.endpoint.Server server)

registerServer

public void registerServer(org.apache.cxf.endpoint.Server server,
                           SLProperties props)


Copyright © 2011–2014 Talend Inc.. All rights reserved.