Spring Web Services Framework

org.springframework.ws.transport.support
Class AbstractStandaloneMessageReceiver

java.lang.Object
  extended by org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
      extended by org.springframework.ws.transport.support.SimpleWebServiceMessageReceiverObjectSupport
          extended by org.springframework.ws.transport.support.AbstractStandaloneMessageReceiver
All Implemented Interfaces:
DisposableBean, InitializingBean, Lifecycle
Direct Known Subclasses:
AbstractAsyncStandaloneMessageReceiver

public abstract class AbstractStandaloneMessageReceiver
extends SimpleWebServiceMessageReceiverObjectSupport
implements Lifecycle, 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
AbstractStandaloneMessageReceiver()
           
 
Method Summary
 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.
 
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, setMessageFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStandaloneMessageReceiver

public AbstractStandaloneMessageReceiver()
Method Detail

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 interface Lifecycle

setAutoStartup

public void setAutoStartup(boolean autoStartup)
Set whether to automatically start the receiver after initialization.

Default is true; set this to false to allow for manual startup.


afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Calls activate() when the BeanFactory initializes the receiver instance.

Specified by:
afterPropertiesSet in interface InitializingBean
Overrides:
afterPropertiesSet in class SimpleWebServiceMessageReceiverObjectSupport
Throws:
Exception

destroy

public void destroy()
Calls shutdown() when the BeanFactory destroys the receiver instance.

Specified by:
destroy in interface DisposableBean

activate

public final void activate()
                    throws Exception
Initialize this server. Starts the server if autoStartup hasn't been turned off.

Throws:
Exception

start

public final void start()
Start this server.

Specified by:
start in interface Lifecycle

stop

public final void stop()
Stop this server.

Specified by:
stop in interface Lifecycle

shutdown

public final void shutdown()
Shut down this server.


onActivate

protected abstract void onActivate()
                            throws Exception
Template method invoked when activate() is invoked.

Throws:
Exception - in case of errors

onStart

protected abstract void onStart()
Template method invoked when start() is invoked.


onStop

protected abstract void onStop()
Template method invoked when stop() is invoked.


onShutdown

protected abstract void onShutdown()
Template method invoked when shutdown() is invoked.


Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.