com.bbdsoft.LicenseEnforcer
Class UDPLicenseSentry

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.bbdsoft.LicenseEnforcer.UDPLicenseSentry
All Implemented Interfaces:
BBDLicenseSentry, java.lang.Runnable

public class UDPLicenseSentry
extends java.lang.Thread
implements BBDLicenseSentry

Implementation of BBDLicenseHandler interface based on UDP protocol.

Using UDP broadcast it checks if there are more instances of user applications with the same license hash running on LAN. Then it signals user application (using BBDLicenseHandler interface) if there is no more license for it to run.

See Also:
BBDLicenseHandler

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UDPLicenseSentry()
           
 
Method Summary
protected  void createSocket()
           
 void run()
           
protected  boolean sendLicense()
           
 void setLicenseHandler(BBDLicenseHandler inLicenseHandler)
          Registers BBDLicenseHandler.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, yield, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UDPLicenseSentry

public UDPLicenseSentry()
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

setLicenseHandler

public void setLicenseHandler(BBDLicenseHandler inLicenseHandler)
Registers BBDLicenseHandler. Should be called by user application to register its BBDLicenseHandler.

Specified by:
setLicenseHandler in interface BBDLicenseSentry
See Also:
BBDLicenseHandler

createSocket

protected void createSocket()

sendLicense

protected boolean sendLicense()