com.noelios.restlet.local
Class WarClientHelper

java.lang.Object
  extended by org.restlet.util.Helper
      extended by com.noelios.restlet.ConnectorHelper
          extended by com.noelios.restlet.ClientHelper
              extended by com.noelios.restlet.local.LocalClientHelper
                  extended by com.noelios.restlet.local.FileClientHelper
                      extended by com.noelios.restlet.local.WarClientHelper

public class WarClientHelper
extends FileClientHelper

Connector to the WAR resources. Here is the list of parameters that are supported:

warPath String ${user.home}/restlet.war Path to the Web Application WAR file or directory.

Author:
Jerome Louvel (contact@noelios.com)

Constructor Summary
WarClientHelper(Client client)
          Constructor.
 
Method Summary
 String getWarPath()
          Returns the Web Application archive file or directory path.
 void handle(Request request, Response response)
          Handles a call.
protected  void handleWar(Request request, Response response)
          Handles a call using the current Web Application.
 boolean isRestrict()
          Indicates if the access to the META-INF and WEB-INF directories is restricted.
 void setRestrict(boolean restrict)
          Indicates if the access to the META-INF and WEB-INF directories is restricted.
 
Methods inherited from class com.noelios.restlet.local.FileClientHelper
handleFile
 
Methods inherited from class com.noelios.restlet.local.LocalClientHelper
getMetadataService, getTimeToLive, updateMetadata
 
Methods inherited from class com.noelios.restlet.ClientHelper
getClient, getContext, getLogger, getParameters
 
Methods inherited from class com.noelios.restlet.ConnectorHelper
createContext, getProtocols, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WarClientHelper

public WarClientHelper(Client client)
Constructor. Note that the common list of metadata associations based on extensions is added, see the addCommonExtensions() method.

Parameters:
client - The client to help.
Method Detail

handle

public void handle(Request request,
                   Response response)
Handles a call.

Overrides:
handle in class FileClientHelper
Parameters:
request - The request to handle.
response - The response to update.

handleWar

protected void handleWar(Request request,
                         Response response)
Handles a call using the current Web Application.

Parameters:
request - The request to handle.
response - The response to update.

getWarPath

public String getWarPath()
Returns the Web Application archive file or directory path.

Returns:
The Web Application archive file or directory path.

isRestrict

public boolean isRestrict()
Indicates if the access to the META-INF and WEB-INF directories is restricted. False by default.

Returns:
True if the access is restricted.

setRestrict

public void setRestrict(boolean restrict)
Indicates if the access to the META-INF and WEB-INF directories is restricted.

Parameters:
restrict - True if the access is restricted.


Copyright © 2005-2007 Noelios Consulting.