org.walluck.oscar
Class KeepAliveTask
java.lang.Object
java.util.TimerTask
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. |
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
KeepAliveTask
public KeepAliveTask(AIMConnection conn)
- Creates a new keep alive task.
- Parameters:
conn
- the bos connection for this session
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