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:
- org.apache.avalon.framework.logger.LogEnabled, org.apache.excalibur.instrument.Instrumentable, HTTPURLHandler
- Direct Known Subclasses:
- AbstractHTTPURLPrintWriterHandler, FavIconHandler, SampleChartHandler
public abstract class AbstractHTTPURLHandler
- extends org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable
- implements HTTPURLHandler
- Since:
- 4.1
- Version:
- CVS $Revision: 1.5 $ $Date: 2004/02/29 18:11:04 $
- Author:
- Avalon Development Team
Fields inherited from interface org.apache.excalibur.instrument.Instrumentable |
EMPTY_INSTRUMENT_ARRAY, EMPTY_INSTRUMENTABLE_ARRAY |
Constructor Summary |
AbstractHTTPURLHandler(java.lang.String path,
java.lang.String contentType,
java.lang.String encoding)
Creates a new AbstractHTTPURLHandler. |
Method Summary |
abstract void |
doGet(java.lang.String path,
java.util.Map parameters,
java.io.OutputStream os)
Handles the specified request. |
boolean |
getBooleanParameter(java.util.Map params,
java.lang.String name)
|
boolean |
getBooleanParameter(java.util.Map params,
java.lang.String name,
boolean defaultValue)
|
java.lang.String |
getContentType()
Returns the content type. |
java.lang.String |
getEncoding()
Return the encoding to use. |
int |
getIntegerParameter(java.util.Map params,
java.lang.String name)
|
int |
getIntegerParameter(java.util.Map params,
java.lang.String name,
int defaultValue)
|
int[] |
getIntegerParameters(java.util.Map params,
java.lang.String name,
int defaultValue)
|
long |
getLongParameter(java.util.Map params,
java.lang.String name)
|
long |
getLongParameter(java.util.Map params,
java.lang.String name,
long defaultValue)
|
long[] |
getLongParameters(java.util.Map params,
java.lang.String name,
long defaultValue)
|
java.lang.String |
getParameter(java.util.Map params,
java.lang.String name)
|
java.lang.String |
getParameter(java.util.Map params,
java.lang.String name,
java.lang.String defaultValue)
|
java.lang.String[] |
getParameters(java.util.Map params,
java.lang.String name)
|
java.lang.String |
getPath()
Returns the path handled by this handler. |
void |
handleRequest(java.lang.String path,
java.util.Map parameters,
java.io.OutputStream os)
Handles the specified request. |
Methods inherited from class org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable |
addChildInstrumentable, addInstrument, getChildInstrumentables, getInstrumentableName, getInstruments, setInstrumentableName |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractHTTPURLHandler
public AbstractHTTPURLHandler(java.lang.String path,
java.lang.String contentType,
java.lang.String encoding)
- Creates a new AbstractHTTPURLHandler.
- Parameters:
path
- The path handled by this handler.contentType
- The content type.
getPath
public java.lang.String getPath()
- Returns the path handled by this handler.
- Specified by:
getPath
in interface HTTPURLHandler
- Returns:
- The path handled by this handler.
getContentType
public java.lang.String getContentType()
- Returns the content type.
- Specified by:
getContentType
in interface HTTPURLHandler
- Returns:
- The content type.
getEncoding
public java.lang.String getEncoding()
- Return the encoding to use.
- Specified by:
getEncoding
in interface HTTPURLHandler
- Returns:
- the encoding.
handleRequest
public final void handleRequest(java.lang.String path,
java.util.Map parameters,
java.io.OutputStream os)
throws java.io.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:
java.io.IOException
doGet
public abstract void doGet(java.lang.String path,
java.util.Map parameters,
java.io.OutputStream os)
throws java.io.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:
java.io.IOException
getParameter
public java.lang.String getParameter(java.util.Map params,
java.lang.String name,
java.lang.String defaultValue)
getParameter
public java.lang.String getParameter(java.util.Map params,
java.lang.String name)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
getBooleanParameter
public boolean getBooleanParameter(java.util.Map params,
java.lang.String name)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
getBooleanParameter
public boolean getBooleanParameter(java.util.Map params,
java.lang.String name,
boolean defaultValue)
getIntegerParameter
public int getIntegerParameter(java.util.Map params,
java.lang.String name)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
getIntegerParameter
public int getIntegerParameter(java.util.Map params,
java.lang.String name,
int defaultValue)
getLongParameter
public long getLongParameter(java.util.Map params,
java.lang.String name)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
getLongParameter
public long getLongParameter(java.util.Map params,
java.lang.String name,
long defaultValue)
getParameters
public java.lang.String[] getParameters(java.util.Map params,
java.lang.String name)
getIntegerParameters
public int[] getIntegerParameters(java.util.Map params,
java.lang.String name,
int defaultValue)
getLongParameters
public long[] getLongParameters(java.util.Map params,
java.lang.String name,
long defaultValue)
Copyright © 1997-2009 Apache Software Foundation. All Rights Reserved.