Class IncomingConnection

public class IncomingConnection
implements java.lang.Runnable

Title:

Description:This class creates a server socket and listens on it. Provides methods to access the incoming and outgoing streams for connections accepted on this socket.

Copyright: Copyright (c) 2003

Company:

Version:
1.0
Author:
Ravi Kosuri
Constructor Detail

IncomingConnection

public IncomingConnection(int port)
Constructor
Parameters:
port -

Method Detail

run

public void run()
Runs forever. Accepts a connection. I think it would be a good idea to let the guy who is instantiating this class to shut the whole thing down when he needs listen on new ports(when the day changes). How do I shut this whole thread down?

close

public void close()
Closes the connection. Starts listening for new connections.

shutdown

public void shutdown()
Shuts the server socket down. Is this the best way to do this?(This is temporary for now).
Throws:
IOException -

getInputStream

public java.io.InputStream getInputStream()
returns the input stream
Returns:

getOutputStream

public java.io.OutputStream getOutputStream()
returns the output stream
Returns: