org.objectweb.joram.client.jms.admin
Class User
- javax.naming.Referenceable, java.io.Serializable, SoapObjectItf
The User
class is a utility class needed for administering
JORAM users.
- Serialized Form
User(String name, String proxyId) - Constructs an
User instance.
|
Hashtable | code() - Codes an
User instance as a Hashtable for travelling
through the SOAP protocol.
|
static User | create(String name, String password) - Admin method creating a user on the local server and instanciating the
corresponding
User object.
|
static User | create(String name, String password, int serverId) - Admin method creating a user for a given server and instanciating the
corresponding
User object.
|
Object | decode(Hashtable h) - Decodes an
User which travelled through the SOAP protocol.
|
void | delete() - Removes this user.
|
boolean | equals(Object o) - Provides a reliable way to compare
User instances.
|
DeadMQueue | getDMQ() - Returns the dead message queue for this user, null if not set.
|
String | getName() - Returns the user name.
|
String | getProxyId() - Returns the identifier of the user's proxy.
|
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.
|
String | toString() - Returns a string view of this
User instance.
|
void | update(String newName, String newPassword) - Admin method updating this user identification.
|
User
public User(String name,
String proxyId)
Constructs an User
instance.
name
- The name of the user.proxyId
- Identifier of the user's proxy agent.
code
public Hashtable code()
Codes an User
instance as a Hashtable for travelling
through the SOAP protocol.
- code in interface SoapObjectItf
- code in interface AdministeredObject
create
public static User create(String name,
String password)
throws ConnectException,
AdminException
Admin method creating a user on the local server and instanciating the
corresponding
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.
AdminException
- If the request fails.
create
public static User create(String name,
String password,
int serverId)
throws ConnectException,
AdminException
Admin method creating a user for a given server and instanciating the
corresponding
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.
AdminException
- If the request fails.
decode
public Object decode(Hashtable h)
Decodes an User
which travelled through the SOAP protocol.
- decode in interface SoapObjectItf
equals
public boolean equals(Object o)
Provides a reliable way to compare User
instances.
getDMQ
public DeadMQueue getDMQ()
throws ConnectException,
AdminException
Returns the dead message queue for this user, null if not set.
The request fails if the user is deleted server side.
AdminException
- If the request fails.
getName
public String getName()
Returns the user name.
getProxyId
public String getProxyId()
Returns the identifier of the user's proxy.
getReference
public Reference getReference()
throws NamingException
Sets the naming reference of this user.
- getReference in interface AdministeredObject
getThreshold
public int getThreshold()
throws ConnectException,
AdminException
Returns the threshold for this user, -1 if not set.
The request fails if the user is deleted server side.
AdminException
- If the request fails.
setDMQ
public void setDMQ(DeadMQueue dmq)
throws ConnectException,
AdminException
Admin method setting a given dead message queue for this user.
The request fails if the user is deleted server side.
dmq
- The dead message queue to be set.
AdminException
- If the request fails.
setThreshold
public void setThreshold(int thresh)
throws ConnectException,
AdminException
Admin method setting a given value as the threshold for this user.
The request fails if the user is deleted server side.
AdminException
- If the request fails.
toString
public String toString()
Returns a string view of this User
instance.
update
public void update(String newName,
String newPassword)
throws ConnectException,
AdminException
Admin method updating this user identification.
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.
AdminException
- If the request fails.
Copyright B) 2004 Scalagent - All rights reserved