User: chirino Date: 01/08/16 20:04:04 Modified: src/main/org/jboss/mq/il/rmi RMIClientIL.java RMIClientILRemote.java RMIClientILService.java RMIServerIL.java RMIServerILRemote.java RMIServerILService.java RMIServerILServiceMBean.java Log: Used the ejbdoclet pretty task to auto-indent the source files to the 3 space standard. Revision Changes Path 1.2 +43 -41 jbossmq/src/main/org/jboss/mq/il/rmi/RMIClientIL.java Index: RMIClientIL.java =================================================================== RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/rmi/RMIClientIL.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RMIClientIL.java 2001/08/11 20:59:13 1.1 +++ RMIClientIL.java 2001/08/17 03:04:04 1.2 @@ -8,52 +8,54 @@ import javax.jms.Destination; import javax.jms.JMSException; - - - - - +import org.jboss.mq.Connection; +import org.jboss.mq.ReceiveRequest; import org.jboss.mq.SpyDestination; -import org.jboss.mq.ReceiveRequest; import org.jboss.mq.il.ClientIL; -import org.jboss.mq.Connection; /** - * The RMI implementation of the ConnectionReceiver object - * - * @author Norbert Lataille ([EMAIL PROTECTED]) - * @author Hiram Chirino ([EMAIL PROTECTED]) - * - * @version $Revision: 1.1 $ + * The RMI implementation of the ConnectionReceiver object + * + * @author Norbert Lataille ([EMAIL PROTECTED]) + * @author Hiram Chirino ([EMAIL PROTECTED]) + * @created August 16, 2001 + * @version $Revision: 1.2 $ */ public class RMIClientIL extends java.rmi.server.UnicastRemoteObject implements RMIClientILRemote { - // A reference to the connection - Connection connection; - // Are we running - boolean stopped= true; - - 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(); - } - - //One TemporaryDestination has been deleted - 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); - } -} \ No newline at end of file + // A reference to the connection + Connection connection; + // Are we running + boolean stopped = true; + + 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(); + } + + //One TemporaryDestination has been deleted + 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 ); + } +} 1.2 +17 -24 jbossmq/src/main/org/jboss/mq/il/rmi/RMIClientILRemote.java Index: RMIClientILRemote.java =================================================================== RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/rmi/RMIClientILRemote.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RMIClientILRemote.java 2001/08/11 20:59:13 1.1 +++ RMIClientILRemote.java 2001/08/17 03:04:04 1.2 @@ -8,36 +8,29 @@ import javax.jms.Destination; import javax.jms.JMSException; - - - - - +import org.jboss.mq.Connection; +import org.jboss.mq.ReceiveRequest; import org.jboss.mq.SpyDestination; -import org.jboss.mq.ReceiveRequest; import org.jboss.mq.il.ClientIL; -import org.jboss.mq.Connection; /** - * The RMI implementation of the ConnectionReceiver object - * - * @author Norbert Lataille ([EMAIL PROTECTED]) - * @author Hiram Chirino ([EMAIL PROTECTED]) - * - * @version $Revision: 1.1 $ + * The RMI implementation of the ConnectionReceiver object + * + * @author Norbert Lataille ([EMAIL PROTECTED]) + * @author Hiram Chirino ([EMAIL PROTECTED]) + * @created August 16, 2001 + * @version $Revision: 1.2 $ */ public interface RMIClientILRemote extends ClientIL, java.rmi.Remote { - - - - - - - public void close() throws Exception; - //One TemporaryDestination has been deleted - public void deleteTemporaryDestination(SpyDestination dest) throws Exception; + public void close() + throws Exception; - public void receive(ReceiveRequest messages[]) throws Exception; -} \ No newline at end of file + //One TemporaryDestination has been deleted + public void deleteTemporaryDestination( SpyDestination dest ) + throws Exception; + + public void receive( ReceiveRequest messages[] ) + throws Exception; +} 1.2 +52 -48 jbossmq/src/main/org/jboss/mq/il/rmi/RMIClientILService.java Index: RMIClientILService.java =================================================================== RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/rmi/RMIClientILService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RMIClientILService.java 2001/08/11 20:59:13 1.1 +++ RMIClientILService.java 2001/08/17 03:04:04 1.2 @@ -8,61 +8,65 @@ import javax.jms.Destination; import javax.jms.JMSException; - - - - - - +import org.jboss.mq.Connection; +import org.jboss.mq.ReceiveRequest; import org.jboss.mq.SpyDestination; -import org.jboss.mq.ReceiveRequest; import org.jboss.mq.il.ClientIL; -import org.jboss.mq.Connection; import org.jboss.mq.il.ClientILService; /** - * The RMI implementation of the ConnectionReceiver object - * - * @author Norbert Lataille ([EMAIL PROTECTED]) - * @author Hiram Chirino ([EMAIL PROTECTED]) - * - * @version $Revision: 1.1 $ + * The RMI implementation of the ConnectionReceiver object + * + * @author Norbert Lataille ([EMAIL PROTECTED]) + * @author Hiram Chirino ([EMAIL PROTECTED]) + * @created August 16, 2001 + * @version $Revision: 1.2 $ */ public class RMIClientILService implements org.jboss.mq.il.ClientILService { - - //the client IL - RMIClientIL clientIL; - - - + //the client IL + RMIClientIL clientIL; - /** - * start method comment. - */ - public void start() throws java.lang.Exception { - clientIL.stopped= false; - } - - /** - * - */ - public void stop() throws java.lang.Exception { - clientIL.stopped= false; - } - - /** - * getClientIL method comment. - */ - public org.jboss.mq.il.ClientIL getClientIL() throws java.lang.Exception { - return clientIL; - } - - /** - * init method comment. - */ - public void init(org.jboss.mq.Connection connection, java.util.Properties props) throws java.lang.Exception { - clientIL= new RMIClientIL(connection); - } -} \ No newline at end of file + /** + * getClientIL method comment. + * + * @return The ClientIL value + * @exception java.lang.Exception Description of Exception + */ + public org.jboss.mq.il.ClientIL getClientIL() + throws java.lang.Exception { + return clientIL; + } + + + /** + * start method comment. + * + * @exception java.lang.Exception Description of Exception + */ + public void start() + throws java.lang.Exception { + clientIL.stopped = false; + } + + /** + * @exception java.lang.Exception Description of Exception + */ + public void stop() + throws java.lang.Exception { + clientIL.stopped = false; + } + + /** + * init method comment. + * + * @param connection Description of Parameter + * @param props Description of Parameter + * @exception java.lang.Exception Description of Exception + */ + public void init( org.jboss.mq.Connection connection, java.util.Properties props ) + throws java.lang.Exception { + clientIL = new RMIClientIL( connection ); + } +} 1.2 +126 -117 jbossmq/src/main/org/jboss/mq/il/rmi/RMIServerIL.java Index: RMIServerIL.java =================================================================== RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/rmi/RMIServerIL.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RMIServerIL.java 2001/08/11 20:59:13 1.1 +++ RMIServerIL.java 2001/08/17 03:04:04 1.2 @@ -5,134 +5,143 @@ * See terms of license at gnu.org. */ package org.jboss.mq.il.rmi; +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 org.jboss.mq.il.ServerIL; -import org.jboss.mq.SpyDestination; -import org.jboss.mq.ConnectionToken; +import javax.jms.TemporaryTopic; +import javax.jms.Topic; import org.jboss.mq.AcknowledgementRequest; -import org.jboss.mq.server.JMSServer; +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; -import org.jboss.mq.DurableSubcriptionID; + +import org.jboss.mq.il.ServerIL; +import org.jboss.mq.server.JMSServer; /** - * The JVM implementation of the ServerIL object - * - * @author Hiram Chirino ([EMAIL PROTECTED]) - * @author Norbert Lataille ([EMAIL PROTECTED]) + * The JVM implementation of the ServerIL object * - * @version $Revision: 1.1 $ + * @author Hiram Chirino ([EMAIL PROTECTED]) + * @author Norbert Lataille ([EMAIL PROTECTED]) + * @created August 16, 2001 + * @version $Revision: 1.2 $ */ public class RMIServerIL extends java.rmi.server.UnicastRemoteObject implements RMIServerILRemote { - - //The server implementation - transient private JMSServer server; - - public RMIServerIL(JMSServer s) throws java.rmi.RemoteException { - server= s; - } - - /** - * No need to clone because there are no instance variables tha can get - * clobbered. All Multiple connections can share the same JVMServerIL object - */ - public ServerIL cloneServerIL() { - return this; - } - - public void setConnectionToken(ConnectionToken newConnectionToken) { - // We cannot try to cache the token since this IL is stateless - } - - public String getID() throws JMSException { - return server.getID(); - } - - public void addMessage(ConnectionToken dc, SpyMessage val) throws JMSException { - server.addMessage(dc, val); - } - - public Topic createTopic(ConnectionToken dc, String dest) throws JMSException { - return server.createTopic(dc, dest); - } - - public Queue createQueue(ConnectionToken dc, String dest) throws JMSException { - return server.createQueue(dc, dest); - } - - public void deleteTemporaryDestination(ConnectionToken dc, SpyDestination dest) throws JMSException { - server.deleteTemporaryDestination(dc, dest); - } - - public void checkID(String ID) throws JMSException { - server.checkID(ID); - } - - public void connectionClosing(ConnectionToken dc) throws JMSException { - server.connectionClosing(dc); - } - - public TemporaryQueue getTemporaryQueue(ConnectionToken dc) throws JMSException { - return server.getTemporaryQueue(dc); - } - - public TemporaryTopic getTemporaryTopic(ConnectionToken dc) throws JMSException { - return server.getTemporaryTopic(dc); - } - - public void acknowledge(ConnectionToken dc, AcknowledgementRequest item) throws Exception, java.rmi.RemoteException { - server.acknowledge(dc, item); - } - - public SpyMessage[] browse(ConnectionToken dc, Destination dest, String selector) throws Exception { - return server.browse(dc, dest, selector); - } - - public SpyMessage receive(ConnectionToken dc, int subscriberId, long wait) throws Exception { - return server.receive(dc, subscriberId, wait); - } - - public void setEnabled(ConnectionToken dc, boolean enabled) throws Exception { - server.setEnabled(dc, enabled); - } - - public void unsubscribe(ConnectionToken dc, int subscriptionId) throws Exception { - server.unsubscribe(dc, subscriptionId); - } - - public void destroySubscription(DurableSubcriptionID id) throws Exception { - server.destroySubscription(id); - } - - public String checkUser(String userName, String password) throws JMSException { - return server.checkUser(userName, password); - } - - - - - public void subscribe(ConnectionToken dc, org.jboss.mq.Subscription s) throws Exception { - server.subscribe(dc, s); - } + //The server implementation + private transient JMSServer server; - public void transact(org.jboss.mq.ConnectionToken dc, TransactionRequest t) throws JMSException { - server.transact(dc, t); - } -} \ No newline at end of file + public RMIServerIL( JMSServer s ) + throws java.rmi.RemoteException { + server = s; + } + + public void setConnectionToken( ConnectionToken newConnectionToken ) { + // We cannot try to cache the token since this IL is stateless + } + + public void setEnabled( ConnectionToken dc, boolean enabled ) + throws Exception { + server.setEnabled( dc, enabled ); + } + + public String getID() + throws JMSException { + return server.getID(); + } + + public TemporaryQueue getTemporaryQueue( ConnectionToken dc ) + throws JMSException { + return server.getTemporaryQueue( dc ); + } + + public TemporaryTopic getTemporaryTopic( ConnectionToken dc ) + throws JMSException { + return server.getTemporaryTopic( dc ); + } + + /** + * No need to clone because there are no instance variables tha can get + * clobbered. All Multiple connections can share the same JVMServerIL object + * + * @return Description of the Returned Value + */ + public ServerIL cloneServerIL() { + return this; + } + + public void addMessage( ConnectionToken dc, SpyMessage val ) + throws JMSException { + server.addMessage( dc, val ); + } + + public Topic createTopic( ConnectionToken dc, String dest ) + throws JMSException { + return server.createTopic( dc, dest ); + } + + public Queue createQueue( ConnectionToken dc, String dest ) + throws JMSException { + return server.createQueue( dc, dest ); + } + + public void deleteTemporaryDestination( ConnectionToken dc, SpyDestination dest ) + throws JMSException { + server.deleteTemporaryDestination( dc, dest ); + } + + public void checkID( String ID ) + throws JMSException { + server.checkID( ID ); + } + + public void connectionClosing( ConnectionToken dc ) + throws JMSException { + server.connectionClosing( dc ); + } + + public void acknowledge( ConnectionToken dc, AcknowledgementRequest item ) + throws Exception, java.rmi.RemoteException { + server.acknowledge( dc, item ); + } + + public SpyMessage[] browse( ConnectionToken dc, Destination dest, String selector ) + throws Exception { + return server.browse( dc, dest, selector ); + } + + public SpyMessage receive( ConnectionToken dc, int subscriberId, long wait ) + throws Exception { + return server.receive( dc, subscriberId, wait ); + } + + public void unsubscribe( ConnectionToken dc, int subscriptionId ) + throws Exception { + server.unsubscribe( dc, subscriptionId ); + } + + public void destroySubscription( DurableSubcriptionID id ) + throws Exception { + server.destroySubscription( id ); + } + + public String checkUser( String userName, String password ) + throws JMSException { + return server.checkUser( userName, password ); + } + + + public void subscribe( ConnectionToken dc, org.jboss.mq.Subscription s ) + throws Exception { + server.subscribe( dc, s ); + } + + public void transact( org.jboss.mq.ConnectionToken dc, TransactionRequest t ) + throws JMSException { + server.transact( dc, t ); + } +} 1.2 +14 -22 jbossmq/src/main/org/jboss/mq/il/rmi/RMIServerILRemote.java Index: RMIServerILRemote.java =================================================================== RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/rmi/RMIServerILRemote.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RMIServerILRemote.java 2001/08/11 20:59:13 1.1 +++ RMIServerILRemote.java 2001/08/17 03:04:04 1.2 @@ -5,37 +5,29 @@ * See terms of license at gnu.org. */ package org.jboss.mq.il.rmi; +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 org.jboss.mq.il.ServerIL; -import org.jboss.mq.SpyDestination; -import org.jboss.mq.ConnectionToken; +import javax.jms.TemporaryTopic; +import javax.jms.Topic; import org.jboss.mq.AcknowledgementRequest; -import org.jboss.mq.server.JMSServer; +import org.jboss.mq.ConnectionToken; +import org.jboss.mq.SpyDestination; import org.jboss.mq.SpyMessage; import org.jboss.mq.TransactionRequest; +import org.jboss.mq.il.ServerIL; +import org.jboss.mq.server.JMSServer; + /** - * The JVM implementation of the ServerIL object - * - * @author Hiram Chirino ([EMAIL PROTECTED]) - * @author Norbert Lataille ([EMAIL PROTECTED]) + * The JVM implementation of the ServerIL object * - * @version $Revision: 1.1 $ + * @author Hiram Chirino ([EMAIL PROTECTED]) + * @author Norbert Lataille ([EMAIL PROTECTED]) + * @created August 16, 2001 + * @version $Revision: 1.2 $ */ public interface RMIServerILRemote extends ServerIL, java.rmi.Remote { @@ -61,4 +53,4 @@ // public void subscribe(ConnectionToken dc, org.jboss.mq.Subscription s) throws Exception; // public void transact(org.jboss.mq.ConnectionToken dc, TransactionRequest t) throws Exception; -} \ No newline at end of file +} 1.2 +66 -61 jbossmq/src/main/org/jboss/mq/il/rmi/RMIServerILService.java Index: RMIServerILService.java =================================================================== RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/rmi/RMIServerILService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RMIServerILService.java 2001/08/11 20:59:13 1.1 +++ RMIServerILService.java 2001/08/17 03:04:04 1.2 @@ -7,75 +7,80 @@ package org.jboss.mq.il.rmi; 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.il.ServerIL; -import org.jboss.mq.GenericConnectionFactory; import org.jboss.mq.il.ServerILJMXService; import org.jboss.mq.server.JMSServer; +import org.jboss.util.ServiceMBeanSupport; + /** - * Implements the ServerILJMXService which is used to - * manage the JVM IL. + * Implements the ServerILJMXService which is used to manage the JVM IL. * - * @author Hiram Chirino ([EMAIL PROTECTED]) - * @version $Revision: 1.1 $ + * @author Hiram Chirino ([EMAIL PROTECTED]) + * @created August 16, 2001 + * @version $Revision: 1.2 $ */ public class RMIServerILService extends org.jboss.mq.il.ServerILJMXService implements RMIServerILServiceMBean { - RMIServerIL serverIL; + RMIServerIL serverIL; - /** - * Gives this JMX service a name. - */ - public String getName() { - return "JBossMQ-JVMServerIL"; - } - - /** - * Used to construct the GenericConnectionFactory (bindJNDIReferences() builds it) - * @returns ServerIL the instance of this IL - */ - public ServerIL getServerIL() { - return serverIL; - } - - /** - * Starts this IL, and binds it to JNDI - */ - public void startService() throws Exception { - - serverIL= new RMIServerIL(lookupJMSServer()); - bindJNDIReferences(); - - } - - /** - * Stops this IL, and unbinds it from JNDI - */ - public void stopService() { - try { - unbindJNDIReferences(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Used to construct the GenericConnectionFactory (bindJNDIReferences() builds it) - * Sets up the connection properties need by a client to use this - * IL - */ - public java.util.Properties getClientConnectionProperties() { - Properties rc= new Properties(); - rc.setProperty(GenericConnectionFactory.CLIENT_IL_SERVICE_KEY, "org.jboss.mq.il.rmi.RMIClientILService"); - return rc; - } -} \ No newline at end of file + /** + * Gives this JMX service a name. + * + * @return The Name value + */ + public String getName() { + return "JBossMQ-JVMServerIL"; + } + + /** + * Used to construct the GenericConnectionFactory (bindJNDIReferences() + * builds it) + * + * @return The ServerIL value + * @returns ServerIL the instance of this IL + */ + public ServerIL getServerIL() { + return serverIL; + } + + /** + * Used to construct the GenericConnectionFactory (bindJNDIReferences() + * builds it) Sets up the connection properties need by a client to use this + * IL + * + * @return The ClientConnectionProperties value + */ + public java.util.Properties getClientConnectionProperties() { + Properties rc = new Properties(); + rc.setProperty( GenericConnectionFactory.CLIENT_IL_SERVICE_KEY, "org.jboss.mq.il.rmi.RMIClientILService" ); + return rc; + } + + /** + * Starts this IL, and binds it to JNDI + * + * @exception Exception Description of Exception + */ + public void startService() + throws Exception { + + serverIL = new RMIServerIL( lookupJMSServer() ); + bindJNDIReferences(); + + } + + /** + * Stops this IL, and unbinds it from JNDI + */ + public void stopService() { + try { + unbindJNDIReferences(); + } catch ( Exception e ) { + e.printStackTrace(); + } + } +} 1.2 +5 -5 jbossmq/src/main/org/jboss/mq/il/rmi/RMIServerILServiceMBean.java Index: RMIServerILServiceMBean.java =================================================================== RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/rmi/RMIServerILServiceMBean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RMIServerILServiceMBean.java 2001/08/11 20:59:13 1.1 +++ RMIServerILServiceMBean.java 2001/08/17 03:04:04 1.2 @@ -9,9 +9,9 @@ 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. + * + * @created August 16, 2001 */ -public interface RMIServerILServiceMBean extends org.jboss.mq.il.ServerILJMXServiceMBean -{ -} \ No newline at end of file +public interface RMIServerILServiceMBean extends org.jboss.mq.il.ServerILJMXServiceMBean { +} _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development