JBoss Remoting 3.0.0.GA

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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.remoting.HandleableCloseable
HandleableCloseable.Key
 
Method Summary
 Handle<T> getHandle()
          Get a handle to this resource.
 
Methods inherited from interface org.jboss.remoting.HandleableCloseable
addCloseHandler, close
 

Method Detail

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

JBoss Remoting 3.0.0.GA

Copyright © 2008 JBoss, a division of Red Hat, Inc.