package org.jboss.mq.il.rmi;
import javax.jms.IllegalStateException;
import javax.jms.JMSException;
import org.jboss.mq.Connection;
import org.jboss.mq.ReceiveRequest;
import org.jboss.mq.SpyDestination;
public class RMIClientIL extends java.rmi.server.UnicastRemoteObject implements RMIClientILRemote
{
private static final long serialVersionUID = -2587261916187410219L;
Connection connection;
boolean stopped = true;
public RMIClientIL(Connection c)
throws java.rmi.RemoteException
{
connection = c;
}
public void close()
throws Exception
{
if (stopped)
{
throw new IllegalStateException("The client IL is stopped");
}
connection.asynchClose();
}
public void deleteTemporaryDestination(SpyDestination dest)
throws JMSException
{
if (stopped)
{
throw new IllegalStateException("The client IL is stopped");
}
connection.asynchDeleteTemporaryDestination(dest);
}
public void receive(ReceiveRequest messages[])
throws Exception
{
if (stopped)
{
throw new IllegalStateException("The client IL is stopped");
}
connection.asynchDeliver(messages);
}
public void pong(long serverTime)
throws JMSException
{
if (stopped)
{
throw new IllegalStateException("The client IL is stopped");
}
connection.asynchPong(serverTime);
}
}