org.apache.excalibur.instrument.manager.http.server
Class AbstractHTTPURLHandler
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable
org.apache.excalibur.instrument.manager.http.server.AbstractHTTPURLHandler
- All Implemented Interfaces:
- LogEnabled, Instrumentable, HTTPURLHandler
- Direct Known Subclasses:
- AbstractHTTPURLPrintWriterHandler, FavIconHandler, SampleChartHandler
public abstract class AbstractHTTPURLHandler
- extends AbstractLogEnabledInstrumentable
- implements HTTPURLHandler
- Since:
- 4.1
- Version:
- CVS $Revision: 1.5 $ $Date: 2004/02/29 18:11:04 $
- Author:
- Avalon Development Team
Method Summary |
abstract void |
doGet(String path,
Map parameters,
OutputStream os)
Handles the specified request. |
boolean |
getBooleanParameter(Map params,
String name)
|
boolean |
getBooleanParameter(Map params,
String name,
boolean defaultValue)
|
String |
getContentType()
Returns the content type. |
String |
getEncoding()
Return the encoding to use. |
int |
getIntegerParameter(Map params,
String name)
|
int |
getIntegerParameter(Map params,
String name,
int defaultValue)
|
int[] |
getIntegerParameters(Map params,
String name,
int defaultValue)
|
long |
getLongParameter(Map params,
String name)
|
long |
getLongParameter(Map params,
String name,
long defaultValue)
|
long[] |
getLongParameters(Map params,
String name,
long defaultValue)
|
String |
getParameter(Map params,
String name)
|
String |
getParameter(Map params,
String name,
String defaultValue)
|
String[] |
getParameters(Map params,
String name)
|
String |
getPath()
Returns the path handled by this handler. |
void |
handleRequest(String path,
Map parameters,
OutputStream os)
Handles the specified request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractHTTPURLHandler
public AbstractHTTPURLHandler(String path,
String contentType,
String encoding)
- Creates a new AbstractHTTPURLHandler.
- Parameters:
path
- The path handled by this handler.contentType
- The content type.
getPath
public String getPath()
- Returns the path handled by this handler.
- Specified by:
getPath
in interface HTTPURLHandler
- Returns:
- The path handled by this handler.
getContentType
public String getContentType()
- Returns the content type.
- Specified by:
getContentType
in interface HTTPURLHandler
- Returns:
- The content type.
getEncoding
public String getEncoding()
- Return the encoding to use.
- Specified by:
getEncoding
in interface HTTPURLHandler
- Returns:
- the encoding.
handleRequest
public final void handleRequest(String path,
Map parameters,
OutputStream os)
throws IOException
- Handles the specified request.
- Specified by:
handleRequest
in interface HTTPURLHandler
- Parameters:
The
- full path being handled.parameters
- A Map of the parameters in the request.os
- The OutputStream to write the result to.
- Throws:
IOException
doGet
public abstract void doGet(String path,
Map parameters,
OutputStream os)
throws IOException
- Handles the specified request.
- Parameters:
The
- full path being handled.parameters
- A Map of the parameters in the request.os
- The OutputStream to write the result to.
- Throws:
IOException
getParameter
public String getParameter(Map params,
String name,
String defaultValue)
getParameter
public String getParameter(Map params,
String name)
throws FileNotFoundException
- Throws:
FileNotFoundException
getBooleanParameter
public boolean getBooleanParameter(Map params,
String name)
throws FileNotFoundException
- Throws:
FileNotFoundException
getBooleanParameter
public boolean getBooleanParameter(Map params,
String name,
boolean defaultValue)
getIntegerParameter
public int getIntegerParameter(Map params,
String name)
throws FileNotFoundException
- Throws:
FileNotFoundException
getIntegerParameter
public int getIntegerParameter(Map params,
String name,
int defaultValue)
getLongParameter
public long getLongParameter(Map params,
String name)
throws FileNotFoundException
- Throws:
FileNotFoundException
getLongParameter
public long getLongParameter(Map params,
String name,
long defaultValue)
getParameters
public String[] getParameters(Map params,
String name)
getIntegerParameters
public int[] getIntegerParameters(Map params,
String name,
int defaultValue)
getLongParameters
public long[] getLongParameters(Map params,
String name,
long defaultValue)
Copyright © 1997-2012 The Apache Software Foundation. All Rights Reserved.