User: pra
Date: 02/03/06 09:27:49
Modified: src/main/org/jboss/mq/il ClientIL.java ServerIL.java
ServerILJMXService.java
Log:
Commit of JBossMQ new JAAS based security architecture
Revision Changes Path
1.4 +6 -9 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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ClientIL.java 26 Sep 2001 05:02:27 -0000 1.3
+++ ClientIL.java 6 Mar 2002 17:27:49 -0000 1.4
@@ -15,15 +15,14 @@
*
* @author Hiram Chirino ([EMAIL PROTECTED])
* @author Norbert Lataille ([EMAIL PROTECTED])
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @created August 16, 2001
*/
public interface ClientIL
{
- //One TemporaryDestination has been deleted
/**
- * #Description of the Method
+ * One TemporaryDestination has been deleted
*
* @param dest Description of Parameter
* @exception Exception Description of Exception
@@ -31,18 +30,17 @@
public void deleteTemporaryDestination(SpyDestination dest)
throws Exception;
- //The connection is closed
/**
- * #Description of the Method
+ * The connection is closed
*
* @exception Exception Description of Exception
*/
public void close()
throws Exception;
- //A message has arrived for the Connection
+ //
/**
- * #Description of the Method
+ * A message has arrived for the Connection. Deliver messages to client.
*
* @param messages Description of Parameter
* @exception Exception Description of Exception
@@ -50,9 +48,8 @@
public void receive(ReceiveRequest messages[])
throws Exception;
- // Response to a ping sent by a client
/**
- * #Description of the Method
+ * Response to a ping sent by a client.
*
* @param serverTime Description of Parameter
* @exception Exception Description of Exception
1.5 +41 -20 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.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ServerIL.java 2 Feb 2002 04:02:23 -0000 1.4
+++ ServerIL.java 6 Mar 2002 17:27:49 -0000 1.5
@@ -23,18 +23,20 @@
/**
* 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.4 $
+ * @author <a href="[EMAIL PROTECTED]">Hiram Chirino</a>
+ * @author <a href="[EMAIL PROTECTED]">Norbert Lataille</a>
+ * @author <a href="[EMAIL PROTECTED]">Peter Antman</a>
+ * @version $Revision: 1.5 $
* @created August 16, 2001
*/
public interface ServerIL
{
/**
- * Gets the ID attribute of the ServerIL object
+ * Get a clientID from the server. It is up to the server side components
+ * to update the ConectionToken if this method returns normaly.
*
- * @return The ID value
+ * @return an internally generated clientID.
* @exception Exception Description of Exception
*/
public String getID()
@@ -61,7 +63,7 @@
throws Exception;
/**
- * #Description of the Method
+ * The client is closing the connection.
*
* @param dc Description of Parameter
* @exception Exception Description of Exception
@@ -70,16 +72,20 @@
throws Exception;
/**
- * #Description of the Method
+ * Check if clientID is a valid ID.
*
- * @param ID Description of Parameter
- * @exception Exception Description of Exception
+ * This method should be called when the client tries to set its own
+ * clientID. It is up to the server side components
+ * to update the ConectionToken if this method returns normaly.
+ *
+ * @param ID a clientID set by the client.
+ * @exception Exception if the clientID was not vallid.
*/
public void checkID(String ID)
throws Exception;
/**
- * Adds a feature to the Message attribute of the ServerIL object
+ * Adds a message to the destination specifyed in the message.
*
* @param dc The feature to be added to the Message attribute
* @param message The feature to be added to the Message attribute
@@ -153,7 +159,7 @@
throws Exception;
/**
- * #Description of the Method
+ * Get a message synchronously.
*
* @param dc Description of Parameter
* @param subscriberId Description of Parameter
@@ -175,7 +181,7 @@
throws Exception;
/**
- * #Description of the Method
+ * Remove a consumer. Is NOT the same as the topic session unsubscribe.
*
* @param dc Description of Parameter
* @param subscriptionId Description of Parameter
@@ -185,26 +191,41 @@
throws Exception;
/**
- * #Description of the Method
+ * Unsubscribe from a durable subscription.
*
* @param id Description of Parameter
* @exception Exception Description of Exception
*/
- public void destroySubscription(DurableSubscriptionID id)
+ public void destroySubscription(ConnectionToken dc,DurableSubscriptionID id)
throws Exception;
/**
- * #Description of the Method
+ * Get a clientID for a given user/password.
*
- * @param userName Description of Parameter
- * @param password Description of Parameter
- * @return Description of the Returned Value
+ * May also be used for autentication if StateManager is used as
+ * authenticator.
+ *
+ * @param userName a valid user name that the StateManager knows about.
+ * @param password a password
+ * @return a preconfigured clientID or null.
* @exception Exception Description of Exception
*/
public String checkUser(String userName, String password)
throws Exception;
-
+ /**
+ * Authenticate the user.
+ *
+ * If using a securityManager the user will be autenticated by that.
+ *
+ * @param userName a username.
+ * @param password a password.
+ * @return a sessionid, valid only for the life of this connection.
+ * @exception Exception Description of Exception
+ */
+ public String authenticate(String userName, String password)
+ throws Exception;
+
/**
* #Description of the Method
*
@@ -230,7 +251,7 @@
throws java.lang.Exception;
/**
- * #Description of the Method
+ * Ping the server.
*
* @param dc Description of Parameter
* @param clientTime Description of Parameter
1.10 +5 -5 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.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ServerILJMXService.java 15 Feb 2002 20:59:52 -0000 1.9
+++ ServerILJMXService.java 6 Mar 2002 17:27:49 -0000 1.10
@@ -12,7 +12,7 @@
import org.jboss.mq.GenericConnectionFactory;
import org.jboss.mq.SpyConnectionFactory;
import org.jboss.mq.SpyXAConnectionFactory;
-import org.jboss.mq.server.JMSServer;
+import org.jboss.mq.server.JMSServerInvoker;
import org.jboss.system.ServiceMBeanSupport;
import javax.naming.Context;
import javax.naming.NamingException;
@@ -23,13 +23,13 @@
*
* @author Hiram Chirino ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a>
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
*/
public abstract class ServerILJMXService extends ServiceMBeanSupport implements
ServerILJMXServiceMBean
{
private ObjectName jbossMQService;
- private JMSServer jmsServer;
+ private JMSServerInvoker jmsServer;
protected String connectionFactoryJNDIRef;
protected String xaConnectionFactoryJNDIRef;
@@ -57,7 +57,7 @@
public void startService() throws Exception
{
- jmsServer = (JMSServer)getServer().getAttribute(jbossMQService, "JMSServer");;
+ jmsServer = (JMSServerInvoker)getServer().getAttribute(jbossMQService,
"JMSServer");;
if (jmsServer == null)
{
throw new IllegalStateException("Cannot find JBossMQService!");
@@ -176,7 +176,7 @@
* @exception Exception Description of Exception
* @throws javax.naming.NamingException if the server is not found
*/
- public JMSServer lookupJMSServer() throws Exception
+ public JMSServerInvoker lookupJMSServer()
{
return jmsServer;
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development