Class AFRMISocketFactory.PortLease
java.lang.Object
org.newsclub.net.unix.rmi.AFRMISocketFactory.PortLease
- All Implemented Interfaces:
Closeable, AutoCloseable
- Enclosing class:
AFRMISocketFactory
-
Method Summary
Modifier 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
-
close
Closes the lease, returning the port to theAFRMIServiceit was leased from.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getPort
public int getPort()Returns the port number.- Returns:
- the port number.
-
getRmiService
Returns the service the port was leased from.- Returns:
- The service.
-