Class TicketLocker
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.util.locker.TicketLocker
-
-
Constructor Summary
Constructors Constructor Description TicketLocker(String lockerName, int port)Public constructor.TicketLocker(String lockerName, int port, String description)Public constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidlock()Wait the token and then lock the resource.static voidmain(String[] args)Main method.voidunlock()Unlock the resource.
-
-
-
Constructor Detail
-
TicketLocker
public TicketLocker(String lockerName, int port)
Public constructor.- Parameters:
lockerName- The name of the lockerport- port to use
-
-
Method Detail
-
lock
public void lock() throws IOExceptionDescription copied from interface:LockerWait the token and then lock the resource.- Specified by:
lockin interfaceLocker- Throws:
IOException- if an error occurs while locking the resource
-
unlock
public void unlock() throws IOExceptionDescription copied from interface:LockerUnlock the resource.- Specified by:
unlockin interfaceLocker- Throws:
IOException- if an error occurs while unlocking the resource
-
main
public static void main(String[] args) throws RemoteException, MalformedURLException
Main method.- Parameters:
args- command line arguments- Throws:
RemoteException- if an error occurs while inspecting ticketsMalformedURLException- if the URL of the server is malformed
-
-