org.springframework.integration.channel
Class ChannelPublisher

java.lang.Object
  extended by org.springframework.integration.channel.ChannelPublisher
Direct Known Subclasses:
ApplicationEventSource, ChannelPublishingJmsListener

public class ChannelPublisher
extends java.lang.Object

Sends to a channel and provides a configurable timeout. Convenient for either subclassing or delegation from components that need to publish to a channel.

Author:
Mark Fisher

Field Summary
private  MessageChannel channel
           
private  org.apache.commons.logging.Log logger
           
private  long timeout
           
 
Constructor Summary
ChannelPublisher()
           
ChannelPublisher(MessageChannel channel)
           
 
Method Summary
protected  MessageChannel getChannel()
           
 boolean publish(Message<?> message)
           
 void setChannel(MessageChannel channel)
           
 void setTimeout(long timeout)
           
 
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

channel

private volatile MessageChannel channel

timeout

private volatile long timeout
Constructor Detail

ChannelPublisher

public ChannelPublisher()

ChannelPublisher

public ChannelPublisher(MessageChannel channel)
Method Detail

setChannel

public void setChannel(MessageChannel channel)

setTimeout

public void setTimeout(long timeout)

getChannel

protected MessageChannel getChannel()

publish

public boolean publish(Message<?> message)