|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.util.Helper<T>
com.noelios.restlet.ConnectorHelper<Client>
com.noelios.restlet.ClientHelper
com.noelios.restlet.local.LocalClientHelper
com.noelios.restlet.local.EntityClientHelper
public abstract class EntityClientHelper
Connector to the local entities. That connector supports the content negotiation feature (i.e. for GET and HEAD methods) and implements the response to GET/HEAD methods.
Constructor Summary | |
---|---|
EntityClientHelper(Client client)
Constructor. |
Method Summary | |
---|---|
Reference |
createReference(java.lang.String scheme,
java.lang.String encodedParentDirPath,
java.lang.String encodedEntityName,
java.lang.String decodedVariantName)
Generate a Reference for a variant name (which is URL decoded) and handle the translation between the incoming requested path (which is URL encoded). |
abstract Entity |
getEntity(java.lang.String path)
Returns a local entity for the given path. |
protected java.lang.String |
getReencodedVariantEntityName(java.lang.String encodedEntityName,
java.lang.String decodedVariantEntityName)
Percent-encodes the given percent-decoded variant name of a resource whose percent-encoded name is given. |
void |
handle(Request request,
Response response)
Handles a call. |
protected void |
handleEntity(Request request,
Response response,
java.lang.String path,
java.lang.String decodedPath,
MetadataService metadataService)
Handles a call for a local entity. |
protected void |
handleEntityGet(Request request,
Response response,
java.lang.String path,
Entity entity,
MetadataService metadataService)
Handles a GET call. |
Methods inherited from class com.noelios.restlet.local.LocalClientHelper |
---|
getDefaultLanguage, getMetadataService, getTimeToLive, updateMetadata |
Methods inherited from class com.noelios.restlet.ClientHelper |
---|
getConnectTimeout |
Methods inherited from class com.noelios.restlet.ConnectorHelper |
---|
getProtocols, start, stop, update |
Methods inherited from class org.restlet.util.Helper |
---|
getAttributes, getContext, getHelped, getHelpedParameters, getLogger, setHelped |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EntityClientHelper(Client client)
client
- The client to help.Method Detail |
---|
public Reference createReference(java.lang.String scheme, java.lang.String encodedParentDirPath, java.lang.String encodedEntityName, java.lang.String decodedVariantName)
scheme
- The scheme of the requested resource.encodedParentDirPath
- The encoded path of the parent dir of the requested resource.encodedEntityName
- The encoded name of the requested resource.decodedVariantName
- The decoded name of a returned resource.
public abstract Entity getEntity(java.lang.String path)
path
- The path of the entity.
protected java.lang.String getReencodedVariantEntityName(java.lang.String encodedEntityName, java.lang.String decodedVariantEntityName)
encodedEntityName
- the percent-encoded name of the initial resourcedecodedVariantEntityName
- the percent-decoded entity name of a variant of the initial
resource.
public void handle(Request request, Response response)
handle
in class Helper<Client>
request
- The request to handle.response
- The response to update.protected void handleEntity(Request request, Response response, java.lang.String path, java.lang.String decodedPath, MetadataService metadataService)
request
- The request to handle.response
- The response to update.path
- The entity path.decodedPath
- The URL decoded entity path.metadataService
- The metadataService.protected void handleEntityGet(Request request, Response response, java.lang.String path, Entity entity, MetadataService metadataService)
request
- The request to answer.response
- The response to update.path
- The encoded path of the requested entity.entity
- The requested entity (normal or directory).metadataService
- The metadata service.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |