org.tranche.servers
Class ServerEvent

java.lang.Object
  extended by org.tranche.servers.ServerEvent
Direct Known Subclasses:
ServerCallbackEvent, ServerMessageEvent

public class ServerEvent
extends java.lang.Object

Represents a general server event.

Author:
James "Augie" Hill - augman85@gmail.com

Field Summary
static int AUTO_BAN
          Code for a computer banning type.
static int AUTO_UNBAN
          Code for a computer unbanning type.
static int CALLBACK
          Code for a callback type.
static int CONNECT
          Code for a connection type.
static int MESSAGE
          Code for a message type.
static int USER_BAN
          Code for a user banning type.
static int USER_UNBAN
          Code for a user unbanning type.
 
Constructor Summary
ServerEvent(java.lang.String url, int type)
           
 
Method Summary
 long getTimestamp()
          Returns the UNIX timestamp of occurrence for this event.
 int getType()
          Returns the type code for this event.
 java.lang.String getTypeString()
          Returns the type in a human-readable format.
 java.lang.String getUrl()
          Returns the URL for the server being referenced by this event.
 java.lang.String toString()
          Returns a human-readable description of this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONNECT

public static final int CONNECT

Code for a connection type.

See Also:
Constant Field Values

AUTO_BAN

public static final int AUTO_BAN

Code for a computer banning type.

See Also:
Constant Field Values

USER_BAN

public static final int USER_BAN

Code for a user banning type.

See Also:
Constant Field Values

AUTO_UNBAN

public static final int AUTO_UNBAN

Code for a computer unbanning type.

See Also:
Constant Field Values

USER_UNBAN

public static final int USER_UNBAN

Code for a user unbanning type.

See Also:
Constant Field Values

MESSAGE

public static final int MESSAGE

Code for a message type.

See Also:
Constant Field Values

CALLBACK

public static final int CALLBACK

Code for a callback type.

See Also:
Constant Field Values
Constructor Detail

ServerEvent

public ServerEvent(java.lang.String url,
                   int type)
Parameters:
url -
type -
Method Detail

getTimestamp

public long getTimestamp()

Returns the UNIX timestamp of occurrence for this event.

Returns:

getUrl

public java.lang.String getUrl()

Returns the URL for the server being referenced by this event.

Returns:

getType

public int getType()

Returns the type code for this event.

Returns:

getTypeString

public java.lang.String getTypeString()

Returns the type in a human-readable format.

Returns:

toString

public java.lang.String toString()

Returns a human-readable description of this event.

Overrides:
toString in class java.lang.Object
Returns:


This code is free for use both commercially and non-commercially as stated in the project's license