de.jadv.client
Class SocketThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--de.jadv.client.SocketThread
All Implemented Interfaces:
java.lang.Runnable

public class SocketThread
extends java.lang.Thread

A thread that the client creates which then makes a connection to a server via a proxy.

Author:
neitzel
See Also:
JAdvClient, SyncByteBuffersForChannels

Field Summary
private  JAdvClient _client
           
private  boolean _done
           
private  java.nio.channels.SocketChannel _socketChannel
           
private static java.util.logging.Logger logger
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SocketThread(JAdvClient client)
          Creates a SocketThread associated with the specified client.
 
Method Summary
 void connect(java.lang.String host, int port)
          Connects to a proxy on the specified host and port.
 void run()
          Called from the start() method by the system.
 void setDone(boolean done)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static java.util.logging.Logger logger

_done

private boolean _done

_socketChannel

private java.nio.channels.SocketChannel _socketChannel

_client

private JAdvClient _client
Constructor Detail

SocketThread

public SocketThread(JAdvClient client)
Creates a SocketThread associated with the specified client.

Parameters:
client - the JAdvClient to associate with this SocketThread
Method Detail

setDone

public void setDone(boolean done)

run

public void run()
Called from the start() method by the system.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

connect

public void connect(java.lang.String host,
                    int port)
             throws java.io.IOException
Connects to a proxy on the specified host and port.

Parameters:
host - the host
port - the port
java.io.IOException