Class IncomingEvent
- java.lang.Object
-
- org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.IncomingEvent
-
public class IncomingEvent extends Object
An event that was received from a connector
-
-
Constructor Summary
Constructors Constructor Description IncomingEvent(String json, String messageId)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAsyncProcessingResult(OMRSFuture future)Adds aFuturefor the processing of this event by someOMRSInstanceEventProcessorlonggetCreationTime()Gets the time when thisIncomingEventinstance was created.StringgetJson()Gets the json for the eventStringgetMessageId()Gets the unique message id for this event.booleanhasTimeElapsedSinceCreation(long elapsedTimeMs)Checks whether the given amount of time has elapsed since the event was createdbooleanisFullyProcessed()Checks whether all processing for this event has completed.voidsetState(IncomingEventState state)Updates the state of the event
-
-
-
Method Detail
-
getJson
public String getJson()
Gets the json for the event- Returns:
- Json String
-
addAsyncProcessingResult
public void addAsyncProcessingResult(OMRSFuture future)
Adds aFuturefor the processing of this event by someOMRSInstanceEventProcessor- Parameters:
future- theFutureto add
-
setState
public void setState(IncomingEventState state)
Updates the state of the event- Parameters:
state- the new state
-
getCreationTime
public long getCreationTime()
Gets the time when thisIncomingEventinstance was created. This is different from the time when the message was generated.- Returns:
- time as a long
-
getMessageId
public String getMessageId()
Gets the unique message id for this event.- Returns:
- messageId
-
hasTimeElapsedSinceCreation
public boolean hasTimeElapsedSinceCreation(long elapsedTimeMs)
Checks whether the given amount of time has elapsed since the event was created- Parameters:
elapsedTimeMs- the elapsed time to check, in milliseconds- Returns:
- result
-
isFullyProcessed
public boolean isFullyProcessed()
Checks whether all processing for this event has completed.- Returns:
- whether all processing for this event has completed
-
-