org.ikasan.framework.event.wiretap.service
Class WiretapServiceImpl

java.lang.Object
  extended by org.ikasan.framework.event.wiretap.service.WiretapServiceImpl
All Implemented Interfaces:
WiretapService

public class WiretapServiceImpl
extends Object
implements WiretapService

Default implementation of the WiretapService

Author:
Ikasan Development Team

Constructor Summary
WiretapServiceImpl(WiretapDao wiretapDao, ModuleService moduleService)
          Constructor
 
Method Summary
 PagedSearchResult<WiretapEvent> findWiretapEvents(int pageNo, int pageSize, String orderBy, boolean orderAscending, Set<String> moduleNames, String moduleFlow, String componentName, String eventId, String payloadId, Date fromDate, Date untilDate, String payloadContent)
          Allows previously stored Events to be searched for.
 PagedWiretapSearchResult findWiretapEvents(Set<String> moduleNames, String moduleFlow, String componentName, String eventId, String payloadId, Date fromDate, Date untilDate, String payloadContent, int pageSize, int pageNo)
          Deprecated. Use other findWiretapEvents method
 WiretapEvent getWiretapEvent(Long wiretapEventId)
          Get a wireTap event given its Id
 void housekeep()
          Housekeep the wiretaps by deleting expired ones.
 void tapEvent(Event event, String componentName, String moduleName, String flowName, Long timeToLive)
          Wiretap an Event
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WiretapServiceImpl

public WiretapServiceImpl(WiretapDao wiretapDao,
                          ModuleService moduleService)
Constructor

Parameters:
wiretapDao - - The wire tap DAO
moduleService - - The module service to use
Method Detail

findWiretapEvents

public PagedSearchResult<WiretapEvent> findWiretapEvents(int pageNo,
                                                         int pageSize,
                                                         String orderBy,
                                                         boolean orderAscending,
                                                         Set<String> moduleNames,
                                                         String moduleFlow,
                                                         String componentName,
                                                         String eventId,
                                                         String payloadId,
                                                         Date fromDate,
                                                         Date untilDate,
                                                         String payloadContent)
Allows previously stored Events to be searched for.

Specified by:
findWiretapEvents in interface WiretapService
Parameters:
pageNo - - page index into the greater result set
pageSize - - how many results to return in the result
orderBy - - The field to order by
orderAscending - - Ascending flag
moduleNames - - Set of names of modules to include in search - must contain at least one moduleName
moduleFlow - - The name of Flow internal to the Module
componentName - - The name of the component
eventId - - The Event Id
payloadId - - The Payload Id
fromDate - - Include only events after fromDate
untilDate - - Include only events before untilDate
payloadContent - - The Payload content
Returns:
List of WiretapEventHeader representing the result of the search
Throws:
IllegalArgumentException - - if moduleNames is null or empty

findWiretapEvents

public PagedWiretapSearchResult findWiretapEvents(Set<String> moduleNames,
                                                  String moduleFlow,
                                                  String componentName,
                                                  String eventId,
                                                  String payloadId,
                                                  Date fromDate,
                                                  Date untilDate,
                                                  String payloadContent,
                                                  int pageSize,
                                                  int pageNo)
Deprecated. Use other findWiretapEvents method

Allows previously stored Events to be searched for.

Specified by:
findWiretapEvents in interface WiretapService
Parameters:
pageNo - - page index into the greater result set
pageSize - - how many results to return in the result
moduleNames - - Set of names of modules to include in search - must contain at least one moduleName
moduleFlow - - The name of Flow internal to the Module
componentName - - The name of the component
eventId - - The Event Id
payloadId - - The Payload Id
fromDate - - Include only events after fromDate
untilDate - - Include only events before untilDate
payloadContent - - The Payload content
Returns:
List of WiretapEventHeader representing the result of the search
Throws:
IllegalArgumentException - - if moduleNames is null or empty

getWiretapEvent

public WiretapEvent getWiretapEvent(Long wiretapEventId)
Get a wireTap event given its Id

Specified by:
getWiretapEvent in interface WiretapService
Parameters:
wiretapEventId - - The Id to search with
Returns:
The WiretapEvent

tapEvent

public void tapEvent(Event event,
                     String componentName,
                     String moduleName,
                     String flowName,
                     Long timeToLive)
Wiretap an Event

Specified by:
tapEvent in interface WiretapService
Parameters:
event - - Event to be wiretapped
componentName - - The component this Event is currently in
moduleName - - The module this Event is currently in
flowName - - The Flow this Event is currently in
timeToLive - - Time to live for the wiretap

housekeep

public void housekeep()
Housekeep the wiretaps by deleting expired ones.

Specified by:
housekeep in interface WiretapService


Copyright © 2007-2012 Ikasan. All Rights Reserved.