com.ibm.ia.gateway
Interface SolutionGateway
-
- All Superinterfaces:
- SolutionDescriptor
public interface SolutionGateway extends SolutionDescriptor
SolutionGateway represents main API to create events and submit them for processing. SolutionGateway is solution scoped: an instance of the SolutionGateway operates within boundaries of one solution. GridConnection should be used to create and access solution specific instances of the gateway. SolutionGateway provides EventFactory which should be used to create events using event type, class or XML message.
-
-
Method Summary
Methods Modifier and Type Method and Description <T extends Entity>
Relationship<T>createRelationship(java.lang.Class<T> entity, java.lang.String key)
Convenience method to create Relationships<T extends Entity>
Relationship<T>createRelationship(T t)
Convenience method to create Relationships<T> T
getConceptFactory(java.lang.Class<T> conceptFactoryClass)
Provides access to the package specific ConceptFactory of the Java Model, which should be used to create Events and Concepts in that packageEventFactory
getEventFactory()
Provides access to the EventFactory, which should be used to create Events, Concepts and RelationshipsModelSerializer
getModelSerializer()
Provides access to the ModelSerializer, which should be used to serialize and parse Events and Entitiesjava.time.ZoneId
getSolutionZoneId()
Provides Time Zone id of the solution.void
setGridTimeouts(CISGridTimeouts timeouts)
set various timeouts for the client connection to the gridvoid
setMaxSubmitDelay(int delay)
overrides maximum delay that system can tolerate for event submission.RoutingStatus
submit(Event event)
Submits event to the runtime.RoutingStatus
submit(Event event, java.time.LocalDateTime defaultTime)
Submits event to the runtimeRoutingStatus
submit(Event event, java.lang.String defaultTime)
Submits event to the runtimeRoutingStatus
submit(Event event, java.time.ZonedDateTime defaultTime)
Submits event to the runtime-
Methods inherited from interface com.ibm.ia.common.SolutionDescriptor
getSolutionName, getSolutionVersion, getVersion
-
-
-
-
Method Detail
-
getEventFactory
EventFactory getEventFactory() throws SolutionChangedException
Provides access to the EventFactory, which should be used to create Events, Concepts and Relationships- Throws:
SolutionChangedException
- indicates that solution has been changed on the server- Returns:
- instance of EventFactory for this gateway
-
getConceptFactory
<T> T getConceptFactory(java.lang.Class<T> conceptFactoryClass) throws SolutionChangedException
Provides access to the package specific ConceptFactory of the Java Model, which should be used to create Events and Concepts in that package- Throws:
SolutionChangedException
- indicates that solution has been changed on the server- Parameters:
conceptFactoryClass
- ConceptFactory class for a specific Java Model package- Returns:
- instance of ConceptFactory for this gateway
-
getModelSerializer
ModelSerializer getModelSerializer() throws SolutionChangedException
Provides access to the ModelSerializer, which should be used to serialize and parse Events and Entities- Throws:
SolutionChangedException
- indicates that solution has been changed on the server- Returns:
- instance of ModelSerializer for this gateway
-
createRelationship
<T extends Entity> Relationship<T> createRelationship(T t) throws SolutionChangedException
Convenience method to create Relationships- Throws:
SolutionChangedException
- indicates that solution has been changed on the server- Parameters:
t
- Entity instance for this relationship- Returns:
- relationship to a given entity instance
-
createRelationship
<T extends Entity> Relationship<T> createRelationship(java.lang.Class<T> entity, java.lang.String key) throws SolutionChangedException
Convenience method to create Relationships- Throws:
SolutionChangedException
- indicates that solution has been changed on the server- Parameters:
entity
- entity class type for this relationshipkey
- entity id for this relationship- Returns:
- relationship to entity instance identified by type and key
-
submit
RoutingStatus submit(Event event) throws GatewayException, RoutingException
Submits event to the runtime. Default event time is assumed to be the current time.- Throws:
GatewayException
RoutingException
- Parameters:
event
- Generic event or event instance- Returns:
- submission Status
-
submit
RoutingStatus submit(Event event, java.time.ZonedDateTime defaultTime) throws GatewayException, RoutingException
Submits event to the runtime- Throws:
GatewayException
RoutingException
- Parameters:
event
- Generic event or event instancedefaultTime
- ZonedDateTime time (with or without Time Zone) which is used to set event's time when timestamp value is not available- Returns:
- submission Status
-
submit
RoutingStatus submit(Event event, java.time.LocalDateTime defaultTime) throws GatewayException, RoutingException
Submits event to the runtime- Throws:
GatewayException
RoutingException
- Parameters:
event
- Generic event or event instancedefaultTime
- LocalDateTime time which is used to set event's time when timestamp value is not available- Returns:
- submission Status
-
submit
RoutingStatus submit(Event event, java.lang.String defaultTime) throws GatewayException, RoutingException
Submits event to the runtime- Throws:
GatewayException
RoutingException
- Parameters:
event
- Generic event or event instancedefaultTime
- String representation of ZonedDateTime or LocalDateTime time which is used to set event's time when timestamp value is not available- Returns:
- submission Status
-
getSolutionZoneId
java.time.ZoneId getSolutionZoneId()
Provides Time Zone id of the solution.- Returns:
- ZoneId of the solution
-
setMaxSubmitDelay
void setMaxSubmitDelay(int delay)
overrides maximum delay that system can tolerate for event submission. Delays over that limit will result in EventCapacityExceededException- Parameters:
delay
- delay in milliseconds, up to Integer.MAX_VALUE; 0 value means no delays can be tolerated
-
setGridTimeouts
void setGridTimeouts(CISGridTimeouts timeouts)
set various timeouts for the client connection to the grid- Parameters:
timeouts
- CISGridTimeout structure containing various timeouts for the client connection
-
-