A C E F G I L N O P R S T U V

A

addNioServerListener(NioServer.Listener) - Method in class NioServer
Adds a NioServer.Listener.
addPropertyChangeListener(PropertyChangeListener) - Method in class NioServer
Add a property listener.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class NioServer
Add a property listener for the named property.
addPropertyChangeListener(PropertyChangeListener) - Method in class TcpServer
Add a property listener.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class TcpServer
Add a property listener for the named property.
addPropertyChangeListener(PropertyChangeListener) - Method in class UdpServer
Add a property listener.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class UdpServer
Add a property listener for the named property.
addTcpBinding(SocketAddress) - Method in class NioServer
Adds a TCP binding to the server.
addTcpServerListener(TcpServer.Listener) - Method in class TcpServer
Adds a TcpServer.Listener.
addUdpBinding(SocketAddress) - Method in class NioServer
Adds a UDP binding to the server.
addUdpBinding(SocketAddress, String) - Method in class NioServer
Experimental Hack - Adds a UDP binding to the server and joins the given multicast group (if group is not null and is a valid multicast group).
addUdpServerListener(UdpServer.Listener) - Method in class UdpServer
Adds a UdpServer.Listener.

C

clearTcpBindings() - Method in class NioServer
Clears all TCP bindings.
clearUdpBindings() - Method in class NioServer
Clears all UDP bindings.
close() - Method in class NioServer.Event
Closes the underlying channel.
closeAfterWriting(SelectionKey) - Method in class NioServer
Convenience method for telling the server to close the connection after the last byte of the output buffer has been written.
closeAfterWriting() - Method in class NioServer.Event
Convenience method for indicating that you would like the connection closed after the last byte in the output buffer is written.
connectionClosed(NioServer.Event) - Method in class NioServer.Adapter
Empty method.
connectionClosed(NioServer.Event) - Method in interface NioServer.Listener
Called when a TCP connection is closed.

E

EXECUTOR_PROP - Static variable in class TcpServer
The Executor property executor used with the property change listeners and the preferences, if a preferences object is given.

F

fireConnectionClosed(SelectionKey) - Method in class NioServer
Fire when a connection is closed remotely.
fireExceptionNotification(Throwable) - Method in class NioServer
Fires a property change event with the new exception.
fireExceptionNotification(Throwable) - Method in class TcpServer
Fires a property change event with the new exception.
fireExceptionNotification(Throwable) - Method in class UdpServer
Fires a property change event with the new exception.
fireNewConnection(SelectionKey, ByteBuffer) - Method in class NioServer
Fire when a new connection is established.
fireProperties() - Method in class NioServer
Fires property chagne events for all current values setting the old value to null and new value to the current.
fireProperties() - Method in class TcpServer
Fires property chagne events for all current values setting the old value to null and new value to the current.
fireProperties() - Method in class UdpServer
Fires property chagne events for all current values setting the old value to null and new value to the current.
firePropertyChange(String, Object, Object) - Method in class NioServer
Fire a property change event on the current thread.
firePropertyChange(String, Object, Object) - Method in class TcpServer
Fire a property change event on the current thread.
firePropertyChange(String, Object, Object) - Method in class UdpServer
Fire a property change event on the current thread.
fireTcpDataReceived(SelectionKey, ByteBuffer, ByteBuffer) - Method in class NioServer
Fire when data is received.
fireTcpReadyToWrite(SelectionKey, ByteBuffer) - Method in class NioServer
Fire when data is received.
fireTcpServerSocketReceived() - Method in class TcpServer
Fires event when a socket is received
fireUdpDataReceived(SelectionKey, ByteBuffer, ByteBuffer, SocketAddress) - Method in class NioServer
Fire when data is received.
fireUdpServerPacketReceived() - Method in class UdpServer
Fires event on calling thread for a new packet coming in.

G

getExecutor() - Method in class TcpServer
Returns the Executor (or null if none is set) that is used to execute the event firing.
getGroups() - Method in class UdpServer
Returns the multicast groups to which the server has joined.
getInputBuffer() - Method in class NioServer.Event
Returns the ByteBuffer that contains the incoming data for this connection.
getInputBufferSize() - Method in class NioServer
Returns the size of the ByteBuffer used to read from the connections.
getKey() - Method in class NioServer.Event
Returns the SelectionKey associated with this event.
getLastException() - Method in class NioServer
Returns the last exception (Throwable, actually) that the server encountered.
getLastException() - Method in class TcpServer
Returns the last exception (Throwable, actually) that the server encountered.
getLastException() - Method in class UdpServer
Returns the last exception (Throwable, actually) that the server encountered.
getLocalSocketAddress() - Method in class NioServer.Event
Returns the local address/port to which this connection is bound.
getLoggingLevel() - Static method in class NioServer
Static method returning the logging level using Java's java.util.logging package.
getLoggingLevel() - Static method in class TcpServer
Static method returning the logging level using Java's java.util.logging package.
getLoggingLevel() - Static method in class UdpServer
Static method returning the logging level using Java's java.util.logging package.
getNioServer() - Method in class NioServer.Event
Returns the source of the event, a NioServer.
getOutputBuffer() - Method in class NioServer.Event
Returns the ByteBuffer in which you leave data to be written to the client.
getOutputBufferSize() - Method in class NioServer
Returns the size of the ByteBuffer used to write to the connections.
getPacket() - Method in class UdpServer.Event
Returns the most recent datagram packet received by the UdpServer.
getPacket() - Method in class UdpServer
Returns the last DatagramPacket received.
getPacketAsBytes() - Method in class UdpServer.Event
Copies and returns the bytes in the most recently received packet, or null if not available.
getPacketAsString() - Method in class UdpServer.Event
Returns the data in the most recently-received packet as if it were a String or null if not available.
getPort() - Method in class TcpServer
Returns the port on which the server is or will be listening.
getPort() - Method in class UdpServer
Returns the port on which the server is or will be listening.
getReceiveBufferSize() - Method in class UdpServer
Returns the receive buffer for the underlying MulticastSocket if the server is currently running (otherwise there is no MulticastSocket to query).
getRemoteSocketAddress() - Method in class NioServer.Event
Returns the address of the endpoint this socket is connected to, or null if it is unconnected.
getSingleTcpPort() - Method in class NioServer
Returns the port for the single TCP binding in effect, or -1 (minus one) if there are no or multiple TCP bindings or some other error.
getSingleUdpPort() - Method in class NioServer
Returns the port for the single UDP binding in effect, or -1 (minus one) if there are no or multiple UDP bindings or some other error.
getSocket() - Method in class TcpServer.Event
Returns the most recent datagram packet received by the TcpServer.
getSocket() - Method in class TcpServer
Returns the last Socket received.
getState() - Method in class NioServer.Event
Shorthand for getNioServer().getState().
getState() - Method in class NioServer
Returns the current state of the server, one of STARTING, STARTED, STOPPING, or STOPPED.
getState() - Method in class TcpServer.Event
Shorthand for getTcpServer().getState().
getState() - Method in class TcpServer
Returns the current state of the server, one of STOPPED, STARTING, or STARTED.
getState() - Method in class UdpServer.Event
Shorthand for getUdpServer().getState().
getState() - Method in class UdpServer
Returns the current state of the server, one of STOPPED, STARTING, or STARTED.
getTcpBindings() - Method in class NioServer
Returns a set of socket addresses that the server is (or will be when started) bound to/listening on.
getTcpServer() - Method in class TcpServer.Event
Returns the source of the event, a TcpServer.
getUdpBindings() - Method in class NioServer
Returns a map of socket addresses and multicast groups that the server is (or will be when started) bound to/listening on.
getUdpServer() - Method in class UdpServer.Event
Returns the source of the event, a UdpServer.
GROUPS_PROP - Static variable in class UdpServer
The multicast groups property groups used with the property change listeners and the preferences, if a preferences object is given.

I

INPUT_BUFFER_SIZE_PROP - Static variable in class NioServer
Refers to the size of the input buffer.
isTcp() - Method in class NioServer.Event
Convenience method for checking getKey().channel() instanceof SocketChannel.
isUdp() - Method in class NioServer.Event
Convenience method for checking getKey().channel() instanceof DatagramChannel.

L

LAST_EXCEPTION_PROP - Static variable in class NioServer
Refers to the last exception encountered internally on the server thread.
LAST_EXCEPTION_PROP - Static variable in class TcpServer
 
LAST_EXCEPTION_PROP - Static variable in class UdpServer
 

N

newConnectionReceived(NioServer.Event) - Method in class NioServer.Adapter
Empty method.
newConnectionReceived(NioServer.Event) - Method in interface NioServer.Listener
Called when a new connection is received.
NioServer - Class in <Unnamed>
A robust class for establishing simultaneous TCP and UDP servers and manipulating their listening ports.
NioServer() - Constructor for class NioServer
Constructs a new NioServer, listening to nothing, and not started.
NioServer(ThreadFactory) - Constructor for class NioServer
Constructs a new NioServer, listening to nothing, and not started.
NioServer.Adapter - Class in <Unnamed>
A helper class that implements all methods of the NioServer.Listener interface with empty methods.
NioServer.Adapter() - Constructor for class NioServer.Adapter
 
NioServer.Event - Class in <Unnamed>
An event representing activity by a NioServer.
NioServer.Event(NioServer) - Constructor for class NioServer.Event
Creates a Event based on the given NioServer.
NioServer.Listener - Interface in <Unnamed>
An interface for listening to events from a NioServer.
NioServer.State - Enum in <Unnamed>
One of four possible states for the server to be in:

O

OUTPUT_BUFFER_SIZE_PROP - Static variable in class NioServer
Refers to the size of the output buffer.

P

packetReceived(UdpServer.Event) - Method in interface UdpServer.Listener
Called when a packet is received.
PORT_PROP - Static variable in class TcpServer
The port property port used with the property change listeners and the preferences, if a preferences object is given.
PORT_PROP - Static variable in class UdpServer
The port property port used with the property change listeners and the preferences, if a preferences object is given.

R

removeNioServerListener(NioServer.Listener) - Method in class NioServer
Removes a NioServer.Listener.
removePropertyChangeListener(PropertyChangeListener) - Method in class NioServer
Remove a property listener.
removePropertyChangeListener(String, PropertyChangeListener) - Method in class NioServer
Remove a property listener for the named property.
removePropertyChangeListener(PropertyChangeListener) - Method in class TcpServer
Remove a property listener.
removePropertyChangeListener(String, PropertyChangeListener) - Method in class TcpServer
Remove a property listener for the named property.
removePropertyChangeListener(PropertyChangeListener) - Method in class UdpServer
Remove a property listener.
removePropertyChangeListener(String, PropertyChangeListener) - Method in class UdpServer
Remove a property listener for the named property.
removeTcpBinding(SocketAddress) - Method in class NioServer
Removes a TCP binding.
removeTcpServerListener(TcpServer.Listener) - Method in class TcpServer
Removes a TcpServer.Listener.
removeUdpBinding(SocketAddress) - Method in class NioServer
Removes a UDP binding.
removeUdpServerListener(UdpServer.Listener) - Method in class UdpServer
Removes a UdpServer.Listener.
reset(SelectionKey, ByteBuffer, ByteBuffer, SocketAddress) - Method in class NioServer.Event
Resets an event between firings by updating the parameters that change.
reset() - Method in class NioServer
Resets the server, if it is running, otherwise does nothing.
reset() - Method in class TcpServer
Resets the server, if it is running, otherwise does nothing.
reset() - Method in class UdpServer
Resets the server, if it is running, otherwise does nothing.
runServer() - Method in class NioServer
This method starts up and listens indefinitely for network connections.
runServer() - Method in class TcpServer
This method starts up and listens indefinitely for TCP packets.
runServer() - Method in class UdpServer
This method starts up and listens indefinitely for UDP packets.

S

send(DatagramPacket) - Method in class UdpServer.Event
Convenience method for sending datagram packets, intended to be used for replying to the sender but could be used for anything.
send(DatagramPacket) - Method in class UdpServer
Attempts to send a datagram packet on the active server socket.
setExecutor(Executor) - Method in class TcpServer
Sets (or clears, if null) the Executor used to fire events.
setGroups(String) - Method in class UdpServer
Sets the new multicast groups to which the server will join.
setInputBufferSize(int) - Method in class NioServer
Sets the size of the ByteBuffer used to read from the connections.
setLoggingLevel(Level) - Static method in class NioServer
Static method to set the logging level using Java's java.util.logging package.
setLoggingLevel(Level) - Static method in class TcpServer
Static method to set the logging level using Java's java.util.logging package.
setLoggingLevel(Level) - Static method in class UdpServer
Static method to set the logging level using Java's java.util.logging package.
setNotifyOnTcpWritable(boolean) - Method in class NioServer.Event
Convenience method for turning on and off writable notifications.
setNotifyOnWritable(SelectionKey, boolean) - Method in class NioServer
Sets whether or not events will fire when a channel is ready to be written to.
setOutputBufferSize(int) - Method in class NioServer
Sets the size of the ByteBuffer used to write from the connections.
setPort(int) - Method in class TcpServer
Sets the new port on which the server will attempt to listen.
setPort(int) - Method in class UdpServer
Sets the new port on which the server will attempt to listen.
setReceiveBufferSize(int) - Method in class UdpServer
Recommends a receive buffer size for the underlying MulticastSocket.
setSingleTcpPort(int) - Method in class NioServer
Convenience method for clearing all bindings and setting up listening for TCP on the given port.
setSingleUdpPort(int) - Method in class NioServer
Convenience method for clearing all bindings and setting up listening for UDP on the given port.
setSingleUdpPort(int, String) - Method in class NioServer
Convenience method for clearing all bindings and setting up listening for UDP on the given port and joining the provided multicast group.
setState(NioServer.State) - Method in class NioServer
Sets the state and fires an event.
setState(TcpServer.State) - Method in class TcpServer
Sets the state and fires an event.
setState(UdpServer.State) - Method in class UdpServer
Records (sets) the state and fires an event.
setTcpBindings(Set<SocketAddress>) - Method in class NioServer
Sets the TCP bindings that the server should use.
setUdpBindings(Map<SocketAddress, String>) - Method in class NioServer
Sets the UDP bindings that the server should use.
SINGLE_TCP_PORT_PROP - Static variable in class NioServer
Refers to the convenience methods for listening on a single port.
SINGLE_UDP_PORT_PROP - Static variable in class NioServer
Refers to the convenience methods for listening on a single port.
socketReceived(TcpServer.Event) - Method in interface TcpServer.Listener
Called when a packet is received.
start() - Method in class NioServer
Attempts to start the server listening and returns immediately.
start() - Method in class TcpServer
Attempts to start the server listening and returns immediately.
start() - Method in class UdpServer
Attempts to start the server listening and returns immediately.
STATE_PROP - Static variable in class NioServer
Refers to the state of the server (STARTING, STARTED, STOPPING, STOPPED).
STATE_PROP - Static variable in class TcpServer
 
STATE_PROP - Static variable in class UdpServer
 
stop() - Method in class NioServer
Attempts to stop the server, if the server is in the STARTED state, and returns immediately.
stop() - Method in class TcpServer
Attempts to stop the server, if the server is in the STARTED state, and returns immediately.
stop() - Method in class UdpServer
Attempts to stop the server, if the server is in the STARTED state, and returns immediately.

T

TCP_BINDINGS_PROP - Static variable in class NioServer
Refers to the TCP bindings for the server.
tcpDataReceived(NioServer.Event) - Method in class NioServer.Adapter
Empty method.
tcpDataReceived(NioServer.Event) - Method in interface NioServer.Listener
Called when TCP data is received.
tcpReadyToWrite(NioServer.Event) - Method in class NioServer.Adapter
Empty method.
tcpReadyToWrite(NioServer.Event) - Method in interface NioServer.Listener
Fired when a TCP channel is ready to be written to.
TcpServer - Class in <Unnamed>
A robust class for establishing a TCP server and manipulating its listening port.
TcpServer() - Constructor for class TcpServer
Constructs a new TcpServer that will listen on the default port 1234 (but not until TcpServer.start() is called).
TcpServer(int) - Constructor for class TcpServer
Constructs a new TcpServer that will listen on the given port (but not until TcpServer.start() is called).
TcpServer(int, ThreadFactory) - Constructor for class TcpServer
Constructs a new TcpServer that will listen on the given port (but not until TcpServer.start() is called).
TcpServer.Event - Class in <Unnamed>
An event representing activity by a TcpServer.
TcpServer.Event(TcpServer) - Constructor for class TcpServer.Event
Creates a Event based on the given TcpServer.
TcpServer.Listener - Interface in <Unnamed>
An interface for listening to events from a TcpServer.
TcpServer.State - Enum in <Unnamed>
One of four possible states for the server to be in:

U

UDP_BINDINGS_PROP - Static variable in class NioServer
Refers to the UDP bindings for the server.
udpDataReceived(NioServer.Event) - Method in class NioServer.Adapter
Empty method.
udpDataReceived(NioServer.Event) - Method in interface NioServer.Listener
Called when UDP data is received.
UdpServer - Class in <Unnamed>
A robust class for establishing a UDP server and manipulating its listening port and optionally a multicast groups to join.
UdpServer() - Constructor for class UdpServer
Constructs a new UdpServer that will listen on the default port 8000 (but not until UdpServer.start() is called).
UdpServer(int) - Constructor for class UdpServer
Constructs a new UdpServer that will listen on the given port (but not until UdpServer.start() is called).
UdpServer(int, ThreadFactory) - Constructor for class UdpServer
Constructs a new UdpServer that will listen on the given port (but not until UdpServer.start() is called).
UdpServer.Event - Class in <Unnamed>
An event representing activity by a UdpServer.
UdpServer.Event(UdpServer) - Constructor for class UdpServer.Event
Creates a Event based on the given UdpServer.
UdpServer.Listener - Interface in <Unnamed>
An interface for listening to events from a UdpServer.
UdpServer.State - Enum in <Unnamed>
One of four possible states for the server to be in:

V

valueOf(String) - Static method in enum NioServer.State
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum TcpServer.State
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum UdpServer.State
Returns the enum constant of this type with the specified name.
values() - Static method in enum NioServer.State
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum TcpServer.State
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum UdpServer.State
Returns an array containing the constants of this enum type, in the order they are declared.

A C E F G I L N O P R S T U V