|
||||||||||
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
The User
class is a utility class needed for administering
JORAM users.
Field Summary |
Fields inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject |
id, instancesTable |
Constructor Summary | |
User(java.lang.String name,
java.lang.String proxyId)
Constructs an User instance. |
Method Summary | |
java.util.Hashtable |
code()
Codes an User instance as a Hashtable for travelling
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 instanciating 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 instanciating the corresponding User object. |
java.lang.Object |
decode(java.util.Hashtable h)
Decodes an User which travelled through the SOAP protocol. |
void |
delete()
Removes this user. |
boolean |
equals(java.lang.Object o)
Provides a reliable way to compare User instances. |
DeadMQueue |
getDMQ()
Returns the dead message queue for this user, null if not set. |
java.lang.String |
getName()
Returns the user name. |
java.lang.String |
getProxyId()
Returns the identifier of the user's proxy. |
javax.naming.Reference |
getReference()
Sets the naming reference of this user. |
int |
getThreshold()
Returns the threshold for this user, -1 if not set. |
void |
setDMQ(DeadMQueue dmq)
Admin method setting a given dead message queue for this user. |
void |
setThreshold(int thresh)
Admin method setting a given value as the threshold for this user. |
java.lang.String |
toString()
Returns a string view of this User instance. |
void |
update(java.lang.String newName,
java.lang.String newPassword)
Admin method updating this user identification. |
Methods inherited from class org.objectweb.joram.client.jms.admin.AdministeredObject |
getInstance |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
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.
public java.lang.String getName()
public boolean equals(java.lang.Object o)
User
instances.
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.
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.
name
- Name of the user.password
- 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) 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 delete() throws java.net.ConnectException, AdminException
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 setThreshold(int thresh) 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 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 int getThreshold() 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 getProxyId()
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
getReference
in class AdministeredObject
javax.naming.NamingException
public java.util.Hashtable code()
User
instance as a Hashtable for travelling
through the SOAP protocol.
code
in interface SoapObjectItf
code
in class AdministeredObject
public java.lang.Object decode(java.util.Hashtable h)
User
which travelled through the SOAP protocol.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |