|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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()
Remove all Messages from this channel. |
java.lang.String |
getName()
Always returns null. |
java.util.List<Message<?>> |
purge(MessageSelector selector)
Remove any Messages that are not accepted by the provided selector. |
Message |
receive()
Receive a message, blocking indefinitely if necessary. |
Message |
receive(long timeout)
Receive a message, blocking until either a message is available or the specified timeout period elapses. |
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()
MessageChannelMessages from this channel.
clear in interface MessageChannelpublic java.lang.String getName()
null.
getName in interface MessageChannelpublic java.util.List<Message<?>> purge(MessageSelector selector)
MessageChannelMessages that are not accepted by the provided selector.
purge in interface MessageChannelpublic void setName(java.lang.String name)
null.
setName in interface MessageChannelpublic Message receive()
BlockingSource
receive in interface BlockingSourcereceive in interface MessageSourceMessage or null if
interruptedpublic Message receive(long timeout)
BlockingSource
receive in interface BlockingSourcetimeout - the timeout in milliseconds
Message or null if the
specified timeout period elapses or the message reception is interruptedpublic boolean send(Message<?> message)
BlockingTarget
send in interface BlockingTargetsend in interface MessageTargetmessage - 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 BlockingTargetmessage - 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 | ||||||||