|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.engine.Helper
org.restlet.engine.RestletHelper<T>
org.restlet.engine.ConnectorHelper<Client>
org.restlet.engine.ClientHelper
org.restlet.engine.local.LocalClientHelper
org.restlet.engine.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(String scheme,
String encodedParentDirPath,
String encodedEntityName,
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(String path)
Returns a local entity for the given path. |
protected String |
getReencodedVariantEntityName(String encodedEntityName,
String decodedVariantEntityName)
Percent-encodes the given percent-decoded variant name of a resource whose percent-encoded name is given. |
protected void |
handleEntityGet(Request request,
Response response,
Entity entity)
Handles a GET call. |
protected void |
handleLocal(Request request,
Response response,
String decodedPath)
Handles a local call. |
Methods inherited from class org.restlet.engine.local.LocalClientHelper |
---|
getDefaultLanguage, getTimeToLive, handle |
Methods inherited from class org.restlet.engine.ClientHelper |
---|
getSocketConnectTimeoutMs |
Methods inherited from class org.restlet.engine.ConnectorHelper |
---|
getConnectorService, getContext, getProtocols, start, stop, update |
Methods inherited from class org.restlet.engine.RestletHelper |
---|
getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, 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(String scheme, String encodedParentDirPath, String encodedEntityName, String decodedVariantName)
scheme
- The scheme of the requested resource.encodedParentDirPath
- The encoded path of the parent directory of the requested
resource.encodedEntityName
- The encoded name of the requested resource.decodedVariantName
- The decoded name of a returned resource.
public abstract Entity getEntity(String path)
path
- The path of the entity.
protected String getReencodedVariantEntityName(String encodedEntityName, String decodedVariantEntityName)
encodedEntityName
- the percent-encoded name of the initial resourcedecodedVariantEntityName
- the percent-decoded entity name of a variant of the initial
resource.
protected void handleEntityGet(Request request, Response response, Entity entity)
request
- The request to answer.response
- The response to update.entity
- The requested entity (normal or directory).protected void handleLocal(Request request, Response response, String decodedPath)
LocalClientHelper
handleLocal
in class LocalClientHelper
request
- The request to handle.response
- The response to update.decodedPath
- The decoded local path.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |