|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.channel.NullChannel
public class NullChannel
A channel implementation that essentially behaves like "/dev/null". All receive() calls will return null, and all send() calls will return true although no action is performed. Note however that the invocations are logged at debug-level.
Field Summary | |
---|---|
private org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
---|---|
NullChannel()
|
Method Summary | |
---|---|
java.util.List<Message<?>> |
clear()
|
java.lang.String |
getName()
Always returns null . |
java.util.List<Message<?>> |
purge(MessageSelector selector)
|
Message |
receive()
|
Message |
receive(long timeout)
|
boolean |
send(Message<?> message)
Send a message, blocking indefinitely if necessary. |
boolean |
send(Message<?> message,
long timeout)
Send a message, blocking until either the message is accepted or the specified timeout period elapses. |
void |
setName(java.lang.String name)
The channel name cannot be set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private org.apache.commons.logging.Log logger
Constructor Detail |
---|
public NullChannel()
Method Detail |
---|
public java.util.List<Message<?>> clear()
public java.lang.String getName()
null
.
getName
in interface MessageChannel
public java.util.List<Message<?>> purge(MessageSelector selector)
public void setName(java.lang.String name)
null
.
public Message receive()
public Message receive(long timeout)
public boolean send(Message<?> message)
BlockingTarget
send
in interface BlockingTarget
send
in interface MessageTarget
message
- the Message
to send
true
if the message is sent successfully,
false if interrupted
public boolean send(Message<?> message, long timeout)
BlockingTarget
send
in interface BlockingTarget
message
- the Message
to sendtimeout
- the timeout in milliseconds
true
if the message is sent successfully,
false if the specified timeout period elapses or
the send is interrupted
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |