org.walluck.oscar
Class KeepAliveTask

java.lang.Object
  extended by java.util.TimerTask
      extended by org.walluck.oscar.KeepAliveTask
All Implemented Interfaces:
Runnable

public class KeepAliveTask
extends 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(AIMConnection conn)
          Creates a new keep alive task.
 
Method Summary
 void run()
          The run method for the keep alive task.
 void sendKeepAlive(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(AIMConnection conn)
Creates a new keep alive task.

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

sendKeepAlive

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

Parameters:
conn - the bos connection for this session
Throws:
IOException - if an error occurs

run

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

Specified by:
run in interface Runnable
Specified by:
run in class TimerTask