com.notuvy.singleapp
Class SingleUserEnforcer
java.lang.Object
com.notuvy.singleapp.multiuser.GenericEnforcer
com.notuvy.singleapp.SingleUserEnforcer
- All Implemented Interfaces:
- Enforcer, Runnable
public abstract class SingleUserEnforcer
- extends GenericEnforcer
- implements Runnable, Enforcer
A utility that enforces the invocation of a system-wide singleton application instance.
- Author:
- murali
Field Summary |
protected static org.apache.log4j.Logger |
LOG
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.apache.log4j.Logger LOG
SingleUserEnforcer
protected SingleUserEnforcer(int pPort,
Runnable pRunnable)
getPort
public int getPort()
takeControl
protected void takeControl()
wrest
protected void wrest(Preemptable pPreemptable)
attempt
public void attempt()
- Specified by:
attempt
in interface Enforcer
run
public void run()
- Specified by:
run
in interface Runnable
handlePortConflict
protected abstract void handlePortConflict()
handleConnection
protected abstract void handleConnection(Socket pSocket)
shutdownServer
public void shutdownServer()
- Specified by:
shutdownServer
in interface Enforcer
Copyright © 2012. All Rights Reserved.