java.lang.Object
org.newsclub.net.unix.rmi.RemoteCloseableImpl<T>
- Type Parameters:
- T- The resource type.
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Remote,- RemoteCloseable<T>
The default implementation of 
RemoteCloseable.- Author:
- Christian Kohlschütter
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionRemoteCloseableImpl(RMISocketFactory socketFactory, T obj) Created a new instance.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Closes the resource on the server-side (i.e., where it was created), and — as long as the wrapped resource returned byRemoteCloseable.get()supports it — locally as well.get()Returns the resource (or the Remote instance of it).
- 
Constructor Details- 
RemoteCloseableImplCreated a new instance.- Parameters:
- socketFactory- The socket factory.
- obj- The object to wrap.
- Throws:
- RemoteException- on error.
 
 
- 
- 
Method Details- 
closeDescription copied from interface:RemoteCloseableCloses the resource on the server-side (i.e., where it was created), and — as long as the wrapped resource returned byRemoteCloseable.get()supports it — locally as well.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- RemoteCloseable<T>
- Throws:
- IOException- if there was a problem.
 
- 
getDescription copied from interface:RemoteCloseableReturns the resource (or the Remote instance of it). If the returned resource isCloseable, then closing viaget().close()} will affect the client-side (local), but not necessarily the server-side as well (the exact behavior depends on the resource).- Specified by:
- getin interface- RemoteCloseable<T>
- Returns:
- The wrapped resource.
- Throws:
- IOException- if there was a problem.
 
 
-