com.artima.place
Interface Dismissable


public interface Dismissable

Interface implemented by network-mobile objects that consume finite non-memory resources, such as sockets, database connections, threads, file handles, etc. This interface provides a "universal cleanup method" that allows clients, whose finite non-memory resources are being consumed, to ask the Dismissable object to release those resources prior to the client's releasing the Dismissable object to the whims of the garbage collector.


Method Summary
 void dismissObject()
          Releases any non-memory finite resources held by the object, such as file handles, sockets, database connections, graphics contexts, running threads, etc.
 

Method Detail

dismissObject

public void dismissObject()
Releases any non-memory finite resources held by the object, such as file handles, sockets, database connections, graphics contexts, running threads, etc. Once this method has been invoked, the object may be defunct. If defunct, the object will no longer be able to fulfill some or all of its contract.

Clients should only call this method right before releasing all remaining references to this object. If the resource have already been released, either through invocation of other cleanup methods or a prior invocation of dismissObject, this method has no effect.