org.walluck.oscar
Class KeepAliveTask

java.lang.Object
  extended byjava.util.TimerTask
      extended byorg.walluck.oscar.KeepAliveTask
All Implemented Interfaces:
java.lang.Runnable

public class KeepAliveTask
extends java.util.TimerTask

The keep-alive task sends a keep alive packet once every minute.

Since:
1.0
Version:
1.0
Author:
David Walluck

Field Summary
static int TIME
          How often to send packets.
 
Constructor Summary
KeepAliveTask(AIMSession sess, AIMConnection conn)
          Creates a new keep alive task.
 
Method Summary
 void run()
          The run method for the keep alive task.
 void sendKeepAlive(AIMSession sess, AIMConnection conn)
          Send a keep alive packet (doesn't use the queue).
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIME

public static final int TIME
How often to send packets. One minute is what the WinAIM clients are set to, so it's safe not to change this.

See Also:
Constant Field Values
Constructor Detail

KeepAliveTask

public KeepAliveTask(AIMSession sess,
                     AIMConnection conn)
Creates a new keep alive task.

Parameters:
sess - the oscar session
conn - the bos connection for this session
Method Detail

sendKeepAlive

public void sendKeepAlive(AIMSession sess,
                          AIMConnection conn)
                   throws java.io.IOException
Send a keep alive packet (doesn't use the queue).

Parameters:
sess - the oscar session
conn - the bos connection for this session
Throws:
java.io.IOException - if an error occurs

run

public void run()
The run method for the keep alive task.