Class JmsAuditEventHandler

java.lang.Object
org.forgerock.audit.events.handlers.AuditEventHandlerBase
org.forgerock.audit.handlers.jms.JmsAuditEventHandler
All Implemented Interfaces:
AuditEventHandler

Publishes Audit events on a JMS Topic.
  • Constructor Details

  • Method Details

    • startup

      public void startup() throws ResourceException
      Creates the JMS Topic and ConnectionFactory from the context configuration settings and opens the JMS connection.
      Throws:
      ResourceException
    • shutdown

      public void shutdown() throws ResourceException
      Closes the JMS connection.
      Throws:
      ResourceException
    • publishEvent

      public org.forgerock.util.promise.Promise<ResourceResponse,ResourceException> publishEvent(org.forgerock.services.context.Context context, String auditTopic, org.forgerock.json.JsonValue auditEvent)
      Converts the audit event into a JMS TextMessage and then publishes the message on the configured jmsTopic.
      Parameters:
      context - The context chain that initiated the event.
      auditTopic - The Audit Topic for which the auditEvent was created for. (Not to be confused with a JMS Topic)
      auditEvent - The event to convert to a JMS TextMessage and publish on the JMS Topic.
      Returns:
      a promise with either a response or an exception
    • queryEvents

      public org.forgerock.util.promise.Promise<QueryResponse,ResourceException> queryEvents(org.forgerock.services.context.Context context, String topic, QueryRequest queryRequest, QueryResourceHandler queryResourceHandler)
      Returns NotSupportedException as query is not implemented for JMS.
      Returns:
      NotSupportedException as query is not implemented for JMS.
    • readEvent

      public org.forgerock.util.promise.Promise<ResourceResponse,ResourceException> readEvent(org.forgerock.services.context.Context context, String topic, String resourceId)
      Returns NotSupportedException as read is not implemented for JMS.
      Returns:
      NotSupportedException as read is not implemented for JMS.