public abstract class AbstractStandaloneMessageReceiver extends SimpleWebServiceMessageReceiverObjectSupport implements Lifecycle, DisposableBean
Lifecycle
interface, and various template methods to be implemented by concrete sub classes.logger
Constructor and Description |
---|
AbstractStandaloneMessageReceiver() |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Initialize this server.
|
void |
afterPropertiesSet()
Calls
activate() when the BeanFactory initializes the receiver instance. |
void |
destroy()
Calls
shutdown() when the BeanFactory destroys the receiver instance. |
boolean |
isActive()
Return whether this server is currently active, that is, whether it has been set up but not shut down yet.
|
boolean |
isRunning()
Return whether this server is currently running, that is, whether it has been started and not stopped yet.
|
protected abstract void |
onActivate()
Template method invoked when
activate() is invoked. |
protected abstract void |
onShutdown()
Template method invoked when
shutdown() is invoked. |
protected abstract void |
onStart()
Template method invoked when
start() is invoked. |
protected abstract void |
onStop()
Template method invoked when
stop() is invoked. |
void |
setAutoStartup(boolean autoStartup)
Set whether to automatically start the receiver after initialization.
|
void |
shutdown()
Shut down this server.
|
void |
start()
Start this server.
|
void |
stop()
Stop this server.
|
getMessageReceiver, handleConnection, setMessageReceiver
getMessageFactory, handleConnection, handleNoEndpointFoundException, setMessageFactory
public final boolean isActive()
public final boolean isRunning()
public void setAutoStartup(boolean autoStartup)
Default is true
; set this to false
to allow for manual startup.
public void afterPropertiesSet() throws Exception
activate()
when the BeanFactory initializes the receiver instance.afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class SimpleWebServiceMessageReceiverObjectSupport
Exception
public void destroy()
shutdown()
when the BeanFactory destroys the receiver instance.destroy
in interface DisposableBean
public final void activate() throws Exception
autoStartup
hasn't been turned
off.Exception
public final void shutdown()
protected abstract void onActivate() throws Exception
activate()
is invoked.Exception
- in case of errorsprotected abstract void onStart()
start()
is invoked.protected abstract void onStop()
stop()
is invoked.protected abstract void onShutdown()
shutdown()
is invoked.