org.omus.core
Class User

java.lang.Object
  |
  +--org.omus.core.User
All Implemented Interfaces:
java.io.Serializable

public class User
extends java.lang.Object
implements java.io.Serializable

Represents a user.

See Also:
Serialized Form

Method Summary
 java.lang.String getEmail()
          Returns the email address of the user.
 java.lang.String getName()
          Returns the name of the user.
 java.lang.String getPassword()
          Returns the password of the user.
 int getPermissions()
          Returns the permissions of the user, a number between 0 and 10.
 PropertySet getProperties()
          Returns the PropertySet object associated with this user.
 void logout(java.lang.String errCode)
          Logs out the user, passing the specified error code to the client before closing the connection.
 void sendToClient(Message msg)
          Sends the specified Message to the Flash client of this user.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the user.

getPassword

public java.lang.String getPassword()
Returns the password of the user.

getEmail

public java.lang.String getEmail()
Returns the email address of the user.

getPermissions

public int getPermissions()
Returns the permissions of the user, a number between 0 and 10.

0 user has been deleted
1 user has been banned
2-8 user has normal status
9-10 user has administrator status

The values between 2 and 8 make no difference to the Oregano Server. You can use them for your application logic. A user who has administrator status will not be logged out if you switch the server to debug mode using the admin client.


getProperties

public PropertySet getProperties()
Returns the PropertySet object associated with this user.

sendToClient

public void sendToClient(Message msg)
Sends the specified Message to the Flash client of this user. The message will be received in the onMessage event handler in the client side Messenger object.

logout

public void logout(java.lang.String errCode)
Logs out the user, passing the specified error code to the client before closing the connection.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object