jfreerails.network
Class AbstractInetConnection
java.lang.Object
jfreerails.network.AbstractInetConnection
- All Implemented Interfaces:
- java.lang.Runnable
- Direct Known Subclasses:
- InetConnection2Client, InetConnection2Server
abstract class AbstractInetConnection
- extends java.lang.Object
- implements java.lang.Runnable
This class has the code that is shared by the client and server versions of
InetConnection.
- Author:
- Luke
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final java.util.logging.Logger logger
inbound
private final SychronizedQueue inbound
inetConnection
private final InetConnection inetConnection
readerThreadStatus
private final SynchronizedFlag readerThreadStatus
status
private final SynchronizedFlag status
timeout
private int timeout
AbstractInetConnection
public AbstractInetConnection(java.net.Socket s)
throws java.io.IOException
- Throws:
java.io.IOException
AbstractInetConnection
public AbstractInetConnection(java.lang.String ip,
int port)
throws java.io.IOException
- Throws:
java.io.IOException
disconnect
public void disconnect()
throws java.io.IOException
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Throws:
java.io.IOException
isOpen
public boolean isOpen()
run
public void run()
- Specified by:
run in interface java.lang.Runnable
open
private void open()
throws java.io.IOException
- Throws:
java.io.IOException
shutDownInput
private void shutDownInput()
shutdownOutput
private void shutdownOutput()
throws java.io.IOException
- Throws:
java.io.IOException
getThreadName
abstract java.lang.String getThreadName()
read
FreerailsSerializable[] read()
throws java.io.IOException
- Throws:
java.io.IOException
send
void send(FreerailsSerializable object)
throws java.io.IOException
- Throws:
java.io.IOException
setTimeOut
void setTimeOut(int i)
waitForObject
FreerailsSerializable waitForObject()
throws java.lang.InterruptedException,
java.io.IOException
- Throws:
java.lang.InterruptedException
java.io.IOException