org.tranche.network
Class ConnectionEvent

java.lang.Object
  extended by org.tranche.network.ConnectionEvent

public class ConnectionEvent
extends java.lang.Object

Wraps the information describing a connection modification.

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

Field Summary
static int DROPPED_PORT
          The value for the port when the event represents a dropped connection.
static boolean DROPPED_SSL
          The SSL value for when the event represents a dropped connection.
 
Constructor Summary
ConnectionEvent(java.lang.String host)
           
ConnectionEvent(java.lang.String host, int port, boolean ssl)
           
 
Method Summary
 java.lang.String getHost()
          Gets the host name of the server.
 int getPort()
          Returns the port number over which the server communicates.
 long getTimestamp()
          Gets the timestamp the event occurred.
 boolean isSSL()
          Returns whether the host in question communicates over SSL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DROPPED_PORT

public static final int DROPPED_PORT

The value for the port when the event represents a dropped connection.

See Also:
Constant Field Values

DROPPED_SSL

public static final boolean DROPPED_SSL

The SSL value for when the event represents a dropped connection.

See Also:
Constant Field Values
Constructor Detail

ConnectionEvent

public ConnectionEvent(java.lang.String host,
                       int port,
                       boolean ssl)
Parameters:
host - A host name
port - A port number
ssl - Whether the server communicates over SSL

ConnectionEvent

public ConnectionEvent(java.lang.String host)
Parameters:
host - A host name
Method Detail

getHost

public java.lang.String getHost()

Gets the host name of the server.

Returns:
The host name of the server.

getPort

public int getPort()

Returns the port number over which the server communicates.

Returns:
The port number over which the server communicates.

isSSL

public boolean isSSL()

Returns whether the host in question communicates over SSL.

Returns:
Whether the host in question communicates over SSL

getTimestamp

public long getTimestamp()

Gets the timestamp the event occurred.

Returns:
The timestamp the event occurred.


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