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
 

Method Detail

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 send
destination - the name of the destination
count - the number of messages to send
populator - the message populator (may be null)
Throws:
java.lang.Exception - if the populator fails or remote call fails
javax.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 destination
count - the expected number of messages to receive
timeout - the maximum time to wait for each
verifier - the message verifier (may be null)
Returns:
the actual number of messages received
Throws:
javax.jms.JMSException - if the messages can't be received
java.rmi.RemoteException - if the remote call fails


Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.