org.springframework.integration.endpoint
Class AbstractEndpoint
java.lang.Object
org.springframework.integration.endpoint.AbstractEndpoint
- All Implemented Interfaces:
- org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, ChannelRegistryAware, MessageEndpoint, MessageTarget
- Direct Known Subclasses:
- SourceEndpoint, TargetEndpoint
public abstract class AbstractEndpoint
- extends java.lang.Object
- implements MessageEndpoint, org.springframework.beans.factory.BeanNameAware, org.springframework.context.Lifecycle
Base class for MessageEndpoint
implementations.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
name
private volatile java.lang.String name
inputChannelName
private volatile java.lang.String inputChannelName
inputChannel
private MessageChannel inputChannel
outputChannelName
private volatile java.lang.String outputChannelName
outputChannel
private MessageChannel outputChannel
interceptors
private final java.util.List<EndpointInterceptor> interceptors
schedule
private volatile Schedule schedule
trigger
private volatile EndpointTrigger trigger
channelRegistry
private volatile ChannelRegistry channelRegistry
autoStartup
private volatile boolean autoStartup
running
private volatile boolean running
lifecycleMonitor
private final java.lang.Object lifecycleMonitor
AbstractEndpoint
public AbstractEndpoint()
getName
public java.lang.String getName()
- Specified by:
getName
in interface MessageEndpoint
setName
public void setName(java.lang.String name)
- Specified by:
setName
in interface MessageEndpoint
setBeanName
public void setBeanName(java.lang.String beanName)
- Specified by:
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
setSchedule
public void setSchedule(Schedule schedule)
getSchedule
public Schedule getSchedule()
- Specified by:
getSchedule
in interface MessageEndpoint
setTrigger
public void setTrigger(EndpointTrigger trigger)
getTrigger
public EndpointTrigger getTrigger()
setInputChannelName
public void setInputChannelName(java.lang.String inputChannelName)
getInputChannelName
public java.lang.String getInputChannelName()
- Specified by:
getInputChannelName
in interface MessageEndpoint
setInputChannel
public void setInputChannel(MessageChannel channel)
getInputChannel
public MessageChannel getInputChannel()
- Specified by:
getInputChannel
in interface MessageEndpoint
setOutputChannelName
public void setOutputChannelName(java.lang.String outputChannelName)
- Set the name of the channel to which this endpoint should send reply
messages.
getOutputChannelName
public java.lang.String getOutputChannelName()
- Specified by:
getOutputChannelName
in interface MessageEndpoint
setOutputChannel
public void setOutputChannel(MessageChannel outputChannel)
getOutputChannel
public MessageChannel getOutputChannel()
- Specified by:
getOutputChannel
in interface MessageEndpoint
setChannelRegistry
public void setChannelRegistry(ChannelRegistry channelRegistry)
- Set the channel registry to use for looking up channels by name.
- Specified by:
setChannelRegistry
in interface ChannelRegistryAware
getChannelRegistry
protected ChannelRegistry getChannelRegistry()
setAutoStartup
public void setAutoStartup(boolean autoStartup)
addInterceptor
public void addInterceptor(EndpointInterceptor interceptor)
setInterceptors
public void setInterceptors(java.util.List<EndpointInterceptor> interceptors)
getInterceptors
public java.util.List<EndpointInterceptor> getInterceptors()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
initialize
protected void initialize()
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interface org.springframework.context.Lifecycle
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
start
public void start()
- Specified by:
start
in interface org.springframework.context.Lifecycle
stop
public void stop()
- Specified by:
stop
in interface org.springframework.context.Lifecycle
send
public final boolean send(Message<?> message)
- Specified by:
send
in interface MessageTarget
send
private boolean send(Message<?> message,
int index)
doSend
private boolean doSend(Message<?> message)
supports
protected abstract boolean supports(Message<?> message)
handleMessage
protected abstract boolean handleMessage(Message<?> message)