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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    Initialize this server.
    void
    Calls activate() when the BeanFactory initializes the receiver instance.
    void
    Calls shutdown() when the BeanFactory destroys the receiver instance.
    final boolean
    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 when activate() is invoked.
    protected abstract void
    Template method invoked when shutdown() is invoked.
    protected abstract void
    Template method invoked when start() is invoked.
    protected abstract void
    Template method invoked when stop() is invoked.
    void
    setAutoStartup(boolean autoStartup)
    Set whether to automatically start the receiver after initialization.
    final void
    Shut down this server.
    final void
    Start this server.
    final void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface org.springframework.context.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 org.springframework.beans.factory.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 org.springframework.beans.factory.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 org.springframework.context.Lifecycle
    • stop

      public final void stop()
      Stop this server.
      Specified by:
      stop in interface org.springframework.context.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.