java.lang.Object
org.cybergarage.util.ThreadCore
org.cybergarage.upnp.device.Disposer
- All Implemented Interfaces:
Runnable
Thread for disposing expired UPnP devices and subscriptions.
This class extends ThreadCore to provide periodic cleanup of expired UPnP devices and subscriptions in a control point. It runs in the background to maintain an accurate view of available devices and active subscriptions.
Key features:
- Automatic device expiration handling
- Subscription cleanup and renewal
- Periodic maintenance operations
- Multi-threaded execution
- Control point integration
This class is used by UPnP control points to automatically remove devices that have become unavailable and clean up expired subscriptions, ensuring efficient resource management and accurate device tracking.
Field Summary
FieldsConstructor Summary
ConstructorsConstructorDescriptionDisposer(ControlPoint ctrlp) Creates a disposer that watches the given control point.Method Summary
All MethodsModifier and TypeMethodDescriptionGet the control point.voidrun()/////////////////////////////////////////////voidsetControlPoint(ControlPoint ctrlp) Set the control point.Methods inherited from class ThreadCore
getThreadObject, isRunnable, restart, setThreadObject, start, stopModifier and TypeMethodDescriptionGets the internal Thread object.booleanChecks if the current thread is the same as this ThreadCore's thread.voidrestart()Restarts the thread by stopping it first and then starting it again.voidsetThreadObject(Thread obj) Sets the internal Thread object.voidstart()Starts the thread if it's not already running.voidstop()Stops the thread safely using interruption.
Field Details
ctrlPoint
/////////////////////////////////////////////
Constructor Details
Disposer
Creates a disposer that watches the given control point.- Parameters:
ctrlp- the control point whose devices and subscriptions are swept
Method Details
setControlPoint
Set the control point.- Parameters:
ctrlp- the control point to store for later sweeping
getControlPoint
Get the control point.- Returns:
- the control point being swept, null until one is set
run
public void run()/////////////////////////////////////////////- Specified by:
runin interfaceRunnable- Overrides:
runin classThreadCore