com.alarmpoint.integrations.infrastructure.agent.service
Class IntegrationAgentService

java.lang.Object
  extended by com.alarmpoint.integrations.infrastructure.agent.service.IntegrationAgentService

public class IntegrationAgentService
extends java.lang.Object

Class to handle communication with the Integration Agent

Author:
Mike Bennett

Field Summary
static java.lang.String INTEGRATION_AGENT_SERVICE
           
 
Constructor Summary
IntegrationAgentService()
          Creates a new instance of SubscriptionIntegrationService
 
Method Summary
 void addToken(java.lang.String key, java.lang.String value)
           
 java.lang.String getActionName()
           
 java.lang.String getCompanyName()
           
 java.lang.String getDomainName()
           
 com.invoqsystems.apex.services.IntegrationManagementService getIntegrationManagementService()
           
 java.lang.String getServiceName()
           
 long getTimeout()
           
 java.util.Map<java.lang.String,java.lang.Object> getTokens()
           
 IntegrationServiceResponse send()
          Sends the request to the integration agent and returns the response
 void setActionName(java.lang.String actionName)
           
 void setCompanyName(java.lang.String companyName)
           
 void setDomainName(java.lang.String domainName)
           
 void setIntegrationManagementService(com.invoqsystems.apex.services.IntegrationManagementService integrationManagementService)
          Inject the IntegrationManagementService into this instance
 void setServiceName(java.lang.String serviceName)
           
 void setTimeout(long timeout)
           
 void setTokens(java.util.Map<java.lang.String,java.lang.Object> tokens)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTEGRATION_AGENT_SERVICE

public static final java.lang.String INTEGRATION_AGENT_SERVICE
See Also:
Constant Field Values
Constructor Detail

IntegrationAgentService

public IntegrationAgentService()
Creates a new instance of SubscriptionIntegrationService

Method Detail

send

public IntegrationServiceResponse send()
                                throws com.invoqsystems.apex.exceptions.AlarmPointDatabaseException,
                                       com.invoqsystems.apex.exceptions.AlarmPointException
Sends the request to the integration agent and returns the response

Returns:
response from the call
Throws:
com.invoqsystems.apex.exceptions.AlarmPointDatabaseException - if the integration service cannot be retrieved
com.invoqsystems.apex.exceptions.AlarmPointException - if the payload cannot be created

setIntegrationManagementService

public void setIntegrationManagementService(com.invoqsystems.apex.services.IntegrationManagementService integrationManagementService)
Inject the IntegrationManagementService into this instance

Parameters:
integrationManagementService - instance of the IntegrationManagementService

getIntegrationManagementService

public com.invoqsystems.apex.services.IntegrationManagementService getIntegrationManagementService()

setActionName

public void setActionName(java.lang.String actionName)

getActionName

public java.lang.String getActionName()

setCompanyName

public void setCompanyName(java.lang.String companyName)

getCompanyName

public java.lang.String getCompanyName()

setServiceName

public void setServiceName(java.lang.String serviceName)

getServiceName

public java.lang.String getServiceName()

setDomainName

public void setDomainName(java.lang.String domainName)

getDomainName

public java.lang.String getDomainName()

setTokens

public void setTokens(java.util.Map<java.lang.String,java.lang.Object> tokens)

getTokens

public java.util.Map<java.lang.String,java.lang.Object> getTokens()

addToken

public void addToken(java.lang.String key,
                     java.lang.String value)

setTimeout

public void setTimeout(long timeout)

getTimeout

public long getTimeout()