|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.teleal.cling.model.resource.Resource<M>
M
- The type of the model object.public class Resource<M>
An addressable object, stored, managed, and accessible through the Registry
.
Constructor Summary | |
---|---|
Resource(URI pathQuery,
M model)
|
Method Summary | |
---|---|
boolean |
equals(Object o)
|
M |
getModel()
|
URI |
getPathQuery()
|
int |
hashCode()
|
void |
maintain(List<Runnable> pendingExecutions,
ExpirationDetails expirationDetails)
Called periodically by the registry to maintain the resource. |
boolean |
matches(URI pathQuery)
|
void |
shutdown()
Called by the registry when it stops, in the shutdown thread. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Resource(URI pathQuery, M model)
pathQuery
- The path and (optional) query URI parts of this resource.model
- The model object.Method Detail |
---|
public URI getPathQuery()
public M getModel()
public boolean matches(URI pathQuery)
pathQuery
- A relative URI.
true
if the given URI path and query matches the resource's path and query.public void maintain(List<Runnable> pendingExecutions, ExpirationDetails expirationDetails)
NOOP by default.
pendingExecutions
- Add Runnable
's to this collection if maintenance code has to run in the background.expirationDetails
- The details of this resource's expiration, e.g. when it will expire.public void shutdown()
NOOP by default.
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |