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 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 EntityRelationship<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 EntityRelationship<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 relationship
        key - entity id for this relationship
        Returns:
        relationship to entity instance identified by type and key
      • 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 instance
        defaultTime - 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

© Copyright IBM 2016