Package org.apache.axis2.engine
Class ListenerManager
java.lang.Object
org.apache.axis2.engine.ListenerManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.axis2.engine.ListenerManager.ListenerManagerShutdownThread -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(TransportInDescription trsIn, boolean started) Adds the listener described in the providedTransportInDescription.voiddestroy()Returns the ConfigurationContext used for the initalization of the listener manager.getEPRforService(String serviceName, String opName, String transportName) To get an EPR for a given servicevoidinit(ConfigurationContext configCtx) Initializes the listener manager and the defined transports in theAxisConfigurationbooleanisListenerRunning(String transportName) booleanbooleanvoidsetShutdownHookRequired(boolean shutdownHookRequired) voidstart()To start all the transportsvoidstartSystem(ConfigurationContext configurationContext) voidstop()Stop all the transports and notify modules of shutdown.
-
Field Details
-
shutdownHookThread
protected org.apache.axis2.engine.ListenerManager.ListenerManagerShutdownThread shutdownHookThread
-
-
Constructor Details
-
ListenerManager
public ListenerManager()
-
-
Method Details
-
init
Initializes the listener manager and the defined transports in theAxisConfiguration- Parameters:
configCtx- used for the initialization
-
getConfigctx
Returns the ConfigurationContext used for the initalization of the listener manager. It should be the current ConfigurationContext in use in most of the time.- Returns:
- the ConfigurationContext used for the ListenerManager initialization
-
getEPRforService
public EndpointReference getEPRforService(String serviceName, String opName, String transportName) throws AxisFault To get an EPR for a given service- Parameters:
serviceName- the name of the serviceopName- the operation nametransportName- the name of the transport, or null.- Returns:
- String
- Throws:
AxisFault
-
start
public void start()To start all the transports -
startSystem
-
stop
Stop all the transports and notify modules of shutdown.- Throws:
AxisFault
-
addListener
Adds the listener described in the providedTransportInDescription. Further if the listener represented by the TransportInDescription has already been initialized and started the booleanstartedinput parameter has to be provided astrue.It is not possible to add a listener which is already initialized but not started to the listener manager, even though the above is a condition that has to be satisfied there is no means of enforcing that, because the
TransportListenerAPI doesn't provide a mechanism to test whether it is initialized or started.If the caller is using an already intialized listener, then it is the responsability of the caller to start the listener before adding it to the listener manager and pass the
startedparameter value astrue.- Parameters:
trsIn- Transport in description (which contains Transport Listener) to be addedstarted- whether the transport Listener that is being added is already started or not- Throws:
AxisFault- will throw AxisFault if something goes wrong
-
isListenerRunning
-
isStopped
public boolean isStopped() -
destroy
- Throws:
AxisFault
-
isShutdownHookRequired
public boolean isShutdownHookRequired() -
setShutdownHookRequired
public void setShutdownHookRequired(boolean shutdownHookRequired)
-