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
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
activate()
Initialize this server.void
Callsactivate()
when the BeanFactory initializes the receiver instance.void
destroy()
Callsshutdown()
when the BeanFactory destroys the receiver instance.final boolean
isActive()
Return whether this server is currently active, that is, whether it has been set up but not shut down yet.final boolean
Return whether this server is currently running, that is, whether it has been started and not stopped yet.protected abstract void
Template method invoked whenactivate()
is invoked.protected abstract void
Template method invoked whenshutdown()
is invoked.protected abstract void
onStart()
Template method invoked whenstart()
is invoked.protected abstract void
onStop()
Template method invoked whenstop()
is invoked.void
setAutoStartup
(boolean autoStartup) Set whether to automatically start the receiver after initialization.final void
shutdown()
Shut down this server.final void
start()
Start this server.final void
stop()
Stop this server.Methods inherited from class org.springframework.ws.transport.support.SimpleWebServiceMessageReceiverObjectSupport
getMessageReceiver, handleConnection, setMessageReceiver
Methods 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:
isRunning
in interfaceorg.springframework.context.Lifecycle
-
setAutoStartup
public void setAutoStartup(boolean autoStartup) Set whether to automatically start the receiver after initialization.Default is
true
; set this tofalse
to allow for manual startup. -
afterPropertiesSet
Callsactivate()
when the BeanFactory initializes the receiver instance.- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classSimpleWebServiceMessageReceiverObjectSupport
- Throws:
Exception
-
destroy
public void destroy()Callsshutdown()
when the BeanFactory destroys the receiver instance.- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-
activate
Initialize this server. Starts the server ifautoStartup
hasn't been turned off.- Throws:
Exception
-
start
public final void start()Start this server.- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
-
stop
public final void stop()Stop this server.- Specified by:
stop
in 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.
-