toolbox.oracle.fault.management.services
Class FaultDistributionServiceHTTPImpl

java.lang.Object
  extended by toolbox.services.BaseService
      extended by toolbox.oracle.fault.management.services.FaultDistributionServiceHTTPImpl
All Implemented Interfaces:
FaultDistributionService, toolbox.services.Service

public class FaultDistributionServiceHTTPImpl
extends toolbox.services.BaseService
implements FaultDistributionService

FaultDistributionService implementation that posts (HTTP POST) fault information to the configured HTTP end point.

Author:
Hannes Holtzhausen

Constructor Summary
FaultDistributionServiceHTTPImpl()
          Default constructor.
 
Method Summary
 void create(java.lang.String name, java.lang.String confHome, toolbox.services.ServiceEnvironment env, toolbox.allegato.XMLProperties xmlProps)
          Create the required HTTP client infrastructure components required to submit fault information.
 void destroy()
          Destroy this service by shutting down the HTTP connection manager.
 void distribute(java.util.Map data)
          Distribute method to post formatted fault data to a configured HTTP end point.
 void setTemplateService(toolbox.services.util.TemplateService tmplService)
          Injection point for the TemplateService dependency.
 
Methods inherited from class toolbox.services.BaseService
getConfigHome, getName, getProperties, getProperty, getXMLProperties, logConfig, logFine, logFiner, logFinest, logInfo, logSevere, logWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FaultDistributionServiceHTTPImpl

public FaultDistributionServiceHTTPImpl()
Default constructor.

Method Detail

create

public void create(java.lang.String name,
                   java.lang.String confHome,
                   toolbox.services.ServiceEnvironment env,
                   toolbox.allegato.XMLProperties xmlProps)
            throws toolbox.services.ServiceException
Create the required HTTP client infrastructure components required to submit fault information.

Specified by:
create in interface toolbox.services.Service
Overrides:
create in class toolbox.services.BaseService
Parameters:
name - The name of the service.
confHome - The path to the configuration home directory.
env - ServiceEnvironment of this service.
xmlProps - XML configuration properties.
Throws:
toolbox.services.ServiceException - if the service cannot be created.

distribute

public void distribute(java.util.Map data)
Distribute method to post formatted fault data to a configured HTTP end point.

Specified by:
distribute in interface FaultDistributionService
Parameters:
data - Map containing the fault information.

setTemplateService

public void setTemplateService(toolbox.services.util.TemplateService tmplService)
Injection point for the TemplateService dependency.

Parameters:
tmplService - TemplateService instance used to format fault information.

destroy

public void destroy()
Destroy this service by shutting down the HTTP connection manager.

Specified by:
destroy in interface toolbox.services.Service
Overrides:
destroy in class toolbox.services.BaseService