A B C D E G H I K L M N O P R S T

A

AbstractSocket - class keepalive.socket.AbstractSocket.
Abstracts the socket functionality.
AbstractSocket() - Constructor for class keepalive.socket.AbstractSocket
 
accept() - Method in interface keepalive.socket.ServerSocketIfc
 
accept() - Method in class keepalive.socket.adapter.ServerSocketAdapter
Accept a connection and spin off a new socket.
accept() - Method in class keepalive.socket.sim.SimServerSocket
Accept a new connection and spin off a new socket
ActiveKeepAlive - class keepalive.keepalive.ActiveKeepAlive.
This ActiveKeepAlive repeatedly sends out dummy messages to see if we get an IOException.
ActiveKeepAlive() - Constructor for class keepalive.keepalive.ActiveKeepAlive
Used for dynamic classloading
ActiveKeepAlive(Sender) - Constructor for class keepalive.keepalive.ActiveKeepAlive
 
ActiveKeepAliveWithAYT - class keepalive.keepalive.ActiveKeepAliveWithAYT.
Combines the ActiveKeepAlive and AreYouThere.
ActiveKeepAliveWithAYT() - Constructor for class keepalive.keepalive.ActiveKeepAliveWithAYT
Create a Keep-Alive object.
ActiveKeepAliveWithAYT(Receiver, Sender) - Constructor for class keepalive.keepalive.ActiveKeepAliveWithAYT
Create a Keep-Alive object.
ARE_YOU_THERE - Static variable in class keepalive.keepalive.KeepAlive
A String to be sent by Are-You-There protocols.
AreYouThere - class keepalive.keepalive.AreYouThere.
If no incoming messages have been received in a while, the remote application or host may be dead or the connection may have been lost, so send out an Are-You-There.
AreYouThere() - Constructor for class keepalive.keepalive.AreYouThere
Create a new Keep-Alive object.
AreYouThere(Receiver, Sender) - Constructor for class keepalive.keepalive.AreYouThere
Create a new Keep-Alive object.

B

buttonPanel - Variable in class keepalive.ui.KeepAliveUI
This field is "protected" so that subclasses can add more buttons.

C

Client - class keepalive.apps.Client.
A Client application.
Client(String) - Constructor for class keepalive.apps.Client
Start the client application.
ClientKeepAliveUI - class keepalive.ui.ClientKeepAliveUI.
The Keep-Alive user interface to be displayed on the server-side.
ClientKeepAliveUI(Client) - Constructor for class keepalive.ui.ClientKeepAliveUI
Create a new Keep-Alive user interface for the client side
close() - Method in interface keepalive.communication.Sender
Closes socket without rethrowing IOException.
close() - Method in class keepalive.communication.Output
Close socket.
close() - Method in interface keepalive.socket.ServerSocketIfc
 
close() - Method in class keepalive.socket.AbstractSocket
 
close() - Method in class keepalive.socket.adapter.ServerSocketAdapter
Close this ServerSocket.
close() - Method in class keepalive.socket.sim.SimServerSocket
Close this SimServerSocket.
closeSocket() - Method in class keepalive.socket.AbstractSocket
 
closeSocket() - Method in class keepalive.socket.adapter.SocketAdapter
 
closeSocket() - Method in class keepalive.socket.sim.SimSocket
Close this socket.
createServerSocket() - Static method in class keepalive.socket.SocketFactory
Create a ServerSocket bound to the port SocketFactory.PORT
createSocket(InetAddress) - Static method in class keepalive.socket.SocketFactory
Create a new client-side socket that connects to a serverhost.
createUI() - Method in class keepalive.apps.Client
Create the user interface
createUI() - Method in class keepalive.apps.Server
Create the user interface.

D

display(String) - Method in class keepalive.socket.sim.ui.NetstatUI
all-back method for displaying Strings.
display(String, String, boolean) - Method in class keepalive.ui.KeepAliveUI
From MessageUI
display(String, String, boolean) - Method in interface keepalive.ui.MessageDisplayer
Called when there is a message to display in a user interface.

E

end() - Method in class keepalive.keepalive.KeepAlive
Request that the thread be shut down.
endRequested - Variable in class keepalive.keepalive.KeepAlive
Shutdown switch for the thread.
endRequested() - Method in class keepalive.keepalive.KeepAlive
Indicate if the thread is being shut down.

G

getClientKeepAlive() - Static method in class keepalive.socket.SocketFactory
Get the Keep-Alive class used for all client-side sockets produced by this factory.
getDummyString() - Method in class keepalive.keepalive.KeepAlive
Get a dummy String for use in Keep-Alive messages probes.
getInputStream() - Method in class keepalive.socket.AbstractSocket
 
getInputStream() - Method in class keepalive.socket.adapter.SocketAdapter
 
getInputStream() - Method in class keepalive.socket.sim.SimSocket
Get the input stream associated with this simulated socket.
getOutputStream() - Method in class keepalive.socket.AbstractSocket
 
getOutputStream() - Method in class keepalive.socket.adapter.SocketAdapter
 
getOutputStream() - Method in class keepalive.socket.sim.SimSocket
Get the output stream associated with this simulated socket.
getPort() - Method in class keepalive.socket.sim.SimServerSocket
Get the port to which this ServerSocket is bound.
getReceiver() - Method in class keepalive.keepalive.KeepAlive
 
getReport() - Method in class keepalive.socket.sim.SimHost
Get a report on the state of the sockets on this host.
getSender() - Method in class keepalive.keepalive.KeepAlive
 
getServerKeepAlive() - Static method in class keepalive.socket.SocketFactory
Get the Keep-Alive class used for all server-side sockets produced by this factory.
getServerSocketIterator() - Static method in class keepalive.socket.sim.SimServerSocket
Get Iterator all SimServerSockets in this simulated networking system (on "server" and "client" hosts).
getSilentTimeForIncoming() - Method in class keepalive.keepalive.KeepAlive
How long since we heard from the other side.

H

HeartbeatClient - class keepalive.keepalive.HeartbeatClient.
Sends a "heartbeat" which is echoed by HeartbeatServer, closing the socket if there is silence for a suspicious time period.
HeartbeatClient() - Constructor for class keepalive.keepalive.HeartbeatClient
Create a new Keep-Alive.
HeartbeatClient(Receiver, Sender) - Constructor for class keepalive.keepalive.HeartbeatClient
Create a new Keep-Alive.
HeartbeatServer - class keepalive.keepalive.HeartbeatServer.
Echoes the "heartbeat" which is sent regularly by HeartbeatClient, closing the socket if there is silence for a suspicious time period.
HeartbeatServer() - Constructor for class keepalive.keepalive.HeartbeatServer
Used for dynamic classloading.
HeartbeatServer(Receiver, Sender) - Constructor for class keepalive.keepalive.HeartbeatServer
This is the server.

I

I_HEAR_YOU - Static variable in class keepalive.keepalive.KeepAlive
A String to be sent by I-Hear-You Keep-Alives in respond to Are-You-There.
IHearYou - class keepalive.keepalive.IHearYou.
This "Keep-Alive" does not actually do anything for cleaning up the local socket; rather, it helps the remote Are-You-There protocol by waiting for incoming Are-You-Theres and responding to them.
IHearYou() - Constructor for class keepalive.keepalive.IHearYou
 
IHearYou(Receiver, Sender) - Constructor for class keepalive.keepalive.IHearYou
 
Input - class keepalive.communication.Input.
Accept an incoming stream of characters.
Input(AbstractSocket, String) - Constructor for class keepalive.communication.Input
Create a new Input object.
isPluggedIn() - Method in class keepalive.socket.sim.SimSocket
Whether this simulated socket's host is "plugged-in."
isPluggedIn() - Method in class keepalive.socket.sim.SimServerSocket
 
isPluggedIn() - Method in class keepalive.socket.sim.SimHost
Find if this host is plugged in.
isServerSide() - Method in class keepalive.apps.Client
Indicates that this application is a client application.
isServerSide() - Method in class keepalive.apps.Server
Indicates that this application is a server application.
isServerSide() - Method in class keepalive.socket.sim.SimHost
Find whether this host is acting as a server.

K

KeepAlive - class keepalive.keepalive.KeepAlive.
A Keep-Alive is an object that participates in a Keep-Alive protocol.
keepalive.apps - package keepalive.apps
 
keepalive.communication - package keepalive.communication
 
keepalive.keepalive - package keepalive.keepalive
 
keepalive.socket - package keepalive.socket
 
keepalive.socket.adapter - package keepalive.socket.adapter
 
keepalive.socket.sim - package keepalive.socket.sim
 
keepalive.socket.sim.ui - package keepalive.socket.sim.ui
 
keepalive.ui - package keepalive.ui
 
KeepAlive() - Constructor for class keepalive.keepalive.KeepAlive
Create a Keep-Alive with no receiver or sender set.
KeepAlive(Receiver, Sender) - Constructor for class keepalive.keepalive.KeepAlive
Create the Keep-Alive object with the given receiver and sender.
KeepAliveFrame - class keepalive.ui.KeepAliveFrame.
The Frame which holds within it the Keep-Alive user interface.
KeepAliveFrame(KeepAliveUI, boolean) - Constructor for class keepalive.ui.KeepAliveFrame
Construct and show a new KeepAliveFrame
KeepAliveUI - class keepalive.ui.KeepAliveUI.
User interface for displaying incoming and outgoing messages and the name of the Keep-Alive class that is now in use.
KeepAliveUI() - Constructor for class keepalive.ui.KeepAliveUI
 

L

lastTimeStamp() - Method in class keepalive.communication.Input
Get time stamp for incoming messages.
lastTimeStamp() - Method in interface keepalive.communication.Sender
Get the last time data was sent.
lastTimeStamp() - Method in interface keepalive.communication.Receiver
The last time data was received.
lastTimeStamp() - Method in class keepalive.communication.Output
Get time that last message was sent.
listen() - Method in class keepalive.apps.Server
Listen for incoming socket connections.

M

main(String[]) - Static method in class keepalive.apps.Client
Run the Client application with real TCP/IP sockets.
main(String[]) - Static method in class keepalive.apps.RunApp
 
main(String[]) - Static method in class keepalive.apps.Server
Run the Server application with real TCP/IP sockets.
main(String[]) - Static method in class keepalive.apps.SimApplication
Start the simulated client and server applications.
MessageDisplayer - interface keepalive.ui.MessageDisplayer.
Call-back interface which is notified when there is a message to display in a user interface.
MessageListener - interface keepalive.communication.MessageListener.
Call-back interface that is notified when new messages are received.
messageReceived(String) - Method in class keepalive.keepalive.PassiveKeepAliveWithIHY
This method examines all incoming messages, checking for Are-You-Theres.
messageReceived(String) - Method in class keepalive.keepalive.HeartbeatServer
This method is called by Receiver as the call-back method from MessageListener Ignore all messages but "Are You There." Respond to Are-You-There with "I Hear You." There is an alternate implementation, not as simple but more conservative of bandwidth, which resembles somewhat the AreYouThere/IHearYou pair.
messageReceived(String) - Method in class keepalive.keepalive.IHearYou
This method is called by Receiver as the call-back method from MessageListener Ignore all messages but "Are You There." Respond to Are-You-There with "I Hear You." "I Hear you" is expressed here by a dummy message, since its only purpose is to update the last-message-received timestamp for the other side.
messageReceived(String) - Method in class keepalive.keepalive.PassiveKeepAlive
Whenever we receive a message, wake up the listening thread for another loop.
messageReceived(String) - Method in interface keepalive.communication.MessageListener
A message has been received.

N

NetstatUI - class keepalive.socket.sim.ui.NetstatUI.
Displays information current ServerSockets and Sockets.
NetstatUI(SimHost) - Constructor for class keepalive.socket.sim.ui.NetstatUI
Construct a netstat-like user interface for the given host
NullKeepAlive - class keepalive.keepalive.NullKeepAlive.
This Keep-Alive actually does nothing; it is a placeholder, a "Null Object" as in the Null Object design pattern.
NullKeepAlive() - Constructor for class keepalive.keepalive.NullKeepAlive
 
NullKeepAlive(Receiver, Sender) - Constructor for class keepalive.keepalive.NullKeepAlive
 

O

openConnectionToServer() - Method in class keepalive.ui.ClientKeepAliveUI
Open a new connection to the server.
openConnectionToServer() - Method in class keepalive.apps.Client
Connect to the server.
Output - class keepalive.communication.Output.
Send an outgoing stream of characters.
Output(AbstractSocket, String) - Constructor for class keepalive.communication.Output
Create a new Output object

P

PassiveKeepAlive - class keepalive.keepalive.PassiveKeepAlive.
Resembles the ActiveKeepAlive in that it sends out dummy messages to see if it gets an IOException, but does not send out dummy messages periodically; rather, only if no incoming data is forthcoming for a long time do we test the connection.
PassiveKeepAlive() - Constructor for class keepalive.keepalive.PassiveKeepAlive
Used for dynamic classloading
PassiveKeepAlive(Receiver, Sender) - Constructor for class keepalive.keepalive.PassiveKeepAlive
 
PassiveKeepAliveWithIHY - class keepalive.keepalive.PassiveKeepAliveWithIHY.
Combines PassiveKeepAlive with I-Hear-You responses to incoming Are-You-Theres.
PassiveKeepAliveWithIHY() - Constructor for class keepalive.keepalive.PassiveKeepAliveWithIHY
 
PassiveKeepAliveWithIHY(Receiver, Sender) - Constructor for class keepalive.keepalive.PassiveKeepAliveWithIHY
 
PlugPanel - class keepalive.socket.sim.ui.PlugPanel.
Provides a button for a simulated "unplugging" and "plugging in" of our simulated host machine.
PlugPanel(SimHost) - Constructor for class keepalive.socket.sim.ui.PlugPanel
 
PORT - Static variable in class keepalive.socket.SocketFactory
 

R

Receiver - interface keepalive.communication.Receiver.
An object that receives messages.
run() - Method in class keepalive.keepalive.KeepAlive
Require the subclasses to implement run(), to prevent them from using the run() method in class Thread with a null body.
run() - Method in class keepalive.keepalive.ActiveKeepAliveWithAYT
 
run() - Method in class keepalive.keepalive.PassiveKeepAliveWithIHY
 
run() - Method in class keepalive.keepalive.HeartbeatServer
 
run() - Method in class keepalive.keepalive.NullKeepAlive
Just sleep forever.
run() - Method in class keepalive.keepalive.AreYouThere
 
run() - Method in class keepalive.keepalive.ActiveKeepAlive
 
run() - Method in class keepalive.keepalive.IHearYou
 
run() - Method in class keepalive.keepalive.HeartbeatClient
 
run() - Method in class keepalive.keepalive.PassiveKeepAlive
 
run() - Method in class keepalive.communication.Input
Receive messages line by line; pass each incoming message to the MessageListener
run() - Method in class keepalive.apps.Server
Listen for connections.
RunApp - class keepalive.apps.RunApp.
An app for launching the various apps: SimApplication, the Socket client, and the Socket Server.
RunApp() - Constructor for class keepalive.apps.RunApp
 

S

send(String) - Method in interface keepalive.communication.Sender
Send the given String.
send(String) - Method in class keepalive.communication.Output
Send a message with the given String.
Sender - interface keepalive.communication.Sender.
An object that knows how to send a message.
sendMessage() - Method in class keepalive.communication.Output
Send a message with a serial number.
Server - class keepalive.apps.Server.
A Server application.
Server() - Constructor for class keepalive.apps.Server
Run the application.
ServerKeepAliveUI - class keepalive.ui.ServerKeepAliveUI.
The Keep-Alive user interface to be displayed on the server-side.
ServerKeepAliveUI() - Constructor for class keepalive.ui.ServerKeepAliveUI
 
ServerSocketAdapter - class keepalive.socket.adapter.ServerSocketAdapter.
An adapter class that wraps a TCP/IP ServerSocket to allow it to be used with our ServerSocket interface.
ServerSocketAdapter(int) - Constructor for class keepalive.socket.adapter.ServerSocketAdapter
Create new ServerSocket adapter for a ServerSocket that will be bound to the given port.
ServerSocketIfc - interface keepalive.socket.ServerSocketIfc.
Abstracts the functionality of a TCP/IP socket so that either real TCP/IP sockets or simulated sockets can be used.
setClientKeepAlive(String) - Static method in class keepalive.socket.SocketFactory
Set the Keep-Alive class to be used for all client-side sockets produced by this factory.
setKeepAliveDescription(String) - Method in class keepalive.ui.KeepAliveUI
 
setMessageDisplayer(MessageDisplayer) - Method in class keepalive.communication.Input
Set the object that displays messages.
setMessageDisplayer(MessageDisplayer) - Method in class keepalive.communication.Output
Set the object that will display all outgoing messages as they are sent.
setMessageListener(MessageListener) - Method in class keepalive.communication.Input
Set the call-back object for received messages.
setMessageListener(MessageListener) - Method in interface keepalive.communication.Receiver
Set the call-back object that will be notified whenever data arrives.
setOutputObject(Output) - Method in class keepalive.ui.KeepAliveUI
 
setPluggedIn(boolean) - Method in class keepalive.socket.sim.SimHost
Plug this host in or unplug it.
setReceiver(Receiver) - Method in class keepalive.keepalive.KeepAlive
 
setReceiver(Receiver) - Method in class keepalive.keepalive.PassiveKeepAliveWithIHY
 
setReceiver(Receiver) - Method in class keepalive.keepalive.HeartbeatServer
Set the receiver object which receives messages that arrive at the socket associated with this Keep-Alive.
setReceiver(Receiver) - Method in class keepalive.keepalive.IHearYou
Set the receiver object which receives messages that arrive at the socket associated with this Keep-Alive.
setReceiver(Receiver) - Method in class keepalive.keepalive.PassiveKeepAlive
 
setSender(Sender) - Method in class keepalive.keepalive.KeepAlive
 
setServerKeepAlive(String) - Static method in class keepalive.socket.SocketFactory
Set the Keep-Alive class to be used for all server-side sockets produced by this factory.
setSocketType(int) - Static method in class keepalive.socket.SocketFactory
Set the type of sockets we will be producing
SIM_SOCKET - Static variable in class keepalive.socket.SocketFactory
 
SimApplication - class keepalive.apps.SimApplication.
Runs a client application and a server application in a simulated networking environment.
SimApplication() - Constructor for class keepalive.apps.SimApplication
 
SimHost - class keepalive.socket.sim.SimHost.
A simulated host (computer on the network).
SimHost(boolean) - Constructor for class keepalive.socket.sim.SimHost
Create a new host, indicating whether it is to act as a server.
SimHostFrame - class keepalive.socket.sim.ui.SimHostFrame.
A Frame for holding the user-interface for a simulated host.
SimHostFrame(NetstatUI, KeepAliveUI, boolean) - Constructor for class keepalive.socket.sim.ui.SimHostFrame
 
SimServerSocket - class keepalive.socket.sim.SimServerSocket.
A simulated ServerSocket.
SimServerSocket(int) - Constructor for class keepalive.socket.sim.SimServerSocket
Create a new ServerSocket to listen on the given port
SimSocket - class keepalive.socket.sim.SimSocket.
A simulated socket, within a single VM.
SimSocket(int) - Constructor for class keepalive.socket.sim.SimSocket
Connects to a SimServerSocket from Client side
SimSocket(SimSocket) - Constructor for class keepalive.socket.sim.SimSocket
Use this when a SimSocket is spun off from a SimServerSocket.
SOCKET - Static variable in class keepalive.socket.SocketFactory
 
SocketAdapter - class keepalive.socket.adapter.SocketAdapter.
An adapter class which adapts TCP/IP sockets to our AbstractSocket class.
SocketAdapter(InetAddress, int) - Constructor for class keepalive.socket.adapter.SocketAdapter
Create an adapter for a new socket that will connect to ServerSocket
SocketAdapter(Socket) - Constructor for class keepalive.socket.adapter.SocketAdapter
Create an adapter for a spunn-off socket (from a ServerSocket on accept()
SocketFactory - class keepalive.socket.SocketFactory.
Create new AbstractSockets, whether real TCP/IP sockets or simulated sockets.
SocketFactory() - Constructor for class keepalive.socket.SocketFactory
 
startKeepAlive(Receiver, Sender, boolean) - Method in class keepalive.socket.AbstractSocket
 

T

TIME_BETWEEN_ACTIVE_PROBES - Static variable in class keepalive.keepalive.KeepAlive
Time between active Keep-Alive probes.
toString() - Method in class keepalive.communication.Input
 
toString() - Method in class keepalive.communication.Output
 
toString() - Method in class keepalive.apps.Client
 
toString() - Method in class keepalive.apps.Server
 
toString() - Method in class keepalive.socket.adapter.ServerSocketAdapter
 
toString() - Method in class keepalive.socket.adapter.SocketAdapter
 
toString() - Method in class keepalive.socket.sim.SimSocket
 
toString() - Method in class keepalive.socket.sim.SimServerSocket
 

A B C D E G H I K L M N O P R S T

© 2000 Joshua Fox