|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.contrib.html.StandardDisposableResourceHolder
public class StandardDisposableResourceHolder
StandardDisposableResourceHolder is a standard implementation of the DisposableResourceHolder interface
Constructor Summary | |
---|---|
StandardDisposableResourceHolder()
Constructor for the StandardDisposableResourceHolder object |
|
StandardDisposableResourceHolder(java.lang.Object newResource)
Constructor for the StandardDisposableResourceHolder object |
Method Summary | |
---|---|
java.lang.Object |
clone()
Makes a clone of this |
void |
dispose()
Disposes of the resource |
long |
getDisposableDelay()
Gets the disposableDelay attribute of the StandardDisposableResourceHolder object |
long |
getLastTimeAccessed()
Gets the lastTimeAccessed attribute of the DisposableResourceHolder object |
java.lang.Object |
getResource()
Gets the resource attribute of the StandardDisposableResourceHolder object |
boolean |
isAvailable()
Gets the available attribute of the StandardDisposableResourceHolder object |
boolean |
isLocked()
True if the resource is locked |
void |
lock()
Locks the resource so it cannot be automatically disposed of until unlock is called. |
void |
resetDelay()
Resets the disposing delay so as to restart the time counter |
void |
setDisposableDelay(long millis)
Sets the disposableDelay attribute of the StandardDisposableResourceHolder object |
void |
setResource(java.lang.Object newResource)
Sets the resource attribute of the StandardDisposableResourceHolder object |
void |
unlock()
Unlocks the resource so it can be automatically disposed of again. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StandardDisposableResourceHolder()
public StandardDisposableResourceHolder(java.lang.Object newResource)
resource
- Description of the ParameterMethod Detail |
---|
public java.lang.Object clone()
clone
in interface DisposableResourceHolder
clone
in class java.lang.Object
public java.lang.Object getResource() throws java.lang.NullPointerException
getResource
in interface DisposableResourceHolder
java.lang.NullPointerException
- Description of the Exceptionpublic void setResource(java.lang.Object newResource)
setResource
in interface DisposableResourceHolder
resource
- The new resource valuepublic void setDisposableDelay(long millis)
setDisposableDelay
in interface DisposableResourceHolder
millis
- The new disposableDelay valuepublic long getDisposableDelay()
getDisposableDelay
in interface DisposableResourceHolder
public void dispose()
dispose
in interface DisposableResourceHolder
public boolean isAvailable()
isAvailable
in interface DisposableResourceHolder
public void lock()
lock
in interface DisposableResourceHolder
public void unlock()
unlock
in interface DisposableResourceHolder
public boolean isLocked()
isLocked
in interface DisposableResourceHolder
public long getLastTimeAccessed()
getLastTimeAccessed
in interface DisposableResourceHolder
public void resetDelay()
resetDelay
in interface DisposableResourceHolder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |