Class TcpServer.Event

java.lang.Object
  extended by java.util.EventObject
      extended by TcpServer.Event
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
TcpServer

public static class TcpServer.Event
extends java.util.EventObject

An event representing activity by a TcpServer.

This code is released into the Public Domain. Since this is Public Domain, you don't need to worry about licensing, and you can simply copy this TcpServer.java file to your own package and use it as you like. Enjoy. Please consider leaving the following statement here in this code:

This TcpServer class was copied to this project from its source as found at iHarder.net.

Author:
Robert Harder, rharder@users.sourceforge.net
See Also:
TcpServer, TcpServer.Listener, Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TcpServer.Event(TcpServer src)
          Creates a Event based on the given TcpServer.
 
Method Summary
 java.net.Socket getSocket()
          Returns the most recent datagram packet received by the TcpServer.
 TcpServer.State getState()
          Shorthand for getTcpServer().getState().
 TcpServer getTcpServer()
          Returns the source of the event, a TcpServer.
 
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
 

Constructor Detail

TcpServer.Event

public TcpServer.Event(TcpServer src)
Creates a Event based on the given TcpServer.

Parameters:
src - the source of the event
Method Detail

getTcpServer

public TcpServer getTcpServer()
Returns the source of the event, a TcpServer. Shorthand for (TcpServer)getSource().

Returns:
the server

getState

public TcpServer.State getState()
Shorthand for getTcpServer().getState().

Returns:
the state of the server
See Also:
TcpServer.State

getSocket

public java.net.Socket getSocket()
Returns the most recent datagram packet received by the TcpServer. Shorthand for getTcpServer().getPacket().

Returns:
the most recent datagram