- Type Parameters:
T
- The resource type.
- All Superinterfaces:
AutoCloseable
,Closeable
,Remote
- All Known Implementing Classes:
RemoteCloseableImpl
A resource that can be exposed remotely, and closed locally as well as remotely.
- Author:
- Christian Kohlschütter
-
Method Summary
-
Method Details
-
get
Returns 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).- Returns:
- The wrapped resource.
- Throws:
NoSuchObjectException
- if this instance has been closed already.IOException
- if there was a problem.
-
close
Closes the resource on the server-side (i.e., where it was created), and — as long as the wrapped resource returned byget()
supports it — locally as well.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
- if there was a problem.
-