org.walluck.oscar.handlers.proxy
Class ProxyTool

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.walluck.oscar.handlers.proxy.ProxyTool
All Implemented Interfaces:
java.lang.Runnable

public class ProxyTool
extends java.lang.Thread

Sends proxy commands.

Since:
1.0
Version:
1.0
Author:
David Walluck

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ProxyTool(AIMSession sess, byte[] cookie, java.lang.String screenname, java.lang.String host, int port, boolean wantResponse)
          Creates a new proxy tool.
 
Method Summary
 void end()
          End this proxy session.
 void initRecv(java.lang.String sn, int port, byte[] cookie)
          Subtype 0x0004 - Send recv command.
 void initSend(java.lang.String sn, byte[] cookie)
          Subtype 0x0002 - Send init command.
 boolean isListener()
          Get the value of listener.
 boolean isSender()
          Get the value of sender.
 void run()
          Run method for the file transfer thread.
 void setListener(boolean listener)
          Set the value of listener.
 void setSender(boolean sender)
          Set the value of sender.
 
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
 

Constructor Detail

ProxyTool

public ProxyTool(AIMSession sess,
                 byte[] cookie,
                 java.lang.String screenname,
                 java.lang.String host,
                 int port,
                 boolean wantResponse)
Creates a new proxy tool.

Parameters:
sess - the oscar session
cookie - the cookie
screenname - the screenname
host - the host (i.e., ars.aol.com)
port - the port
wantResponse - whether ot not you want an ack for this request
Method Detail

initSend

public void initSend(java.lang.String sn,
                     byte[] cookie)
              throws java.io.IOException
Subtype 0x0002 - Send init command.

Parameters:
sn - the screenname
cookie - the cookie
Throws:
java.io.IOException - if an error occurs

initRecv

public void initRecv(java.lang.String sn,
                     int port,
                     byte[] cookie)
              throws java.io.IOException
Subtype 0x0004 - Send recv command.

Parameters:
sn - the screenname
port - the port
cookie - the cookie
Throws:
java.io.IOException - if an error occurs

setListener

public void setListener(boolean listener)
Set the value of listener.

Parameters:
listener - Value to assign to listener.

isListener

public boolean isListener()
Get the value of listener.

Returns:
value of listener.

setSender

public void setSender(boolean sender)
Set the value of sender.

Parameters:
sender - Value to assign to sender.

isSender

public boolean isSender()
Get the value of sender.

Returns:
value of sender.

end

public void end()
End this proxy session.


run

public void run()
Run method for the file transfer thread.