com.genesyslab.platform.commons.protocol
Class QueueMessageReceiver
java.lang.Object
com.genesyslab.platform.commons.protocol.AbstractQueueReceiver
com.genesyslab.platform.commons.protocol.QueueMessageReceiver
- All Implemented Interfaces:
- ChannelListener, Listener, MessageReceiver, MessageReceiverSupport, Receiver, ReceiverSupport
- public class QueueMessageReceiver
- extends AbstractQueueReceiver
- implements MessageReceiverSupport
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueueMessageReceiver
public QueueMessageReceiver(int queueSize)
QueueMessageReceiver
public QueueMessageReceiver(int queueSize,
boolean growQueue)
receive
public Message receive()
throws java.lang.InterruptedException,
java.lang.IllegalStateException
- Description copied from interface:
MessageReceiver
- Receive message from the channel. Depending on
implementation this method will or won't block
for some or infinite time.
- Specified by:
receive
in interface MessageReceiver
- Returns:
- Message from the channel or null if the channel is "empty"
- Throws:
java.lang.InterruptedException
- if thread is interrupted during this method
execution
java.lang.IllegalStateException
- if channel is not in appropriate state
to call the method
receive
public Message receive(long timeout)
throws java.lang.InterruptedException,
java.lang.IllegalStateException
- Description copied from interface:
MessageReceiver
- Receive message from the channel. Depending on
timeout value this method will or won't block
for some time. See
Channel
description for timeout values meaning.
- Specified by:
receive
in interface MessageReceiver
- Parameters:
timeout
- timeout to waitResponse for message
- Returns:
- Message from the channel or null if the channel is "empty"
- Throws:
java.lang.IllegalStateException
- if channel is not in appropriate state
to call the method
java.lang.InterruptedException
- if thread is interrupted during this method
execution
processMessage
public void processMessage(Message message)
- Specified by:
processMessage
in interface MessageReceiverSupport
Send comments on this topic.
Copyright © 2006–2008 Genesys Telecommunication Laboratories, Inc. All rights reserved.