public class PortsManager
extends java.lang.Object
Constructor and Description |
---|
PortsManager() |
PortsManager(long expiry_time) |
PortsManager(long expiry_time,
java.lang.String ports_file) |
PortsManager(long expiry_time,
java.lang.String filename,
java.lang.String temp_dir) |
PortsManager(java.lang.String ports_file) |
Modifier and Type | Method and Description |
---|---|
void |
deleteFile()
Deletes the underlying file.
|
long |
getExpiryTime() |
int |
getNextAvailablePort(int start_port)
Loads the file, weeds out expired ports, returns the next available port and saves the new port in the file
|
void |
removePort(int port)
Loads the file, removes the port (if existent) and closes the file again
|
void |
setExpiryTime(long expiry_time) |
void |
updatePort(int port)
Updates the timestamp for the given port
|
public PortsManager()
public PortsManager(long expiry_time)
public PortsManager(java.lang.String ports_file)
public PortsManager(long expiry_time, java.lang.String ports_file)
public PortsManager(long expiry_time, java.lang.String filename, java.lang.String temp_dir)
public long getExpiryTime()
public void setExpiryTime(long expiry_time)
public int getNextAvailablePort(int start_port)
public void removePort(int port)
public void updatePort(int port)
port
- public void deleteFile()
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.