|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.integration.channel.SimpleChannel
public class SimpleChannel
Simple implementation of a message channel. Each Message is
placed in a queue whose capacity may be specified upon construction. If no
capacity is specified, the DEFAULT_CAPACITY will be used.
| Field Summary | |
|---|---|
static int |
DEFAULT_CAPACITY
|
| Constructor Summary | |
|---|---|
SimpleChannel()
Create a channel with the default queue capacity. |
|
SimpleChannel(DispatcherPolicy dispatcherPolicy)
Create a channel with the default queue capacity and the specified dispatcher policy. |
|
SimpleChannel(int capacity)
Create a channel with the specified queue capacity. |
|
SimpleChannel(int capacity,
DispatcherPolicy dispatcherPolicy)
Create a channel with the specified queue capacity and dispatcher policy. |
|
| Method Summary | |
|---|---|
DispatcherPolicy |
getDispatcherPolicy()
Return this channel's dispatcher policy |
java.lang.String |
getName()
Return the name of this channel. |
Message |
receive()
Receive the message at the head of the queue. |
Message |
receive(long timeout)
Receive the message at the head of the queue. |
boolean |
send(Message message)
Send a message on this channel. |
boolean |
send(Message message,
long timeout)
Send a message on this channel. |
void |
setBeanName(java.lang.String beanName)
Set the name of this channel to its bean name. |
void |
setName(java.lang.String name)
Set the name of this channel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_CAPACITY
| Constructor Detail |
|---|
public SimpleChannel(int capacity,
DispatcherPolicy dispatcherPolicy)
public SimpleChannel(int capacity)
public SimpleChannel(DispatcherPolicy dispatcherPolicy)
public SimpleChannel()
| Method Detail |
|---|
public void setName(java.lang.String name)
setName in interface MessageChannelpublic java.lang.String getName()
getName in interface MessageChannelpublic DispatcherPolicy getDispatcherPolicy()
MessageChannel
getDispatcherPolicy in interface MessageChannelpublic void setBeanName(java.lang.String beanName)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic boolean send(Message message)
send in interface MessageChannelmessage - the Message to send
true if the message is sent successfully or
false if the sending thread is interrupted.
public boolean send(Message message,
long timeout)
send in interface MessageChannelmessage - the Message to sendtimeout - the timeout in milliseconds
true if the message is sent successfully,
false if the message cannot be sent within the allotted
time or the sending thread is interrupted.public Message receive()
receive in interface MessageChannelnull if
the receiving thread is interrupted.public Message receive(long timeout)
receive in interface MessageChanneltimeout - the timeout in milliseconds
null in
case no message is available within the allotted time or the receiving
thread is interrupted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||