User: chirino
Date: 01/08/16 20:04:03
Modified: src/main/org/jboss/mq/il ClientIL.java ClientILService.java
ServerIL.java ServerILFactory.java
ServerILJMXService.java
ServerILJMXServiceMBean.java
Log:
Used the ejbdoclet pretty task to auto-indent the source files to
the 3 space standard.
Revision Changes Path
1.2 +21 -20 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.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ClientIL.java 2001/08/11 20:59:13 1.1
+++ ClientIL.java 2001/08/17 03:04:03 1.2
@@ -6,29 +6,30 @@
*/
package org.jboss.mq.il;
-
-
-
import org.jboss.mq.ReceiveRequest;
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])
- *
- * @version $Revision: 1.1 $
+ * @author Hiram Chirino ([EMAIL PROTECTED])
+ * @author Norbert Lataille ([EMAIL PROTECTED])
+ * @created August 16, 2001
+ * @version $Revision: 1.2 $
*/
-public interface ClientIL
-{
-
- //One TemporaryDestination has been deleted
- public void deleteTemporaryDestination(SpyDestination dest) throws Exception;
- //The connection is closed
- public void close() throws Exception;
- //A message has arrived for the Connection
- public void receive(ReceiveRequest messages[]) throws Exception;
-
-}
\ No newline at end of file
+public interface ClientIL {
+
+ //One TemporaryDestination has been deleted
+ public void deleteTemporaryDestination( SpyDestination dest )
+ throws Exception;
+
+ //The connection is closed
+ public void close()
+ throws Exception;
+
+ //A message has arrived for the Connection
+ public void receive( ReceiveRequest messages[] )
+ throws Exception;
+
+}
1.2 +49 -44 jbossmq/src/main/org/jboss/mq/il/ClientILService.java
Index: ClientILService.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/ClientILService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ClientILService.java 2001/08/11 20:59:13 1.1
+++ ClientILService.java 2001/08/17 03:04:03 1.2
@@ -6,54 +6,59 @@
*/
package org.jboss.mq.il;
-
-
import org.jboss.mq.Connection;
/**
- * This class manages the lifecycle of an instance of the ClientIL
- *
- * Implementations of this class should have a default constructor.
+ * This class manages the lifecycle of an instance of the ClientIL
+ * Implementations of this class should have a default constructor.
*
- * @author Hiram Chirino ([EMAIL PROTECTED])
- * @version $Revision: 1.1 $
+ * @author Hiram Chirino ([EMAIL PROTECTED])
+ * @created August 16, 2001
+ * @version $Revision: 1.2 $
*/
public interface ClientILService {
- /**
- * After construction, the ClientILService is initialized with
- * a reference to the Connection object and the connection properties.
- *
- */
- public void init(Connection connection, java.util.Properties props) throws
Exception;
-
- /**
- * After initialization, this method may be called to obtain
- * a reference to a ClientIL object. This object will
- * eventually be serialized and sent to the server so that he
- * can invoke methods on connection it was initialized with.
- *
- */
- public ClientIL getClientIL() throws Exception;
-
-
- /**
- * Once started, the ClientIL instance should process all server requests.
- *
- */
- public void start() throws Exception;
-
- /**
- * Once stopped, the ClientIL instance stop processing all server requests.
- *
- if( cr_server != null )
- cr_server.close();
-
- if (cr!=null && cr instanceof java.rmi.Remote) {
-
java.rmi.server.UnicastRemoteObject.unexportObject((java.rmi.Remote)cr, true);
- }
-
- */
-
- public void stop() throws Exception;
-}
\ No newline at end of file
+ /**
+ * After construction, the ClientILService is initialized with a reference
+ * to the Connection object and the connection properties.
+ *
+ * @param connection Description of Parameter
+ * @param props Description of Parameter
+ * @exception Exception Description of Exception
+ */
+ public void init( Connection connection, java.util.Properties props )
+ throws Exception;
+
+ /**
+ * After initialization, this method may be called to obtain a reference to
+ * a ClientIL object. This object will eventually be serialized and sent to
+ * the server so that he can invoke methods on connection it was initialized
+ * with.
+ *
+ * @return The ClientIL value
+ * @exception Exception Description of Exception
+ */
+ public ClientIL getClientIL()
+ throws Exception;
+
+
+ /**
+ * Once started, the ClientIL instance should process all server requests.
+ *
+ * @exception Exception Description of Exception
+ */
+ public void start()
+ throws Exception;
+
+ /**
+ * Once stopped, the ClientIL instance stop processing all server requests.
+ * if( cr_server != null ) cr_server.close(); if (cr!=null && cr instanceof
+ * java.rmi.Remote) {
java.rmi.server.UnicastRemoteObject.unexportObject((java.rmi.Remote)cr,
+ * true); }
+ *
+ * @exception Exception Description of Exception
+ */
+
+ public void stop()
+ throws Exception;
+}
1.2 +76 -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.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServerIL.java 2001/08/11 20:59:13 1.1
+++ ServerIL.java 2001/08/17 03:04:03 1.2
@@ -5,72 +5,98 @@
* See terms of license at gnu.org.
*/
package org.jboss.mq.il;
+import javax.jms.Destination;
import javax.jms.JMSException;
-import javax.jms.Destination;
-import javax.jms.Topic;
import javax.jms.Queue;
-import javax.jms.TemporaryTopic;
import javax.jms.TemporaryQueue;
+import javax.jms.TemporaryTopic;
+import javax.jms.Topic;
+import org.jboss.mq.AcknowledgementRequest;
+import org.jboss.mq.ConnectionToken;
+import org.jboss.mq.DurableSubcriptionID;
+import org.jboss.mq.SpyDestination;
+import org.jboss.mq.SpyMessage;
+import org.jboss.mq.TransactionRequest;
+/**
+ * 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 $
+ */
+public interface ServerIL {
+ public String getID()
+ throws Exception;
+ public TemporaryTopic getTemporaryTopic( ConnectionToken dc )
+ throws Exception;
+ public TemporaryQueue getTemporaryQueue( ConnectionToken dc )
+ throws Exception;
+ public void connectionClosing( ConnectionToken dc )
+ throws Exception;
+ public void checkID( String ID )
+ throws Exception;
+ public void addMessage( ConnectionToken dc, SpyMessage message )
+ throws Exception;
-import org.jboss.mq.SpyDestination;
-import org.jboss.mq.ConnectionToken;
-import org.jboss.mq.AcknowledgementRequest;
-import org.jboss.mq.SpyMessage;
-import org.jboss.mq.TransactionRequest;
-import org.jboss.mq.DurableSubcriptionID;
+ public Queue createQueue( ConnectionToken dc, String dest )
+ throws Exception;
-/**
- * Defines the methods that can be called by a client on
- * the server.
- *
- * @author Hiram Chirino ([EMAIL PROTECTED])
- * @author Norbert Lataille ([EMAIL PROTECTED])
- * @version $Revision: 1.1 $
- */
-public interface ServerIL {
+ public Topic createTopic( ConnectionToken dc, String dest )
+ throws Exception;
- public String getID() throws Exception;
- public TemporaryTopic getTemporaryTopic(ConnectionToken dc) throws Exception;
- public TemporaryQueue getTemporaryQueue(ConnectionToken dc) throws Exception;
- public void connectionClosing(ConnectionToken dc) throws Exception;
- public void checkID(String ID) throws Exception;
- public void addMessage(ConnectionToken dc, SpyMessage message) throws
Exception;
- public Queue createQueue(ConnectionToken dc, String dest) throws Exception;
- public Topic createTopic(ConnectionToken dc, String dest) throws Exception;
- public void deleteTemporaryDestination(ConnectionToken dc, SpyDestination
dest) throws Exception;
- public void transact(ConnectionToken dc, TransactionRequest t) throws
Exception;
- public void acknowledge(ConnectionToken dc, AcknowledgementRequest item)
throws Exception;
- public SpyMessage[] browse(ConnectionToken dc, Destination dest, String
selector) throws Exception;
- public SpyMessage receive(ConnectionToken dc, int subscriberId, long wait)
throws Exception;
- public void setEnabled(ConnectionToken dc, boolean enabled) throws Exception;
- public void unsubscribe(ConnectionToken dc, int subscriptionId) throws
Exception;
- public void destroySubscription(DurableSubcriptionID id) throws Exception;
- public String checkUser(String userName, String password) throws Exception;
+ public void deleteTemporaryDestination( ConnectionToken dc, SpyDestination dest )
+ throws Exception;
+ public void transact( ConnectionToken dc, TransactionRequest t )
+ throws Exception;
- public ServerIL cloneServerIL() throws Exception;
+ public void acknowledge( ConnectionToken dc, AcknowledgementRequest item )
+ 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;
+ public SpyMessage[] browse( ConnectionToken dc, Destination dest, String
selector )
+ throws Exception;
-/**
- *
- * @param dc org.jboss.mq.ConnectionToken
- * @param s org.jboss.mq.Subscription
- * @exception java.lang.Exception The exception description.
- */
-void subscribe(org.jboss.mq.ConnectionToken dc, org.jboss.mq.Subscription s) throws
java.lang.Exception;
-}
\ No newline at end of file
+ public SpyMessage receive( ConnectionToken dc, int subscriberId, long wait )
+ throws Exception;
+
+ public void setEnabled( ConnectionToken dc, boolean enabled )
+ throws Exception;
+
+ public void unsubscribe( ConnectionToken dc, int subscriptionId )
+ throws Exception;
+
+ public void destroySubscription( DurableSubcriptionID id )
+ throws Exception;
+
+ public String checkUser( String userName, String password )
+ throws Exception;
+
+
+ public ServerIL cloneServerIL()
+ 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 dc org.jboss.mq.ConnectionToken
+ * @param s org.jboss.mq.Subscription
+ * @exception java.lang.Exception The exception description.
+ */
+ void subscribe( org.jboss.mq.ConnectionToken dc, org.jboss.mq.Subscription s )
+ throws java.lang.Exception;
+}
1.2 +14 -12 jbossmq/src/main/org/jboss/mq/il/ServerILFactory.java
Index: ServerILFactory.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/ServerILFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServerILFactory.java 2001/08/11 20:59:13 1.1
+++ ServerILFactory.java 2001/08/17 03:04:03 1.2
@@ -9,18 +9,20 @@
import java.util.Properties;
/**
- * This interface is used to define a factory to
- * produce ServerIL objects. This is used by the
- * client in the GenericConnectionFactory class.
+ * This interface is used to define a factory to produce ServerIL objects. This
+ * is used by the client in the GenericConnectionFactory class. Implementations
+ * should provide a default constructor.
*
- * Implementations should provide a default constructor.
- *
- * @author Hiram Chirino ([EMAIL PROTECTED])
- * @version $Revision: 1.1 $
+ * @author Hiram Chirino ([EMAIL PROTECTED])
+ * @created August 16, 2001
+ * @version $Revision: 1.2 $
*/
public interface ServerILFactory {
- // init is called before any calls are made to getServerIL()
- public void init(Properties props) throws Exception;
- // must return a instance of ServerIL or else throw an Exception.
- public ServerIL getServerIL() throws Exception;
-}
\ No newline at end of file
+ // init is called before any calls are made to getServerIL()
+ public void init( Properties props )
+ throws Exception;
+
+ // must return a instance of ServerIL or else throw an Exception.
+ public ServerIL getServerIL()
+ throws Exception;
+}
1.2 +101 -94 jbossmq/src/main/org/jboss/mq/il/ServerILJMXService.java
Index: ServerILJMXService.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/ServerILJMXService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServerILJMXService.java 2001/08/11 20:59:13 1.1
+++ ServerILJMXService.java 2001/08/17 03:04:03 1.2
@@ -7,107 +7,114 @@
package org.jboss.mq.il;
import java.util.Properties;
-import javax.naming.InitialContext;
import javax.management.*;
-
-import org.jboss.util.ServiceMBeanSupport;
-
-
-
-
-
-
+import javax.naming.InitialContext;
import org.jboss.mq.GenericConnectionFactory;
-import org.jboss.mq.server.JMSServer;
-import org.jboss.mq.SpyXAConnectionFactory;
import org.jboss.mq.SpyConnectionFactory;
+import org.jboss.mq.SpyXAConnectionFactory;
+import org.jboss.mq.server.JMSServer;
+
+import org.jboss.util.ServiceMBeanSupport;
/**
- * This abstract class handles life cycle managment of the ServeIL.
- * Should be extended to provide a full implementation.
- *
- * @author Hiram Chirino ([EMAIL PROTECTED])
- *
- * @version $Revision: 1.1 $
+ * This abstract class handles life cycle managment of the ServeIL. Should be
+ * extended to provide a full implementation.
+ *
+ * @author Hiram Chirino ([EMAIL PROTECTED])
+ * @created August 16, 2001
+ * @version $Revision: 1.2 $
*/
-abstract public class ServerILJMXService extends org.jboss.util.ServiceMBeanSupport
implements ServerILJMXServiceMBean {
- private String connectionFactoryJNDIRef;
+public abstract class ServerILJMXService extends org.jboss.util.ServiceMBeanSupport
implements ServerILJMXServiceMBean {
+ private String connectionFactoryJNDIRef;
- private String xaConnectionFactoryJNDIRef;
+ private String xaConnectionFactoryJNDIRef;
- /**
- * @returns Properties contains all the parameters needed to create a
connection from the client to this IL
- */
- abstract public Properties getClientConnectionProperties();
-
- /**
- * @returns ServerIL An instance of the Server IL, used for
- */
- abstract public ServerIL getServerIL();
-
- /**
- * Binds the connection factories for this IL
- * @throws javax.naming.NamingException it cannot be unbound
- */
- public void bindJNDIReferences() throws javax.naming.NamingException {
-
- GenericConnectionFactory gcf= new
GenericConnectionFactory(getServerIL(), getClientConnectionProperties());
- SpyConnectionFactory scf= new SpyConnectionFactory(gcf);
- SpyXAConnectionFactory sxacf= new SpyXAConnectionFactory(gcf);
-
- // Get an InitialContext
- InitialContext ctx= new InitialContext();
- ctx.bind(connectionFactoryJNDIRef, scf);
- ctx.bind(xaConnectionFactoryJNDIRef, sxacf);
-
- }
-
- /**
- * Unbinds the connection factories for this IL
- * @throws javax.naming.NamingException it cannot be unbound
- */
- public void unbindJNDIReferences() throws javax.naming.NamingException {
- // Get an InitialContext
- InitialContext ctx= new InitialContext();
- ctx.unbind(connectionFactoryJNDIRef);
- ctx.unbind(xaConnectionFactoryJNDIRef);
- }
-
- /**
- * @param finds the JMSServer instance via JNDI
- * @throws javax.naming.NamingException if the server is not found
- */
- public JMSServer lookupJMSServer() throws Exception {
- return (JMSServer)getServer().invoke(new
ObjectName(org.jboss.mq.server.JBossMQServiceMBean.OBJECT_NAME), "getJMSServer", new
Object[] {}, new String[] {} );
- }
-
- /**
- * @return java.lang.String the JNDI reference where the connection factory
should be bound to
- */
- public java.lang.String getConnectionFactoryJNDIRef() {
- return connectionFactoryJNDIRef;
- }
-
- /**
- * @return java.lang.String the JNDI reference where the xa connection factory
should be bound to
- */
- public java.lang.String getXAConnectionFactoryJNDIRef() {
- return xaConnectionFactoryJNDIRef;
- }
-
- /**
- * @param newConnectionFactoryJNDIRef the JNDI reference where the connection
factory should be bound to
- */
- public void setConnectionFactoryJNDIRef(java.lang.String
newConnectionFactoryJNDIRef) {
- connectionFactoryJNDIRef= newConnectionFactoryJNDIRef;
- }
-
- /**
- * @param newXaConnectionFactoryJNDIRef java.lang.String the JNDI reference
where the xa connection factory should be bound to
- */
- public void setXAConnectionFactoryJNDIRef(java.lang.String
newXaConnectionFactoryJNDIRef) {
- xaConnectionFactoryJNDIRef= newXaConnectionFactoryJNDIRef;
- }
+ /**
+ * @param newConnectionFactoryJNDIRef the JNDI reference where the
+ * connection factory should be bound to
+ */
+ public void setConnectionFactoryJNDIRef( java.lang.String
newConnectionFactoryJNDIRef ) {
+ connectionFactoryJNDIRef = newConnectionFactoryJNDIRef;
+ }
+
+ /**
+ * @param newXaConnectionFactoryJNDIRef java.lang.String the JNDI reference
+ * where the xa connection factory should be bound to
+ */
+ public void setXAConnectionFactoryJNDIRef( java.lang.String
newXaConnectionFactoryJNDIRef ) {
+ xaConnectionFactoryJNDIRef = newXaConnectionFactoryJNDIRef;
+ }
+
+ /**
+ * @return The ClientConnectionProperties value
+ * @returns Properties contains all the parameters needed to create a
+ * connection from the client to this IL
+ */
+ public abstract Properties getClientConnectionProperties();
+
+ /**
+ * @return The ServerIL value
+ * @returns ServerIL An instance of the Server IL, used for
+ */
+ public abstract ServerIL getServerIL();
+
+ /**
+ * @return java.lang.String the JNDI reference where the connection
+ * factory should be bound to
+ */
+ public java.lang.String getConnectionFactoryJNDIRef() {
+ return connectionFactoryJNDIRef;
+ }
+
+ /**
+ * @return java.lang.String the JNDI reference where the xa connection
+ * factory should be bound to
+ */
+ public java.lang.String getXAConnectionFactoryJNDIRef() {
+ return xaConnectionFactoryJNDIRef;
+ }
+
+ /**
+ * Binds the connection factories for this IL
+ *
+ * @throws javax.naming.NamingException it cannot be unbound
+ */
+ public void bindJNDIReferences()
+ throws javax.naming.NamingException {
+
+ GenericConnectionFactory gcf = new GenericConnectionFactory( getServerIL(),
getClientConnectionProperties() );
+ SpyConnectionFactory scf = new SpyConnectionFactory( gcf );
+ SpyXAConnectionFactory sxacf = new SpyXAConnectionFactory( gcf );
+
+ // Get an InitialContext
+ InitialContext ctx = new InitialContext();
+ ctx.bind( connectionFactoryJNDIRef, scf );
+ ctx.bind( xaConnectionFactoryJNDIRef, sxacf );
+
+ }
+
+ /**
+ * Unbinds the connection factories for this IL
+ *
+ * @throws javax.naming.NamingException it cannot be unbound
+ */
+ public void unbindJNDIReferences()
+ throws javax.naming.NamingException {
+ // Get an InitialContext
+ InitialContext ctx = new InitialContext();
+ ctx.unbind( connectionFactoryJNDIRef );
+ ctx.unbind( xaConnectionFactoryJNDIRef );
+ }
+
+ /**
+ * @return Description of the Returned Value
+ * @exception Exception Description of Exception
+ * @throws javax.naming.NamingException if the server is not found
+ */
+ public JMSServer lookupJMSServer()
+ throws Exception {
+ return ( JMSServer )getServer().invoke( new ObjectName(
org.jboss.mq.server.JBossMQServiceMBean.OBJECT_NAME ), "getJMSServer", new Object[]{},
new String[]{} );
+ }
-}
\ No newline at end of file
+}
1.2 +26 -24 jbossmq/src/main/org/jboss/mq/il/ServerILJMXServiceMBean.java
Index: ServerILJMXServiceMBean.java
===================================================================
RCS file:
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/ServerILJMXServiceMBean.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServerILJMXServiceMBean.java 2001/08/11 20:59:13 1.1
+++ ServerILJMXServiceMBean.java 2001/08/17 03:04:03 1.2
@@ -9,33 +9,35 @@
import java.lang.Object;
/**
- * This interface is used to define which methods will be exposed
- * via JMX.
+ * This interface is used to define which methods will be exposed via JMX.
*
- * @author Hiram Chirino ([EMAIL PROTECTED])
- * @version $Revision: 1.1 $
+ * @author Hiram Chirino ([EMAIL PROTECTED])
+ * @created August 16, 2001
+ * @version $Revision: 1.2 $
*/
-public interface ServerILJMXServiceMBean extends org.jboss.util.ServiceMBean
-{
+public interface ServerILJMXServiceMBean extends org.jboss.util.ServiceMBean {
+ /**
+ * @return java.lang.String the JNDI reference where the connection
+ * factory should be bound to
+ */
+ public java.lang.String getConnectionFactoryJNDIRef();
- /**
- * @return java.lang.String the JNDI reference where the connection factory
should be bound to
- */
- public java.lang.String getConnectionFactoryJNDIRef();
+ /**
+ * @param newConnectionFactoryJNDIRef the JNDI reference where the
+ * connection factory should be bound to
+ */
+ public void setConnectionFactoryJNDIRef( java.lang.String
newConnectionFactoryJNDIRef );
- /**
- * @param newConnectionFactoryJNDIRef the JNDI reference where the connection
factory should be bound to
- */
- public void setConnectionFactoryJNDIRef(java.lang.String
newConnectionFactoryJNDIRef);
+ /**
+ * @param newXaConnectionFactoryJNDIRef java.lang.String the JNDI reference
+ * where the xa connection factory should be bound to
+ */
+ public void setXAConnectionFactoryJNDIRef( java.lang.String
newXaConnectionFactoryJNDIRef );
- /**
- * @param newXaConnectionFactoryJNDIRef java.lang.String the JNDI reference
where the xa connection factory should be bound to
- */
- public void setXAConnectionFactoryJNDIRef(java.lang.String
newXaConnectionFactoryJNDIRef);
-
- /**
- * @return java.lang.String the JNDI reference where the xa connection factory
should be bound to
- */
- public java.lang.String getXAConnectionFactoryJNDIRef();
-}
\ No newline at end of file
+ /**
+ * @return java.lang.String the JNDI reference where the xa connection
+ * factory should be bound to
+ */
+ public java.lang.String getXAConnectionFactoryJNDIRef();
+}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development