Package com.ibm.fhir.notification
Class FHIRNotificationService
- java.lang.Object
-
- com.ibm.fhir.notification.FHIRNotificationService
-
- All Implemented Interfaces:
FHIRPersistenceInterceptor
public class FHIRNotificationService extends Object implements FHIRPersistenceInterceptor
This class coordinates the activities of the FHIR Server notification service.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterCreate(FHIRPersistenceEvent pEvent)
This method is called during the processing of a 'create' REST API invocation, immediately after the new resource has been stored by the persistence layer.void
afterUpdate(FHIRPersistenceEvent pEvent)
This method is called during the processing of an 'update' REST API invocation, immediately after the updated resource has been stored by the persistence layer.void
beforeCreate(FHIRPersistenceEvent pEvent)
This method is called during the processing of a 'create' REST API invocation, immediately before the new resource is stored by the persistence layer.void
beforeUpdate(FHIRPersistenceEvent event)
This method is called during the processing of an 'update' REST API invocation, immediately before the updated resource is stored by the persistence layer.static FHIRNotificationService
getInstance()
boolean
isSubscribed(FHIRNotificationSubscriber subscriber)
Check if this subscriber has subscribed to this servicevoid
publish(FHIRNotificationEvent event)
Method for broadcasting message to each subscriber.void
subscribe(FHIRNotificationSubscriber subscriber)
Method to subscribe the target notification implementationvoid
unsubscribe(FHIRNotificationSubscriber subscriber)
Method to unsubscribe the target notification implementation-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.fhir.persistence.interceptor.FHIRPersistenceInterceptor
afterDelete, afterHistory, afterPatch, afterRead, afterSearch, afterVread, beforeDelete, beforeHistory, beforePatch, beforeRead, beforeSearch, beforeVread
-
-
-
-
Method Detail
-
getInstance
public static FHIRNotificationService getInstance()
-
publish
public void publish(FHIRNotificationEvent event)
Method for broadcasting message to each subscriber.- Parameters:
event
-
-
subscribe
public void subscribe(FHIRNotificationSubscriber subscriber)
Method to subscribe the target notification implementation- Parameters:
subscriber
-
-
unsubscribe
public void unsubscribe(FHIRNotificationSubscriber subscriber)
Method to unsubscribe the target notification implementation- Parameters:
subscriber
-
-
isSubscribed
public boolean isSubscribed(FHIRNotificationSubscriber subscriber)
Check if this subscriber has subscribed to this service- Parameters:
subscriber
-- Returns:
-
afterCreate
public void afterCreate(FHIRPersistenceEvent pEvent) throws FHIRPersistenceInterceptorException
Description copied from interface:FHIRPersistenceInterceptor
This method is called during the processing of a 'create' REST API invocation, immediately after the new resource has been stored by the persistence layer.- Specified by:
afterCreate
in interfaceFHIRPersistenceInterceptor
- Parameters:
pEvent
- information about the 'create' event- Throws:
FHIRPersistenceInterceptorException
-
afterUpdate
public void afterUpdate(FHIRPersistenceEvent pEvent) throws FHIRPersistenceInterceptorException
Description copied from interface:FHIRPersistenceInterceptor
This method is called during the processing of an 'update' REST API invocation, immediately after the updated resource has been stored by the persistence layer.- Specified by:
afterUpdate
in interfaceFHIRPersistenceInterceptor
- Parameters:
pEvent
- information about the 'update' event- Throws:
FHIRPersistenceInterceptorException
-
beforeCreate
public void beforeCreate(FHIRPersistenceEvent pEvent) throws FHIRPersistenceInterceptorException
Description copied from interface:FHIRPersistenceInterceptor
This method is called during the processing of a 'create' REST API invocation, immediately before the new resource is stored by the persistence layer.- Specified by:
beforeCreate
in interfaceFHIRPersistenceInterceptor
- Parameters:
pEvent
- information about the 'create' event- Throws:
FHIRPersistenceInterceptorException
-
beforeUpdate
public void beforeUpdate(FHIRPersistenceEvent event) throws FHIRPersistenceInterceptorException
Description copied from interface:FHIRPersistenceInterceptor
This method is called during the processing of an 'update' REST API invocation, immediately before the updated resource is stored by the persistence layer.- Specified by:
beforeUpdate
in interfaceFHIRPersistenceInterceptor
- Parameters:
event
- information about the 'update' event- Throws:
FHIRPersistenceInterceptorException
-
-