Module org.newsclub.net.unix.rmi
Package org.newsclub.net.unix.rmi
Class AFRMISocketFactory.PortLease
java.lang.Object
org.newsclub.net.unix.rmi.AFRMISocketFactory.PortLease
- All Implemented Interfaces:
- Closeable,- AutoCloseable
- Enclosing class:
- AFRMISocketFactory
A lease on a registered port; closing the lease will return the port.
- Author:
- Christian Kohlschütter
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Closes the lease, returning the port to theAFRMIServiceit was leased from.intgetPort()Returns the port number.Returns the service the port was leased from.
- 
Method Details- 
closeCloses the lease, returning the port to theAFRMIServiceit was leased from.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException
 
- 
getPortpublic int getPort()Returns the port number.- Returns:
- the port number.
 
- 
getRmiServiceReturns the service the port was leased from.- Returns:
- The service.
 
 
-