org.jboss.remoting.spi
Interface AutoCloseable<T>
- All Superinterfaces:
- Closeable, HandleableCloseable<T>
- All Known Subinterfaces:
- RequestHandler, RequestHandlerSource
- All Known Implementing Classes:
- AbstractAutoCloseable
public interface AutoCloseable<T>
- extends HandleableCloseable<T>
A closeable resource which closes automatically when the number of active handles reaches zero. Handles are considered
active until they are closed.
getHandle
Handle<T> getHandle()
throws IOException
- Get a handle to this resource. When the number of open handles reaches zero, the resource will be closed.
- Returns:
- a handle
- Throws:
IOException
- if an error occurs, particularly if this resource is already closed
Copyright © 2008 JBoss, a division of Red Hat, Inc.