org.xnap.plugin.overnet.net
Class OvernetCore

java.lang.Object
  extended by org.xnap.plugin.overnet.net.OvernetCore

public class OvernetCore
extends java.lang.Object

Epitomizes a connection to the overnet core. This class handles all the low level writing and reading of messages. The transitions from one connection state to the next are handled in its private subclass StateMachine.


Field Summary
static byte ED2K_BYTE
           
 
Constructor Summary
OvernetCore(MessageHandler handler)
           
 
Method Summary
 void addStateListener(StateListener listener)
           
 void connect()
          Connect to the overnet core.
 void connect(int delay)
          Connect to core after a certain delay.
 java.lang.String getDescription()
           
 State getState()
           
 void removeStateListener(StateListener listener)
           
static void send(OvernetClientMessage cm)
          Sends a message to the overnet core in a non-blocking way.
 void stop()
          Stops the connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ED2K_BYTE

public static final byte ED2K_BYTE
See Also:
Constant Field Values
Constructor Detail

OvernetCore

public OvernetCore(MessageHandler handler)
Method Detail

connect

public void connect()
Connect to the overnet core.


connect

public void connect(int delay)
Connect to core after a certain delay. The core's state will be immediately connecting.


send

public static void send(OvernetClientMessage cm)
Sends a message to the overnet core in a non-blocking way.


stop

public void stop()
Stops the connection.


addStateListener

public void addStateListener(StateListener listener)

removeStateListener

public void removeStateListener(StateListener listener)

getState

public State getState()

getDescription

public java.lang.String getDescription()


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