public class ServletWarClientHelper extends EntityClientHelper
war:///path/to/my/resource/entry.txt
Response response = getContext().getClientDispatcher().get("war:///myDir/test.txt");
if (response.isEntityAvailable()) {
//Do what you want to do.
}
Constructor and Description |
---|
ServletWarClientHelper(Client client,
javax.servlet.ServletContext servletContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Entity |
getEntity(String decodedPath)
Returns a local entity for the given path.
|
javax.servlet.ServletContext |
getServletContext()
Returns the Servlet context.
|
void |
handleLocal(Request request,
Response response,
String decodedPath)
Handles a local call.
|
createReference, getReencodedVariantEntityName, handleEntityGet
getDefaultLanguage, getTimeToLive, handle
getSocketConnectTimeoutMs
getConnectorService, getContext, getProtocols, start, stop, update
getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped
public ServletWarClientHelper(Client client, javax.servlet.ServletContext servletContext)
client
- The client to help.servletContext
- The Servlet context.public Entity getEntity(String decodedPath)
EntityClientHelper
getEntity
in class EntityClientHelper
decodedPath
- The path of the entity.public javax.servlet.ServletContext getServletContext()
public void handleLocal(Request request, Response response, String decodedPath)
LocalClientHelper
handleLocal
in class EntityClientHelper
request
- The request to handle.response
- The response to update.decodedPath
- The decoded local path.Copyright © 2005–2015. All rights reserved.