User: chirino
Date: 01/09/25 22:02:28
Modified: src/main/org/jboss/mq/il ClientIL.java ServerIL.java
Log:
Several modification to support the client connection sending ping messages
to the server and the server sending back pong messages. These messages
are used to determine if the connection has gone down.
This fixes the bug with the ExceptionListner not being notified of
the server failing when the client is only receiving messages.
Revision Changes Path
1.3 +40 -14 jbossmq/src/main/org/jboss/mq/il/ClientIL.java
Index: ClientIL.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/ClientIL.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ClientIL.java 2001/08/17 03:04:03 1.2
+++ ClientIL.java 2001/09/26 05:02:27 1.3
@@ -1,5 +1,5 @@
/*
- * JBossMQ, the OpenSource JMS implementation
+ * JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
@@ -10,26 +10,52 @@
import org.jboss.mq.SpyDestination;
/**
- * This interface defines the methods that the server can make asynchronouly to
- * a client. (ie. to deliver messages)
+ * This interface defines the methods that the server can make asynchronouly to
+ * a client. (ie. to deliver messages)
*
- * @author Hiram Chirino ([EMAIL PROTECTED])
- * @author Norbert Lataille ([EMAIL PROTECTED])
- * @created August 16, 2001
- * @version $Revision: 1.2 $
+ * @author Hiram Chirino ([EMAIL PROTECTED])
+ * @author Norbert Lataille ([EMAIL PROTECTED])
+ * @version $Revision: 1.3 $
+ * @created August 16, 2001
*/
-public interface ClientIL {
+public interface ClientIL
+{
//One TemporaryDestination has been deleted
- public void deleteTemporaryDestination( SpyDestination dest )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param dest Description of Parameter
+ * @exception Exception Description of Exception
+ */
+ public void deleteTemporaryDestination(SpyDestination dest)
+ throws Exception;
//The connection is closed
+ /**
+ * #Description of the Method
+ *
+ * @exception Exception Description of Exception
+ */
public void close()
- throws Exception;
+ throws Exception;
//A message has arrived for the Connection
- public void receive( ReceiveRequest messages[] )
- throws Exception;
-
+ /**
+ * #Description of the Method
+ *
+ * @param messages Description of Parameter
+ * @exception Exception Description of Exception
+ */
+ public void receive(ReceiveRequest messages[])
+ throws Exception;
+
+ // Response to a ping sent by a client
+ /**
+ * #Description of the Method
+ *
+ * @param serverTime Description of Parameter
+ * @exception Exception Description of Exception
+ */
+ public void pong(long serverTime) throws Exception;
}
1.3 +189 -50 jbossmq/src/main/org/jboss/mq/il/ServerIL.java
Index: ServerIL.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/ServerIL.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ServerIL.java 2001/08/17 03:04:03 1.2
+++ ServerIL.java 2001/09/26 05:02:27 1.3
@@ -1,5 +1,5 @@
/*
- * JBossMQ, the OpenSource JMS implementation
+ * JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
@@ -21,82 +21,221 @@
import org.jboss.mq.TransactionRequest;
/**
- * Defines the methods that can be called by a client on the server.
+ * Defines the methods that can be called by a client on the server.
*
- * @author Hiram Chirino ([EMAIL PROTECTED])
- * @author Norbert Lataille ([EMAIL PROTECTED])
- * @created August 16, 2001
- * @version $Revision: 1.2 $
+ * @author Hiram Chirino ([EMAIL PROTECTED])
+ * @author Norbert Lataille ([EMAIL PROTECTED])
+ * @version $Revision: 1.3 $
+ * @created August 16, 2001
*/
-public interface ServerIL {
+public interface ServerIL
+{
+ /**
+ * Gets the ID attribute of the ServerIL object
+ *
+ * @return The ID value
+ * @exception Exception Description of Exception
+ */
public String getID()
- throws Exception;
+ throws Exception;
- public TemporaryTopic getTemporaryTopic( ConnectionToken dc )
- throws Exception;
+ /**
+ * Gets the TemporaryTopic attribute of the ServerIL object
+ *
+ * @param dc Description of Parameter
+ * @return The TemporaryTopic value
+ * @exception Exception Description of Exception
+ */
+ public TemporaryTopic getTemporaryTopic(ConnectionToken dc)
+ throws Exception;
- public TemporaryQueue getTemporaryQueue( ConnectionToken dc )
- throws Exception;
+ /**
+ * Gets the TemporaryQueue attribute of the ServerIL object
+ *
+ * @param dc Description of Parameter
+ * @return The TemporaryQueue value
+ * @exception Exception Description of Exception
+ */
+ public TemporaryQueue getTemporaryQueue(ConnectionToken dc)
+ throws Exception;
- public void connectionClosing( ConnectionToken dc )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param dc Description of Parameter
+ * @exception Exception Description of Exception
+ */
+ public void connectionClosing(ConnectionToken dc)
+ throws Exception;
- public void checkID( String ID )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param ID Description of Parameter
+ * @exception Exception Description of Exception
+ */
+ public void checkID(String ID)
+ throws Exception;
- public void addMessage( ConnectionToken dc, SpyMessage message )
- throws Exception;
+ /**
+ * Adds a feature to the Message attribute of the ServerIL object
+ *
+ * @param dc The feature to be added to the Message attribute
+ * @param message The feature to be added to the Message attribute
+ * @exception Exception Description of Exception
+ */
+ public void addMessage(ConnectionToken dc, SpyMessage message)
+ throws Exception;
- public Queue createQueue( ConnectionToken dc, String dest )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param dc Description of Parameter
+ * @param dest Description of Parameter
+ * @return Description of the Returned Value
+ * @exception Exception Description of Exception
+ */
+ public Queue createQueue(ConnectionToken dc, String dest)
+ throws Exception;
- public Topic createTopic( ConnectionToken dc, String dest )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param dc Description of Parameter
+ * @param dest Description of Parameter
+ * @return Description of the Returned Value
+ * @exception Exception Description of Exception
+ */
+ public Topic createTopic(ConnectionToken dc, String dest)
+ throws Exception;
- public void deleteTemporaryDestination( ConnectionToken dc, SpyDestination dest )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param dc Description of Parameter
+ * @param dest Description of Parameter
+ * @exception Exception Description of Exception
+ */
+ public void deleteTemporaryDestination(ConnectionToken dc, SpyDestination dest)
+ throws Exception;
- public void transact( ConnectionToken dc, TransactionRequest t )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param dc Description of Parameter
+ * @param t Description of Parameter
+ * @exception Exception Description of Exception
+ */
+ public void transact(ConnectionToken dc, TransactionRequest t)
+ throws Exception;
- public void acknowledge( ConnectionToken dc, AcknowledgementRequest item )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param dc Description of Parameter
+ * @param item Description of Parameter
+ * @exception Exception Description of Exception
+ */
+ public void acknowledge(ConnectionToken dc, AcknowledgementRequest item)
+ throws Exception;
- public SpyMessage[] browse( ConnectionToken dc, Destination dest, String
selector )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param dc Description of Parameter
+ * @param dest Description of Parameter
+ * @param selector Description of Parameter
+ * @return Description of the Returned Value
+ * @exception Exception Description of Exception
+ */
+ public SpyMessage[] browse(ConnectionToken dc, Destination dest, String selector)
+ throws Exception;
- public SpyMessage receive( ConnectionToken dc, int subscriberId, long wait )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param dc Description of Parameter
+ * @param subscriberId Description of Parameter
+ * @param wait Description of Parameter
+ * @return Description of the Returned Value
+ * @exception Exception Description of Exception
+ */
+ public SpyMessage receive(ConnectionToken dc, int subscriberId, long wait)
+ throws Exception;
- public void setEnabled( ConnectionToken dc, boolean enabled )
- throws Exception;
+ /**
+ * Sets the Enabled attribute of the ServerIL object
+ *
+ * @param dc The new Enabled value
+ * @param enabled The new Enabled value
+ * @exception Exception Description of Exception
+ */
+ public void setEnabled(ConnectionToken dc, boolean enabled)
+ throws Exception;
- public void unsubscribe( ConnectionToken dc, int subscriptionId )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param dc Description of Parameter
+ * @param subscriptionId Description of Parameter
+ * @exception Exception Description of Exception
+ */
+ public void unsubscribe(ConnectionToken dc, int subscriptionId)
+ throws Exception;
- public void destroySubscription( DurableSubcriptionID id )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param id Description of Parameter
+ * @exception Exception Description of Exception
+ */
+ public void destroySubscription(DurableSubcriptionID id)
+ throws Exception;
- public String checkUser( String userName, String password )
- throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @param userName Description of Parameter
+ * @param password Description of Parameter
+ * @return Description of the Returned Value
+ * @exception Exception Description of Exception
+ */
+ public String checkUser(String userName, String password)
+ throws Exception;
+ /**
+ * #Description of the Method
+ *
+ * @return Description of the Returned Value
+ * @exception Exception Description of Exception
+ */
public ServerIL cloneServerIL()
- throws Exception;
+ throws Exception;
+
+ /**
+ * @param newConnectionToken org.jboss.mq.ConnectionToken
+ * @exception java.lang.Exception The exception description.
+ */
+ void setConnectionToken(org.jboss.mq.ConnectionToken newConnectionToken)
+ throws java.lang.Exception;
/**
- * @param newConnectionToken org.jboss.mq.ConnectionToken
- * @exception java.lang.Exception The exception description.
+ * @param dc org.jboss.mq.ConnectionToken
+ * @param s org.jboss.mq.Subscription
+ * @exception java.lang.Exception The exception description.
*/
- void setConnectionToken( org.jboss.mq.ConnectionToken newConnectionToken )
- throws java.lang.Exception;
+ void subscribe(org.jboss.mq.ConnectionToken dc, org.jboss.mq.Subscription s)
+ throws java.lang.Exception;
/**
- * @param dc org.jboss.mq.ConnectionToken
- * @param s org.jboss.mq.Subscription
- * @exception java.lang.Exception The exception description.
+ * #Description of the Method
+ *
+ * @param dc Description of Parameter
+ * @param clientTime Description of Parameter
+ * @exception Exception Description of Exception
*/
- void subscribe( org.jboss.mq.ConnectionToken dc, org.jboss.mq.Subscription s )
- throws java.lang.Exception;
+ public void ping(ConnectionToken dc, long clientTime)
+ throws Exception;
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development