A C F G H I L O R S T

A

AbstractClient - class ocsf.client.AbstractClient.
The AbstractClient contains all the * methods necessary to set up the client side of a client-server * architecture.
AbstractClient(String, int) - Constructor for class ocsf.client.AbstractClient
Constructs the client.
AbstractServer - class ocsf.server.AbstractServer.
The AbstractServer class maintains a thread that waits for connection attempts from clients.
AbstractServer(int) - Constructor for class ocsf.server.AbstractServer
Constructs a new server.

C

CLIENT_CONNECTED - Static variable in class ocsf.server.ObservableServer
The string sent to the observers when a client has connected.
CLIENT_DISCONNECTED - Static variable in class ocsf.server.ObservableServer
The string sent to the observers when a client has disconnected.
CLIENT_EXCEPTION - Static variable in class ocsf.server.ObservableServer
The string sent to the observers when an exception occurred with a client.
clientConnected(ConnectionToClient) - Method in class ocsf.server.AbstractServer
Hook method called each time a new client connection is accepted.
clientConnected(ConnectionToClient) - Method in class ocsf.server.ObservableOriginatorServer
Method called each time a new client connection is accepted.
clientConnected(ConnectionToClient) - Method in class ocsf.server.ObservableServer
Hook method called each time a new client connection is accepted.
clientDisconnected(ConnectionToClient) - Method in class ocsf.server.AbstractServer
Hook method called each time a client disconnects.
clientDisconnected(ConnectionToClient) - Method in class ocsf.server.ObservableOriginatorServer
Method called each time a client connection is disconnected.
clientDisconnected(ConnectionToClient) - Method in class ocsf.server.ObservableServer
Hook method called each time a client disconnects.
clientException(ConnectionToClient, Throwable) - Method in class ocsf.server.AbstractServer
Hook method called each time an exception is thrown in a ConnectionToClient thread.
clientException(ConnectionToClient, Throwable) - Method in class ocsf.server.ObservableOriginatorServer
Method called each time an exception is raised by a client connection.
clientException(ConnectionToClient, Throwable) - Method in class ocsf.server.ObservableServer
Hook method called each time an exception is raised in a client thread.
close() - Method in class ocsf.server.AbstractServer
Closes the server socket and the connections with all clients.
close() - Method in class ocsf.server.ConnectionToClient
Closes the client.
close() - Method in class ocsf.server.ObservableServer
Closes the server's connections with all clients.
closeConnection() - Method in class ocsf.client.AbstractClient
Closes the connection to the server.
closeConnection() - Method in class ocsf.client.ObservableClient
Closes the connection to the server.
CONNECTION_CLOSED - Static variable in class ocsf.client.ObservableClient
Indicates a close of the connection to server.
CONNECTION_ESTABLISHED - Static variable in class ocsf.client.ObservableClient
Indicates establishment of a connection to server.
CONNECTION_EXCEPTION - Static variable in class ocsf.client.ObservableClient
Indicates occurence of a connection exception.
connectionClosed() - Method in class ocsf.client.AbstractClient
Hook method called after the connection has been closed.
connectionClosed() - Method in class ocsf.client.ObservableClient
Hook method called after the connection has been closed.
connectionEstablished() - Method in class ocsf.client.AbstractClient
Hook method called after a connection has been established.
connectionEstablished() - Method in class ocsf.client.ObservableClient
Hook method called after a connection has been established.
connectionException(Exception) - Method in class ocsf.client.AbstractClient
Hook method called each time an exception is thrown by the * client's thread that is waiting for messages from the server.
connectionException(Exception) - Method in class ocsf.client.ObservableClient
Hook method called each time an exception is raised by the client listening thread.
ConnectionToClient - class ocsf.server.ConnectionToClient.
An instance of this class is created by the server when a client * connects.

F

finalize() - Method in class ocsf.server.ConnectionToClient
This method is called by garbage collection.

G

getClientConnections() - Method in class ocsf.server.AbstractServer
Returns an array containing the existing client connections.
getClientConnections() - Method in class ocsf.server.ObservableServer
Returns an array of containing the existing client connections.
getHost() - Method in class ocsf.client.AbstractClient
 
getHost() - Method in class ocsf.client.ObservableClient
 
getInetAddress() - Method in class ocsf.client.AbstractClient
returns the client's description.
getInetAddress() - Method in class ocsf.client.ObservableClient
 
getInetAddress() - Method in class ocsf.server.ConnectionToClient
Returns the address of the client.
getInfo(String) - Method in class ocsf.server.ConnectionToClient
Returns information about the client saved using setInfo.
getMessage() - Method in class ocsf.server.OriginatorMessage
Returns the message's contents.
getNumberOfClients() - Method in class ocsf.server.AbstractServer
Counts the number of clients currently connected.
getNumberOfClients() - Method in class ocsf.server.ObservableServer
 
getOriginator() - Method in class ocsf.server.OriginatorMessage
Returns the originating connection.
getPort() - Method in class ocsf.client.AbstractClient
 
getPort() - Method in class ocsf.client.ObservableClient
 
getPort() - Method in class ocsf.server.AbstractServer
Returns the port number.
getPort() - Method in class ocsf.server.ObservableServer
 

H

handleMessageFromClient(Object, ConnectionToClient) - Method in class ocsf.server.AbstractServer
Handles a command sent from one client to the server.
handleMessageFromClient(Object, ConnectionToClient) - Method in class ocsf.server.ObservableOriginatorServer
This method is used to handle messages coming from the client.
handleMessageFromClient(Object, ConnectionToClient) - Method in class ocsf.server.ObservableServer
This method is used to handle messages coming from the client.
handleMessageFromServer(Object) - Method in class ocsf.client.AbstractClient
Handles a message sent from the server to this client.
handleMessageFromServer(Object) - Method in class ocsf.client.ObservableClient
This method is used to handle messages from the server.

I

isConnected() - Method in class ocsf.client.AbstractClient
 
isConnected() - Method in class ocsf.client.ObservableClient
 
isListening() - Method in class ocsf.server.AbstractServer
Returns true if the server is ready to accept new clients.
isListening() - Method in class ocsf.server.ObservableServer
Used to find out if the server is accepting new clients.

L

listen() - Method in class ocsf.server.AbstractServer
Begins the thread that waits for new clients.
listen() - Method in class ocsf.server.ObservableServer
Begins the thread that waits for new clients
LISTENING_EXCEPTION - Static variable in class ocsf.server.ObservableServer
The string sent to the observers when a listening exception occurred.
listeningException(Throwable) - Method in class ocsf.server.AbstractServer
Hook method called when the server stops accepting connections because an exception has been raised.
listeningException(Throwable) - Method in class ocsf.server.ObservableOriginatorServer
Method called each time an exception is raised while listening.
listeningException(Throwable) - Method in class ocsf.server.ObservableServer
This method is called when the server stops accepting connections because an exception has been raised.

O

ObservableClient - class ocsf.client.ObservableClient.
This class acts as a subclass of AbstractClient and is also an Observable class.
ObservableClient(String, int) - Constructor for class ocsf.client.ObservableClient
 
ObservableOriginatorServer - class ocsf.server.ObservableOriginatorServer.
The ObservableOriginatorServer is a subclass of ObservableServer that sends OriginatorMessage instances to its observers.
ObservableOriginatorServer(int) - Constructor for class ocsf.server.ObservableOriginatorServer
Constructs a new server.
ObservableServer - class ocsf.server.ObservableServer.
This class acts as a subclass of AbstractServer and is also an Observable class.
ObservableServer(int) - Constructor for class ocsf.server.ObservableServer
Constructs a new server.
ocsf.client - package ocsf.client
 
ocsf.server - package ocsf.server
 
openConnection() - Method in class ocsf.client.AbstractClient
Opens the connection with the server.
openConnection() - Method in class ocsf.client.ObservableClient
Opens the connections with the server.
OriginatorMessage - class ocsf.server.OriginatorMessage.
A message class used by the Observable layer of the OCSF in order to conserve information about the originator of a message.
OriginatorMessage(ConnectionToClient, Object) - Constructor for class ocsf.server.OriginatorMessage
Constructs an instance of an OriginatorMessage

R

run() - Method in class ocsf.client.AbstractClient
Waits for messages from the server.
run() - Method in class ocsf.server.AbstractServer
Runs the listening thread that allows clients to connect.
run() - Method in class ocsf.server.ConnectionToClient
Constantly reads the client's input stream.

S

sendToAllClients(Object) - Method in class ocsf.server.AbstractServer
Sends a message to every client connected to the server.
sendToAllClients(Object) - Method in class ocsf.server.ObservableServer
Sends a message to every client connected to the server.
sendToClient(Object) - Method in class ocsf.server.ConnectionToClient
Sends an object to the client.
sendToServer(Object) - Method in class ocsf.client.AbstractClient
Sends an object to the server.
sendToServer(Object) - Method in class ocsf.client.ObservableClient
Sends an object to the server.
SERVER_CLOSED - Static variable in class ocsf.server.ObservableServer
The string sent to the observers when the server has closed.
SERVER_STARTED - Static variable in class ocsf.server.ObservableServer
The string sent to the observers when the server has started.
SERVER_STOPPED - Static variable in class ocsf.server.ObservableServer
The string sent to the observers when the server has stopped.
serverClosed() - Method in class ocsf.server.AbstractServer
Hook method called when the server is clased.
serverClosed() - Method in class ocsf.server.ObservableOriginatorServer
Method called each time the server is closed.
serverClosed() - Method in class ocsf.server.ObservableServer
This method is called when the server is closed.
serverStarted() - Method in class ocsf.server.AbstractServer
Hook method called when the server starts listening for connections.
serverStarted() - Method in class ocsf.server.ObservableOriginatorServer
Method called each time the server is started.
serverStarted() - Method in class ocsf.server.ObservableServer
This method is called when the server starts listening for connections.
serverStopped() - Method in class ocsf.server.AbstractServer
Hook method called when the server stops accepting connections.
serverStopped() - Method in class ocsf.server.ObservableOriginatorServer
Method called each time the server is stopped.
serverStopped() - Method in class ocsf.server.ObservableServer
This method is called when the server stops accepting connections for any reason.
setBacklog(int) - Method in class ocsf.server.AbstractServer
Sets the maximum number of waiting connections accepted by the operating system.
setBacklog(int) - Method in class ocsf.server.ObservableServer
Sets the maximum number of waiting connections accepted by the operating system.
setHost(String) - Method in class ocsf.client.AbstractClient
Sets the server host for the next connection.
setHost(String) - Method in class ocsf.client.ObservableClient
Sets the server host for the next connection.
setInfo(String, Object) - Method in class ocsf.server.ConnectionToClient
Saves arbitrary information about this client.
setPort(int) - Method in class ocsf.client.AbstractClient
Sets the server port number for the next connection.
setPort(int) - Method in class ocsf.client.ObservableClient
Sets the server port number for the next connection.
setPort(int) - Method in class ocsf.server.AbstractServer
Sets the port number for the next connection.
setPort(int) - Method in class ocsf.server.ObservableServer
Sets the port number for the next connection.
setTimeout(int) - Method in class ocsf.server.AbstractServer
Sets the timeout time when accepting connections.
setTimeout(int) - Method in class ocsf.server.ObservableServer
Sets the timeout time when accepting connection.
stopListening() - Method in class ocsf.server.AbstractServer
Causes the server to stop accepting new connections.
stopListening() - Method in class ocsf.server.ObservableServer
Causes the server to stop accepting new connections.

T

toString() - Method in class ocsf.server.ConnectionToClient
Returns a string representation of the client.

A C F G H I L O R S T