TelnetD at SF

net.wimpi.telnetd.net
Class ConnectionEvent

java.lang.Object
  extended bynet.wimpi.telnetd.net.ConnectionEvent

public class ConnectionEvent
extends java.lang.Object

Class implmenting a ConnectionEvent.
These events are used to communicate things that are supposed to be handled within the application context. These events are processed by the Connection instance calling upon its registered listeners.

Version:
2.0 (13/03/2005)
Author:
Dieter Wimberger
See Also:
Connection, ConnectionListener

Field Summary
static int CONNECTION_BREAK
          Defines the connection sent break event type.
static int CONNECTION_BROKEN
          Defines the connection broken event type.
static int CONNECTION_IDLE
          Defines the connection idle event type.
static int CONNECTION_LOGOUTREQUEST
          Defines the connection requested logout event type.
static int CONNECTION_TIMEDOUT
          Defines the connection timed out event type.
 
Constructor Summary
ConnectionEvent(Connection source, int typeid)
          Constructs a new instance of a ConnectionEvent with a given source (Connection) and a given type.
 
Method Summary
 Connection getConnection()
          Deprecated. for better naming, replaced by getSource
 Connection getSource()
          Accessor method returning the source of the ConnectionEvent instance.
 boolean isType(int typeid)
          Method that helps identifying the type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONNECTION_IDLE

public static final int CONNECTION_IDLE
Defines the connection idle event type.
It occurs if a connection has been idle exceeding the configured time to warning.

See Also:
Constant Field Values

CONNECTION_TIMEDOUT

public static final int CONNECTION_TIMEDOUT
Defines the connection timed out event type.
It occurs if a connection has been idle exceeding the configured time to warning and the configured time to timedout.

See Also:
Constant Field Values

CONNECTION_LOGOUTREQUEST

public static final int CONNECTION_LOGOUTREQUEST
Defines the connection requested logout event type.
It occurs if a connection requested disgraceful logout by sending a - key combination.

See Also:
Constant Field Values

CONNECTION_BROKEN

public static final int CONNECTION_BROKEN
Defines the connection broken event type.
It occurs if a connection has to be closed by the system due to communication problems (i.e. I/O errors).

See Also:
Constant Field Values

CONNECTION_BREAK

public static final int CONNECTION_BREAK
Defines the connection sent break event type.
It occurs when the connection sent a NVT BREAK.

See Also:
Constant Field Values
Constructor Detail

ConnectionEvent

public ConnectionEvent(Connection source,
                       int typeid)
Constructs a new instance of a ConnectionEvent with a given source (Connection) and a given type.

Parameters:
source - Connection that represents the source of this event.
typeid - int that contains one of the defined event types.
Method Detail

getSource

public Connection getSource()
Accessor method returning the source of the ConnectionEvent instance.

Returns:
Connection representing the source.

getConnection

public Connection getConnection()
Deprecated. for better naming, replaced by getSource

See Also:
getSource()

isType

public boolean isType(int typeid)
Method that helps identifying the type.

Parameters:
typeid - int that contains one of the defined event types.

TelnetD at SF

Copyright 2000-2005 Dieter Wimberger.