See: Description
| Interface | Description |
|---|---|
| AuthenticationConfiguration |
Represents the authentication configuration used to connect to a secured grid.
|
| GridConnection |
A GridConnection class contains Object Grid connection to the grid specified by GridConfiguration.
|
| IConnectionFactory | |
| IQueueConnectionFactory | |
| ISolutionServiceFactory | |
| SolutionGateway |
SolutionGateway represents main API to create events and submit them for processing.
|
| UserPasswordAuthenticationConfiguration |
Represents the user name and password credentials that are required to connect to a secured grid.
|
| Class | Description |
|---|---|
| GridConfiguration |
Encapsulates the configuration needed to establish a GridConnection using the GridConnectionFactory.
|
| GridConnectionFactory |
Factory class to create instances of GridConnection.
|
| Exception | Description |
|---|---|
| EngineVersionException |
Exception class to identify engine version mismatch between the gateway client and runtime server
|
| GridConnectionException |
An Exception class for all client/server connection related issues
|
| QueueConnectionException | |
| SolutionChangedException |
An Exception class to indicate that solution changed on the server.
|
| SolutionNotFoundException |
An Exception class to indicate that solution is not found on the server
|
| SolutionServiceException |
Get a SolutionGateway instance:
GridConfiguration gridConfig = new GridConfiguration("localhost:2809", "com.ibm.ia", null);
GridConnection connection = GridConnectionFactory.createGridConnection(gridConfig);
SolutionGateway gateway = connection.getSolutionGateway("AcmeAirlines");
Submit event using XML representation:
InputStream es = getClass().getResourceAsStream("/test/resources/customer_event.xml")
try{
Event event = gateway.getEventFactory().parseEvent(DataFormat.TYPED_XML, es, null);
RoutingStatus status = gateway.submit(event);
System.out.println("Event submitted successfully, status is " + status);
} catch (ProcessException e) {
System.out.println("Failed to submit event" + e.getMessage());
}
Submit event using event instance:
CustomerEvent event = gateway.getEventFactory().createEvent(CustomerEvent.class);
event.setDescription("Customer event");
event.setEventDatetime(ZonedDateTime.parse("2012-11-17T13:47:30+01:00"));
Relationship customer = gateway.getEventFactory().createRelationship(Customer.class, "Alan");
event.setCustomer(customer);
Relationship flight = gateway.getEventFactory().createRelationship(Flight.class, "AA123");
event.setFlight(flight);
try{
RoutingStatus status = gateway.submit(event);
System.out.println("Event submitted successfully, status is " + status);
} catch (ProcessException e) {
System.out.println("Failed to submit event" + e.getMessage());
}
© Copyright IBM 2017