M
- The type of the model object.public class Resource<M> extends Object
Registry
.Modifier and Type | Method and Description |
---|---|
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() |
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.
Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.