org.springframework.integration.endpoint
Class ConcurrentTarget

java.lang.Object
  extended by org.springframework.integration.endpoint.ConcurrentTarget
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, Target

public class ConcurrentTarget
extends java.lang.Object
implements Target, org.springframework.beans.factory.DisposableBean

A Target implementation that encapsulates an Executor and delegates to a wrapped target for concurrent, asynchronous message handling.

Author:
Mark Fisher

Nested Class Summary
private  class ConcurrentTarget.TargetTask
           
 
Field Summary
private  ErrorHandler errorHandler
           
private  java.util.concurrent.ExecutorService executor
           
private  org.apache.commons.logging.Log logger
           
private  Target target
           
 
Constructor Summary
ConcurrentTarget(Target target, java.util.concurrent.ExecutorService executor)
           
 
Method Summary
 void destroy()
           
 boolean send(Message<?> message)
           
 void setErrorHandler(ErrorHandler errorHandler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private final org.apache.commons.logging.Log logger

target

private final Target target

executor

private final java.util.concurrent.ExecutorService executor

errorHandler

private volatile ErrorHandler errorHandler
Constructor Detail

ConcurrentTarget

public ConcurrentTarget(Target target,
                        java.util.concurrent.ExecutorService executor)
Method Detail

setErrorHandler

public void setErrorHandler(ErrorHandler errorHandler)

destroy

public void destroy()
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean

send

public boolean send(Message<?> message)
Specified by:
send in interface Target