站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 messaging API Documentation 英文版文档

ServerIL (JBoss Messaging API) - JBoss 4.0.1 sp1 messaging API Documentation 英文版文档


org.jboss.mq.il
Interface ServerIL

All Known Subinterfaces:
RMIServerILRemote
All Known Implementing Classes:
HTTPServerIL, JVMServerIL, OIL2ServerIL, OILServerIL, RMIServerIL, UILServerIL

public interface ServerIL

Defines the methods that can be called by a client on the server.

Version:
$Revision: 1.9 $
Author:
Hiram Chirino, Norbert Lataille, Peter Antman

Method Summary
 void acknowledge(ConnectionToken dc, AcknowledgementRequest item)
          #Description of the Method
 void addMessage(ConnectionToken dc, SpyMessage message)
          Adds a message to the destination specifyed in the message.
 String authenticate(String userName, String password)
          Authenticate the user.
 SpyMessage[] browse(ConnectionToken dc, javax.jms.Destination dest, String selector)
          #Description of the Method
 void checkID(String ID)
          Check if clientID is a valid ID.
 String checkUser(String userName, String password)
          Get a clientID for a given user/password.
 ServerIL cloneServerIL()
          #Description of the Method
 void connectionClosing(ConnectionToken dc)
          The client is closing the connection.
 javax.jms.Queue createQueue(ConnectionToken dc, String dest)
          #Description of the Method
 javax.jms.Topic createTopic(ConnectionToken dc, String dest)
          #Description of the Method
 void deleteTemporaryDestination(ConnectionToken dc, SpyDestination dest)
          #Description of the Method
 void destroySubscription(ConnectionToken dc, DurableSubscriptionID id)
          Unsubscribe from a durable subscription.
 String getID()
          Get a clientID from the server.
 javax.jms.TemporaryQueue getTemporaryQueue(ConnectionToken dc)
          Gets the TemporaryQueue attribute of the ServerIL object
 javax.jms.TemporaryTopic getTemporaryTopic(ConnectionToken dc)
          Gets the TemporaryTopic attribute of the ServerIL object
 void ping(ConnectionToken dc, long clientTime)
          Ping the server.
 SpyMessage receive(ConnectionToken dc, int subscriberId, long wait)
          Get a message synchronously.
 void setConnectionToken(ConnectionToken newConnectionToken)
           
 void setEnabled(ConnectionToken dc, boolean enabled)
          Sets the Enabled attribute of the ServerIL object
 void subscribe(ConnectionToken dc, Subscription s)
           
 void transact(ConnectionToken dc, TransactionRequest t)
          #Description of the Method
 void unsubscribe(ConnectionToken dc, int subscriptionId)
          Remove a consumer.
 

Method Detail

cloneServerIL

public ServerIL cloneServerIL()
                       throws Exception
#Description of the Method

Returns:
Description of the Returned Value
Throws:
Exception - Description of Exception

setConnectionToken

public void setConnectionToken(ConnectionToken newConnectionToken)
                        throws Exception
Parameters:
newConnectionToken - org.jboss.mq.ConnectionToken
Throws:
Exception - The exception description.

getID

public String getID()
             throws Exception
Get a clientID from the server. It is up to the server side components to update the ConectionToken if this method returns normaly.

Returns:
an internally generated clientID.
Throws:
Exception - Description of Exception

getTemporaryTopic

public javax.jms.TemporaryTopic getTemporaryTopic(ConnectionToken dc)
                                           throws Exception
Gets the TemporaryTopic attribute of the ServerIL object

Parameters:
dc - Description of Parameter
Returns:
The TemporaryTopic value
Throws:
Exception - Description of Exception

getTemporaryQueue

public javax.jms.TemporaryQueue getTemporaryQueue(ConnectionToken dc)
                                           throws Exception
Gets the TemporaryQueue attribute of the ServerIL object

Parameters:
dc - Description of Parameter
Returns:
The TemporaryQueue value
Throws:
Exception - Description of Exception

connectionClosing

public void connectionClosing(ConnectionToken dc)
                       throws Exception
The client is closing the connection.

Parameters:
dc - Description of Parameter
Throws:
Exception - Description of Exception

checkID

public void checkID(String ID)
             throws Exception
Check if clientID is a valid ID. 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.

Parameters:
ID - a clientID set by the client.
Throws:
Exception - if the clientID was not vallid.

addMessage

public void addMessage(ConnectionToken dc,
                       SpyMessage message)
                throws Exception
Adds a message to the destination specifyed in the message.

Parameters:
dc - The feature to be added to the Message attribute
message - The feature to be added to the Message attribute
Throws:
Exception - Description of Exception

createQueue

public javax.jms.Queue createQueue(ConnectionToken dc,
                                   String dest)
                            throws Exception
#Description of the Method

Parameters:
dc - Description of Parameter
dest - Description of Parameter
Returns:
Description of the Returned Value
Throws:
Exception - Description of Exception

createTopic

public javax.jms.Topic createTopic(ConnectionToken dc,
                                   String dest)
                            throws Exception
#Description of the Method

Parameters:
dc - Description of Parameter
dest - Description of Parameter
Returns:
Description of the Returned Value
Throws:
Exception - Description of Exception

deleteTemporaryDestination

public void deleteTemporaryDestination(ConnectionToken dc,
                                       SpyDestination dest)
                                throws Exception
#Description of the Method

Parameters:
dc - Description of Parameter
dest - Description of Parameter
Throws:
Exception - Description of Exception

transact

public void transact(ConnectionToken dc,
                     TransactionRequest t)
              throws Exception
#Description of the Method

Parameters:
dc - Description of Parameter
t - Description of Parameter
Throws:
Exception - Description of Exception

acknowledge

public void acknowledge(ConnectionToken dc,
                        AcknowledgementRequest item)
                 throws Exception
#Description of the Method

Parameters:
dc - Description of Parameter
item - Description of Parameter
Throws:
Exception - Description of Exception

browse

public SpyMessage[] browse(ConnectionToken dc,
                           javax.jms.Destination dest,
                           String selector)
                    throws Exception
#Description of the Method

Parameters:
dc - Description of Parameter
dest - Description of Parameter
selector - Description of Parameter
Returns:
Description of the Returned Value
Throws:
Exception - Description of Exception

receive

public SpyMessage receive(ConnectionToken dc,
                          int subscriberId,
                          long wait)
                   throws Exception
Get a message synchronously.

Parameters:
dc - Description of Parameter
subscriberId - Description of Parameter
wait - Description of Parameter
Returns:
Description of the Returned Value
Throws:
Exception - Description of Exception

setEnabled

public void setEnabled(ConnectionToken dc,
                       boolean enabled)
                throws Exception
Sets the Enabled attribute of the ServerIL object

Parameters:
dc - The new Enabled value
enabled - The new Enabled value
Throws:
Exception - Description of Exception

unsubscribe

public void unsubscribe(ConnectionToken dc,
                        int subscriptionId)
                 throws Exception
Remove a consumer. Is NOT the same as the topic session unsubscribe.

Parameters:
dc - Description of Parameter
subscriptionId - Description of Parameter
Throws:
Exception - Description of Exception

destroySubscription

public void destroySubscription(ConnectionToken dc,
                                DurableSubscriptionID id)
                         throws Exception
Unsubscribe from a durable subscription.

Parameters:
id - Description of Parameter
Throws:
Exception - Description of Exception

checkUser

public String checkUser(String userName,
                        String password)
                 throws Exception
Get a clientID for a given user/password. May also be used for autentication if StateManager is used as authenticator.

Parameters:
userName - a valid user name that the StateManager knows about.
password - a password
Returns:
a preconfigured clientID or null.
Throws:
Exception - Description of Exception

authenticate

public String authenticate(String userName,
                           String password)
                    throws Exception
Authenticate the user. If using a securityManager the user will be autenticated by that.

Parameters:
userName - a username.
password - a password.
Returns:
a sessionid, valid only for the life of this connection.
Throws:
Exception - Description of Exception

subscribe

public void subscribe(ConnectionToken dc,
                      Subscription s)
               throws Exception
Parameters:
dc - org.jboss.mq.ConnectionToken
s - org.jboss.mq.Subscription
Throws:
Exception - The exception description.

ping

public void ping(ConnectionToken dc,
                 long clientTime)
          throws Exception
Ping the server.

Parameters:
dc - Description of Parameter
clientTime - Description of Parameter
Throws:
Exception - Description of Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.