org.xnap.plugin.opennap.net
Class OpenNapServerRunner

java.lang.Object
  extended by java.lang.Thread
      extended by org.xnap.plugin.opennap.net.OpenNapServerRunner
All Implemented Interfaces:
java.lang.Runnable

public class OpenNapServerRunner
extends java.lang.Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static int CONNECT_TIMEOUT
           
static int MAX_RETRY_ON_CONNECTION_REFUSED
           
static int SOCKET_TIMEOUT
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
OpenNapServerRunner(OpenNapServer server)
           
 
Method Summary
 void dequeue(OpenNapBrowse browse)
           
 void dequeue(OpenNapSearch search)
          Invoked by OpenNapSearch when search did not take place or was aborted.
 void die(State newState, java.lang.String description)
           
 void disconnect()
           
 void enqueue(OpenNapBrowse browse)
           
 void enqueue(OpenNapSearch search)
           
 boolean fetchHost(java.lang.String host, int port)
          Connects to a redirector server and reads the host information.
 SendQueue getSendQueue()
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

CONNECT_TIMEOUT

public static final int CONNECT_TIMEOUT
See Also:
Constant Field Values

MAX_RETRY_ON_CONNECTION_REFUSED

public static final int MAX_RETRY_ON_CONNECTION_REFUSED
See Also:
Constant Field Values

SOCKET_TIMEOUT

public static final int SOCKET_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

OpenNapServerRunner

public OpenNapServerRunner(OpenNapServer server)
Method Detail

enqueue

public void enqueue(OpenNapBrowse browse)

enqueue

public void enqueue(OpenNapSearch search)

dequeue

public void dequeue(OpenNapBrowse browse)

dequeue

public void dequeue(OpenNapSearch search)
Invoked by OpenNapSearch when search did not take place or was aborted.


die

public void die(State newState,
                java.lang.String description)

disconnect

public void disconnect()

getSendQueue

public SendQueue getSendQueue()

fetchHost

public boolean fetchHost(java.lang.String host,
                         int port)
                  throws java.io.IOException
Connects to a redirector server and reads the host information.

Returns:
true, if successful; false, if failed
Throws:
java.io.IOException

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread


Copyright © 2001-2005 XNap Team. All Rights Reserved.