Class RemoteFileDescriptorBase<T>

java.lang.Object
org.newsclub.net.unix.rmi.RemoteFileDescriptorBase<T>
Type Parameters:
T - The resource type.
All Implemented Interfaces:
Closeable, Externalizable, Serializable, AutoCloseable, FileDescriptorAccess
Direct Known Subclasses:
RemoteFileDescriptor, RemoteFileInput, RemoteFileOutput

public abstract class RemoteFileDescriptorBase<T> extends Object implements Externalizable, Closeable, FileDescriptorAccess
A wrapper that allows a FileDescriptor be sent via RMI over AF_UNIX sockets.
Author:
Christian Kohlschütter
See Also:
  • Field Details

    • resource

      protected final transient AtomicReference<T> resource
      An optional, closeable resource that is related to this instance. If the reference is non-null, this will be closed upon close(). For unidirectional implementations, this could be the corresponding input/output stream. For bidirectional implementations (e.g., a Socket, Pipe, etc.), this should close both directions.
  • Constructor Details

    • RemoteFileDescriptorBase

      public RemoteFileDescriptorBase()
      Creates an uninitialized instance; used for externalization.
      See Also:
  • Method Details