|
Joram 5.2.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.client.jms.admin.AdministeredObject
org.objectweb.joram.client.jms.admin.User
public class User
The User
class is a utility class needed for administering
JORAM users.
Field Summary | |
---|---|
protected java.lang.String |
JMXBeanName
|
static org.objectweb.util.monolog.api.Logger |
logger
|
Constructor Summary | |
---|---|
User()
|
|
User(java.lang.String name,
java.lang.String proxyId)
Constructs an User instance. |
Method Summary | |
---|---|
void |
clearSubscription(java.lang.String subName)
|
java.util.Hashtable |
code()
Codes an User instance as a Hashtable for traveling
through the SOAP protocol. |
static User |
create(java.lang.String name,
java.lang.String password)
Admin method creating a user on the local server and instantiating the corresponding User object. |
static User |
create(java.lang.String name,
java.lang.String password,
int serverId)
Admin method creating a user for a given server and instantiating the corresponding User object. |
static User |
create(java.lang.String name,
java.lang.String password,
int serverId,
java.lang.String identityClassName)
Admin method creating a user for a given server and instantiating the corresponding User object. |
void |
decode(java.util.Hashtable h)
Decodes an User which traveled through the SOAP protocol. |
void |
delete()
Removes this user. |
void |
deleteMessage(java.lang.String subName,
java.lang.String msgId)
|
AdminReply |
doRequest(AdminRequest request)
Method actually sending an AdminRequest instance to
the platform and getting an AdminReply instance. |
boolean |
equals(java.lang.Object o)
Provides a reliable way to compare User instances. |
void |
fromReference(javax.naming.Reference ref)
Restores the administered object from a naming reference. |
DeadMQueue |
getDMQ()
Returns the dead message queue for this user, null if not set. |
java.lang.String |
getDMQId()
Returns the dead message queue Id for this user, null if not set. |
Message |
getMessage(java.lang.String subName,
java.lang.String msgId)
|
java.lang.String |
getMessageDigest(java.lang.String subName,
java.lang.String msgId)
|
java.util.Properties |
getMessageHeader(java.lang.String subName,
java.lang.String msgId)
|
java.lang.String[] |
getMessageIds(java.lang.String subName)
|
java.util.Properties |
getMessageProperties(java.lang.String subName,
java.lang.String msgId)
|
java.lang.String |
getName()
Returns the user name. |
int |
getNbMaxMsg(java.lang.String subName)
Monitoring method returning the nbMaxMsg of this subscription, -1 if no limit. |
java.lang.String |
getProxyId()
Returns the identifier of the user's proxy. |
Subscription |
getSubscription(java.lang.String subName)
Returns a subscription. |
java.util.List |
getSubscriptionList()
used by MBean jmx |
Subscription[] |
getSubscriptions()
Returns the subscriptions owned by a user. |
java.lang.String |
getSubscriptionString(java.lang.String subName)
Returns a subscription. |
int |
getThreshold()
Returns the threshold for this user, -1 if not set. |
protected AdminWrapper |
getWrapper()
Returns the administration wrapper to use. |
Message |
readMessage(java.lang.String subName,
java.lang.String msgId)
Deprecated. |
java.lang.String |
registerMBean(java.lang.String base)
|
void |
setDMQ(DeadMQueue dmq)
Admin method setting a given dead message queue for this user. |
void |
setDMQId(java.lang.String dmqId)
Admin method setting a given dead message queue for this user. |
void |
setNbMaxMsg(java.lang.String subName,
int nbMaxMsg)
Admin method setting nbMaxMsg for this subscription. |
void |
setThreshold(int threshold)
Admin method setting a given value as the threshold for this user. |
void |
setWrapper(AdminWrapper wrapper)
Sets the administration wrapper to use. |
void |
toReference(javax.naming.Reference ref)
Sets the naming reference of a connection factory. |
java.lang.String |
toString()
Returns a string view of this User instance. |
void |
unregisterMBean()
|
void |
update(java.lang.String newName,
java.lang.String newPassword)
Admin method updating this user identification. |
void |
update(java.lang.String newName,
java.lang.String newPassword,
java.lang.String identityClassName)
Admin method updating this user identification. |
Methods inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject |
---|
getReference |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static org.objectweb.util.monolog.api.Logger logger
protected transient java.lang.String JMXBeanName
Constructor Detail |
---|
public User()
public User(java.lang.String name, java.lang.String proxyId)
User
instance.
name
- The name of the user.proxyId
- Identifier of the user's proxy agent.Method Detail |
---|
public java.lang.String toString()
User
instance.
toString
in interface UserMBean
toString
in class java.lang.Object
public java.lang.String getName()
getName
in interface UserMBean
public boolean equals(java.lang.Object o)
User
instances.
equals
in class java.lang.Object
protected final AdminWrapper getWrapper() throws java.net.ConnectException
java.net.ConnectException
- if no wrapper is defined.public void setWrapper(AdminWrapper wrapper)
wrapper
- The wrapper to use or null to unset.public final AdminReply doRequest(AdminRequest request) throws AdminException, java.net.ConnectException
AdminRequest
instance to
the platform and getting an AdminReply
instance.
request
- the administration request to send
java.net.ConnectException
- If the connection to the platform fails.
AdminException
- If the platform's reply is invalid, or if
the request failed.public static User create(java.lang.String name, java.lang.String password, int serverId) throws java.net.ConnectException, AdminException
User
object.
If the user has already been set on this server, the method simply
returns the corresponding User
object. Its fails if the
target server does not belong to the platform, or if a proxy could not
be deployed server side for a new user.
Be careful this method use the static AdminModule connection.
name
- Name of the user.password
- Password of the user.serverId
- The identifier of the user's server.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static User create(java.lang.String name, java.lang.String password) throws java.net.ConnectException, AdminException
User
object.
If the user has already been set on this server, the method simply
returns the corresponding User
object. It fails if a
proxy could not be deployed server side for a new user.
Be careful this method use the static AdminModule connection.
name
- Name of the user.password
- Password of the user.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static User create(java.lang.String name, java.lang.String password, int serverId, java.lang.String identityClassName) throws java.net.ConnectException, AdminException
User
object.
If the user has already been set on this server, the method simply
returns the corresponding User
object. Its fails if the
target server does not belong to the platform, or if a proxy could not
be deployed server side for a new user.
Be careful this method use the static AdminModule connection.
name
- Name of the user.password
- Password of the user.serverId
- The identifier of the user's server.identityClassName
- user/password or JAAS... (default SimpleIdentity).
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public java.lang.String registerMBean(java.lang.String base)
public void unregisterMBean()
public void update(java.lang.String newName, java.lang.String newPassword) throws java.net.ConnectException, AdminException
The request fails if the user does not exist server side, or if the new identification is already taken by a user on the same server.
newName
- The new name of the user.newPassword
- The new password of the user.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public void update(java.lang.String newName, java.lang.String newPassword, java.lang.String identityClassName) throws java.net.ConnectException, AdminException
The request fails if the user does not exist server side, or if the new identification is already taken by a user on the same server.
newName
- The new name of the user.newPassword
- The new password of the user.identityClassName
- user/password or JAAS... (default SimpleIdentity).
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public void delete() throws java.net.ConnectException, AdminException
delete
in interface UserMBean
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public void setDMQ(DeadMQueue dmq) throws java.net.ConnectException, AdminException
The request fails if the user is deleted server side.
dmq
- The dead message queue to be set.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public void setDMQId(java.lang.String dmqId) throws java.net.ConnectException, AdminException
The request fails if the user is deleted server side.
setDMQId
in interface UserMBean
dmqId
- The dead message queue Id to be set.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public void setThreshold(int threshold) throws java.net.ConnectException, AdminException
The request fails if the user is deleted server side.
setThreshold
in interface UserMBean
threshold
- The threshold value to be set (-1 for unsetting
previous value).
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public DeadMQueue getDMQ() throws java.net.ConnectException, AdminException
The request fails if the user is deleted server side.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public java.lang.String getDMQId() throws java.net.ConnectException, AdminException
The request fails if the user is deleted server side.
getDMQId
in interface UserMBean
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public int getThreshold() throws java.net.ConnectException, AdminException
The request fails if the user is deleted server side.
getThreshold
in interface UserMBean
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public void setNbMaxMsg(java.lang.String subName, int nbMaxMsg) throws java.net.ConnectException, AdminException
The request fails if the sub is deleted server side.
setNbMaxMsg
in interface UserMBean
subName
- the name of the subscription.nbMaxMsg
- nb Max of Message (-1 no limit).
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public int getNbMaxMsg(java.lang.String subName) throws java.net.ConnectException, AdminException
The request fails if the sub is deleted server side.
getNbMaxMsg
in interface UserMBean
subName
- the name of the subscription.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public Subscription[] getSubscriptions() throws AdminException, java.net.ConnectException
getSubscriptions
in interface UserMBean
serverId
- the identifier of the server where the user has been
created.userName
- name of the user.
AdminException
- If an error is raised by the
administration operation.
java.net.ConnectException
- If the admin connection is not established.public java.util.List getSubscriptionList() throws AdminException, java.net.ConnectException
getSubscriptionList
in interface UserMBean
AdminException
java.net.ConnectException
public Subscription getSubscription(java.lang.String subName) throws AdminException, java.net.ConnectException
getSubscription
in interface UserMBean
serverId
- the identifier of the server where the user
owner of the subscription has been created.userName
- name of the user that owns the subscription.subName
- the name of the subscription.
AdminException
- If an error is raised by the
administration operation.
java.net.ConnectException
- If the admin connection is not established.public java.lang.String getSubscriptionString(java.lang.String subName) throws AdminException, java.net.ConnectException
UserMBean
getSubscriptionString
in interface UserMBean
AdminException
java.net.ConnectException
public java.lang.String[] getMessageIds(java.lang.String subName) throws AdminException, java.net.ConnectException
getMessageIds
in interface UserMBean
AdminException
java.net.ConnectException
public Message getMessage(java.lang.String subName, java.lang.String msgId) throws AdminException, java.net.ConnectException, javax.jms.JMSException
AdminException
java.net.ConnectException
javax.jms.JMSException
public java.lang.String getMessageDigest(java.lang.String subName, java.lang.String msgId) throws AdminException, java.net.ConnectException, javax.jms.JMSException
getMessageDigest
in interface UserMBean
AdminException
java.net.ConnectException
javax.jms.JMSException
public java.util.Properties getMessageHeader(java.lang.String subName, java.lang.String msgId) throws AdminException, java.net.ConnectException, javax.jms.JMSException
getMessageHeader
in interface UserMBean
AdminException
java.net.ConnectException
javax.jms.JMSException
public java.util.Properties getMessageProperties(java.lang.String subName, java.lang.String msgId) throws AdminException, java.net.ConnectException, javax.jms.JMSException
getMessageProperties
in interface UserMBean
AdminException
java.net.ConnectException
javax.jms.JMSException
public Message readMessage(java.lang.String subName, java.lang.String msgId) throws AdminException, java.net.ConnectException, javax.jms.JMSException
AdminException
java.net.ConnectException
javax.jms.JMSException
org.objectweb.joram.client.jms.admin.UserMBean#readMessage(java.lang.String, java.lang.String)
public void deleteMessage(java.lang.String subName, java.lang.String msgId) throws AdminException, java.net.ConnectException
deleteMessage
in interface UserMBean
AdminException
java.net.ConnectException
public void clearSubscription(java.lang.String subName) throws AdminException, java.net.ConnectException
clearSubscription
in interface UserMBean
AdminException
java.net.ConnectException
public java.lang.String getProxyId()
getProxyId
in interface UserMBean
public void toReference(javax.naming.Reference ref) throws javax.naming.NamingException
toReference
in class AdministeredObject
javax.naming.NamingException
public void fromReference(javax.naming.Reference ref) throws javax.naming.NamingException
fromReference
in class AdministeredObject
javax.naming.NamingException
public java.util.Hashtable code()
User
instance as a Hashtable for traveling
through the SOAP protocol.
code
in interface fr.dyade.aaa.jndi2.soap.SoapObjectItf
public void decode(java.util.Hashtable h)
User
which traveled through the SOAP protocol.
decode
in interface fr.dyade.aaa.jndi2.soap.SoapObjectItf
|
Joram 5.2.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |