Class AbstractStandaloneMessageReceiver
java.lang.Object
org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
org.springframework.ws.transport.support.SimpleWebServiceMessageReceiverObjectSupport
org.springframework.ws.transport.support.AbstractStandaloneMessageReceiver
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle
- Direct Known Subclasses:
AbstractAsyncStandaloneMessageReceiver,XmppMessageReceiver
public abstract class AbstractStandaloneMessageReceiver
extends SimpleWebServiceMessageReceiverObjectSupport
implements org.springframework.context.Lifecycle, org.springframework.beans.factory.DisposableBean
Abstract base class for standalone, server-side transport objects. Provides a basic, thread-safe implementation of
the
Lifecycle interface, and various template methods to be implemented by concrete sub classes.- Since:
- 1.5.0
- Author:
- Arjen Poutsma
-
Field Summary
Fields inherited from class org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidactivate()Initialize this server.voidCallsactivate()when the BeanFactory initializes the receiver instance.voiddestroy()Callsshutdown()when the BeanFactory destroys the receiver instance.final booleanisActive()Return whether this server is currently active, that is, whether it has been set up but not shut down yet.final booleanReturn whether this server is currently running, that is, whether it has been started and not stopped yet.protected abstract voidTemplate method invoked whenactivate()is invoked.protected abstract voidTemplate method invoked whenshutdown()is invoked.protected abstract voidonStart()Template method invoked whenstart()is invoked.protected abstract voidonStop()Template method invoked whenstop()is invoked.voidsetAutoStartup(boolean autoStartup) Set whether to automatically start the receiver after initialization.final voidshutdown()Shut down this server.final voidstart()Start this server.final voidstop()Stop this server.Methods inherited from class org.springframework.ws.transport.support.SimpleWebServiceMessageReceiverObjectSupport
getMessageReceiver, handleConnection, setMessageReceiverMethods inherited from class org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
getMessageFactory, handleConnection, handleNoEndpointFoundException, setMessageFactory
-
Constructor Details
-
AbstractStandaloneMessageReceiver
public AbstractStandaloneMessageReceiver()
-
-
Method Details
-
isActive
public final boolean isActive()Return whether this server is currently active, that is, whether it has been set up but not shut down yet. -
isRunning
public final boolean isRunning()Return whether this server is currently running, that is, whether it has been started and not stopped yet.- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
setAutoStartup
public void setAutoStartup(boolean autoStartup) Set whether to automatically start the receiver after initialization.Default is
true; set this tofalseto allow for manual startup. -
afterPropertiesSet
Callsactivate()when the BeanFactory initializes the receiver instance.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classSimpleWebServiceMessageReceiverObjectSupport- Throws:
Exception
-
destroy
public void destroy()Callsshutdown()when the BeanFactory destroys the receiver instance.- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
activate
Initialize this server. Starts the server ifautoStartuphasn't been turned off.- Throws:
Exception
-
start
public final void start()Start this server.- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public final void stop()Stop this server.- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
shutdown
public final void shutdown()Shut down this server. -
onActivate
Template method invoked whenactivate()is invoked.- Throws:
Exception- in case of errors
-
onStart
protected abstract void onStart()Template method invoked whenstart()is invoked. -
onStop
protected abstract void onStop()Template method invoked whenstop()is invoked. -
onShutdown
protected abstract void onShutdown()Template method invoked whenshutdown()is invoked.
-