Spring Web Services Framework

org.springframework.ws.transport.support
Class AbstractAsyncStandaloneMessageReceiver

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
              extended by org.springframework.ws.transport.support.AbstractAsyncStandaloneMessageReceiver
All Implemented Interfaces:
BeanNameAware, DisposableBean, InitializingBean, Lifecycle
Direct Known Subclasses:
MailMessageReceiver

public abstract class AbstractAsyncStandaloneMessageReceiver
extends AbstractStandaloneMessageReceiver
implements BeanNameAware

Abstract base class for asynchronous standalone, server-side transport objects. Contains a Spring TaskExecutor, and various lifecycle callbacks.

Author:
Arjen Poutsma

Field Summary
 String DEFAULT_THREAD_NAME_PREFIX
          Default thread name prefix.
 
Fields inherited from class org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
logger
 
Constructor Summary
AbstractAsyncStandaloneMessageReceiver()
           
 
Method Summary
 void afterPropertiesSet()
          Calls AbstractStandaloneMessageReceiver.activate() when the BeanFactory initializes the receiver instance.
protected  TaskExecutor createDefaultTaskExecutor()
          Create a default TaskExecutor.
protected  void execute(Runnable runnable)
          Executes the given Runnable via this receiver's TaskExecutor.
 void setBeanName(String beanName)
           
 void setTaskExecutor(TaskExecutor taskExecutor)
          Set the Spring TaskExecutor to use for running the listener threads.
 
Methods inherited from class org.springframework.ws.transport.support.AbstractStandaloneMessageReceiver
activate, destroy, isActive, isRunning, onActivate, onShutdown, onStart, onStop, setAutoStartup, shutdown, start, stop
 
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
 

Field Detail

DEFAULT_THREAD_NAME_PREFIX

public final String DEFAULT_THREAD_NAME_PREFIX
Default thread name prefix.

Constructor Detail

AbstractAsyncStandaloneMessageReceiver

public AbstractAsyncStandaloneMessageReceiver()
Method Detail

setTaskExecutor

public void setTaskExecutor(TaskExecutor taskExecutor)
Set the Spring TaskExecutor to use for running the listener threads. Default is SimpleAsyncTaskExecutor, starting up a number of new threads.

Specify an alternative task executor for integration with an existing thread pool, such as the WorkManagerTaskExecutor to integrate with WebSphere or WebLogic.


setBeanName

public void setBeanName(String beanName)
Specified by:
setBeanName in interface BeanNameAware

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Description copied from class: AbstractStandaloneMessageReceiver
Calls AbstractStandaloneMessageReceiver.activate() when the BeanFactory initializes the receiver instance.

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

createDefaultTaskExecutor

protected TaskExecutor createDefaultTaskExecutor()
Create a default TaskExecutor. Called if no explicit TaskExecutor has been specified.

The default implementation builds a SimpleAsyncTaskExecutor with the specified bean name (or the class name, if no bean name specified) as thread name prefix.

See Also:
SimpleAsyncTaskExecutor.SimpleAsyncTaskExecutor(String)

execute

protected void execute(Runnable runnable)
Executes the given Runnable via this receiver's TaskExecutor.

See Also:
setTaskExecutor(TaskExecutor)

Spring Web Services Framework

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