NIST SIP Parser and Stack (v1.2) API

gov.nist.javax.sip.stack
Class Janitor

java.lang.Object
  |
  +--gov.nist.javax.sip.stack.Janitor
All Implemented Interfaces:
Runnable

public class Janitor
extends Object
implements Runnable

This class is in charge of periodical cleaning. Objects which require periodical cleaning register here. They must implement the Cleanable interface. Design note: this replaces the old Manager classes. Each of them was in charge of periodical cleaning for a specific class and was running its own thread. Now, there is a single thread running, which is in charge of all cleaning.

Version:
JAIN-SIP-1.1
Author:
M. Ranganathan
, Marc Bednarek
This code is in the public domain.

Constructor Summary
Janitor(Integer sleepingTime)
          Constructor
 
Method Summary
 void register(Cleanable object)
          Add a new object to be periodically cleaned
 void run()
          This is the code that periodically clean the objects
 void unregister(Cleanable object)
          Remove from the list an object to be cleaned
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Janitor

public Janitor(Integer sleepingTime)
Constructor

Parameters:
sleepingTime - The period between each cleaning
Method Detail

register

public void register(Cleanable object)
Add a new object to be periodically cleaned

Parameters:
object - The object to be cleaned (must implement Cleanable)

unregister

public void unregister(Cleanable object)
Remove from the list an object to be cleaned

Parameters:
object - The object to remove

run

public void run()
This is the code that periodically clean the objects

Specified by:
run in interface Runnable

NIST SIP Parser and Stack (v1.2) API

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Get the latest distribution.
Submit a bug report or feature request.