public class DefaultClosureMonitor extends Object implements ClosureMonitor
Constructor and Description |
---|
DefaultClosureMonitor() |
Modifier and Type | Method and Description |
---|---|
void |
checkNotClosed()
Checks if state of this ClosureMonitor is set to closed and if so,
throws the causing Exception.
|
void |
close()
Sets monitor state to closed, and sets the cause to a
CursorClosedException without an error message string.
|
void |
close(Exception cause)
Sets monitor state to closed, and sets the cause to a specific
Exception.
|
void |
close(String cause)
Sets monitor state to closed, and sets the cause to a
CursorClosedException with a specific error message string.
|
Exception |
getCause()
Gets the cause of the closure.
|
boolean |
isClosed()
Gets whether the state of this ClosureMonitor is set to closed.
|
public DefaultClosureMonitor()
public final void close()
close
in interface ClosureMonitor
public final void close(String cause)
close
in interface ClosureMonitor
cause
- error message stringpublic final void close(Exception cause)
close
in interface ClosureMonitor
cause
- the exception to associate with the closurepublic final Exception getCause()
getCause
in interface ClosureMonitor
public final boolean isClosed()
isClosed
in interface ClosureMonitor
public void checkNotClosed() throws CursorClosedException
checkNotClosed
in interface ClosureMonitor
CursorClosedException
- the cause of the closureCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.