org.exolab.jmscts.core
Interface Messenger
- All Superinterfaces:
- java.rmi.Remote
- All Known Implementing Classes:
- MessengerServer
- public interface Messenger
- extends java.rmi.Remote
This interface enables messaging operations to be performed in a separate
JVM
- Version:
- $Revision: 1.2 $ $Date: 2004/01/31 13:44:24 $
- Author:
- Tim Anderson
Method Summary |
int |
receive(java.lang.String destination,
int count,
long timeout,
MessageVerifier verifier)
Receive messages from a destination |
void |
send(java.lang.Class message,
java.lang.String destination,
int count,
MessagePopulator populator)
Send messages to a destination |
send
public void send(java.lang.Class message,
java.lang.String destination,
int count,
MessagePopulator populator)
throws java.lang.Exception,
javax.jms.JMSException
- Send messages to a destination
- Parameters:
message
- the type of the message to senddestination
- the name of the destinationcount
- the number of messages to sendpopulator
- the message populator (may be null)- Throws:
java.lang.Exception
- if the populator fails or remote call failsjavax.jms.JMSException
- if the messages can't be sent
receive
public int receive(java.lang.String destination,
int count,
long timeout,
MessageVerifier verifier)
throws javax.jms.JMSException,
java.rmi.RemoteException
- Receive messages from a destination
- Parameters:
destination
- the name of the destinationcount
- the expected number of messages to receivetimeout
- the maximum time to wait for eachverifier
- the message verifier (may be null)- Returns:
- the actual number of messages received
- Throws:
javax.jms.JMSException
- if the messages can't be receivedjava.rmi.RemoteException
- if the remote call fails
Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.