com.echomine.net
Class ConnectionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.echomine.net.ConnectionEvent
All Implemented Interfaces:
java.io.Serializable

public class ConnectionEvent
extends java.util.EventObject

contains connection event codes

See Also:
Serialized Form

Field Summary
static int CONNECTION_CLOSED
           
static int CONNECTION_ERRORED
           
static int CONNECTION_HANDSHAKE
           
static int CONNECTION_HANDSHOOK
           
static int CONNECTION_OPENED
           
static int CONNECTION_REJECTED
           
static int CONNECTION_STARTING
           
static int CONNECTION_VETOED
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ConnectionEvent(ConnectionModel source, int status)
           
ConnectionEvent(ConnectionModel source, int status, java.lang.String errormsg)
           
 
Method Summary
 ConnectionModel getConnectionModel()
           
 java.lang.String getErrorMessage()
           
 java.lang.String getHostName()
           
 int getPort()
           
 int getStatus()
           
 boolean isError()
           
 boolean isRejected()
           
 boolean isVetoed()
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONNECTION_OPENED

public static final int CONNECTION_OPENED
See Also:
Constant Field Values

CONNECTION_CLOSED

public static final int CONNECTION_CLOSED
See Also:
Constant Field Values

CONNECTION_ERRORED

public static final int CONNECTION_ERRORED
See Also:
Constant Field Values

CONNECTION_STARTING

public static final int CONNECTION_STARTING
See Also:
Constant Field Values

CONNECTION_VETOED

public static final int CONNECTION_VETOED
See Also:
Constant Field Values

CONNECTION_REJECTED

public static final int CONNECTION_REJECTED
See Also:
Constant Field Values

CONNECTION_HANDSHAKE

public static final int CONNECTION_HANDSHAKE
See Also:
Constant Field Values

CONNECTION_HANDSHOOK

public static final int CONNECTION_HANDSHOOK
See Also:
Constant Field Values
Constructor Detail

ConnectionEvent

public ConnectionEvent(ConnectionModel source,
                       int status)

ConnectionEvent

public ConnectionEvent(ConnectionModel source,
                       int status,
                       java.lang.String errormsg)
Method Detail

isError

public boolean isError()
Returns:
true if event is an error (or vetoed) event, false otherwise

isVetoed

public boolean isVetoed()
Returns:
true if connection was vetoed and closed, false otherwise

isRejected

public boolean isRejected()
Returns:
true if connection was rejected and closed, false otherwise

getErrorMessage

public java.lang.String getErrorMessage()
Returns:
the error message if event is an error, empty string if no error

getConnectionModel

public ConnectionModel getConnectionModel()
Returns:
the connection model associated with this event

getStatus

public int getStatus()
Returns:
the status of the event

getPort

public int getPort()
Returns:
the port as reported by the connection model

getHostName

public java.lang.String getHostName()
Returns:
the hostname as reported by the connection model


Copyright © 2001-2005 Echomine. All Rights Reserved.