org.outerj.xreporter.client
Class XReporterClientImpl

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.outerj.xreporter.client.XReporterClientImpl
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.thread.ThreadSafe, XReporterClient

public class XReporterClientImpl
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements XReporterClient, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.component.Component

XReporter client implementation that connects to XReporter over HTTP. The advantage of using this component instead of directly using the 'raw' HTTP interface is that it checks what XReporter's response is. This is done by pull-parsing the result until the root element is encounterd. It will also handle errors etc. The obtained information is then returned in an XReporterResponse object.

This is an Avalon component that could be run in Cocoon's Excalibur Component Manager. For an example of standalon use (withouth an Avalon component manager) see the source code of XReporterHttpTestCase.


Field Summary
protected  java.lang.String host
          XReporter host name, such as example.com
protected  java.lang.String noUser
          user to connect with if there is none specified
protected  int port
          Port on which XReporter is listening
 
Fields inherited from interface org.outerj.xreporter.client.XReporterClient
ROLE
 
Constructor Summary
XReporterClientImpl()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 XReporterResponse processRequest(XReporterRequest request)
           
 
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
 

Field Detail

host

protected java.lang.String host
XReporter host name, such as example.com


port

protected int port
Port on which XReporter is listening


noUser

protected java.lang.String noUser
user to connect with if there is none specified

Constructor Detail

XReporterClientImpl

public XReporterClientImpl()
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

processRequest

public XReporterResponse processRequest(XReporterRequest request)
Specified by:
processRequest in interface XReporterClient