edu.mit.jverbnet.util
Interface IHasLifecycle

All Known Subinterfaces:
IVerbIndex
All Known Implementing Classes:
AbstractHasLifecycle, VerbIndex

public interface IHasLifecycle

An object with a lifecycle.

Since:
JVerbnet 1.0.0
Version:
1.2.0
Author:
Mark A. Finlayson

Nested Class Summary
static class IHasLifecycle.ObjectClosedException
          Indicates that the object was not open when some method was called requiring it to be open.
 
Method Summary
 void close()
          This closes the object by disposing of data backing objects or connections.
 boolean isOpen()
          Returns true if the object is open, that is, ready to be used; returns false otherwise
 boolean open()
          This opens the object by performing any required initialization steps.
 

Method Detail

open

boolean open()
             throws java.io.IOException
This opens the object by performing any required initialization steps. If this method returns false, then subsequent calls to isOpen() will return false.

Returns:
true if there were no errors in initialization; false otherwise.
Throws:
java.io.IOException - if there was IO error while performing initialization
Since:
JVerbnet 1.0.0

isOpen

boolean isOpen()
Returns true if the object is open, that is, ready to be used; returns false otherwise

Returns:
true if the object is open; false otherwise
Since:
JVerbnet 1.0.0

close

void close()
This closes the object by disposing of data backing objects or connections. If the object is already closed, or in the process of closing, this method does nothing (although, if the object is in the process of closing, it may block until closing is complete).

Since:
JVerbnet 1.0.0


Copyright © 2012 ${project.organization.name}. All Rights Reserved.