Event.requestEvent()

Signature

Object requestEvent(SimpleEvent requestEvent, String responseEventURI, String requestEventDestinationURI, long timeout, String properties)

Domain

ACTION, BUI

Description

Make synchronous request/response calls using JMS. Sends an event and waits for a response to be returned.Each request creates and listens on a JMS temporary queue for a response.

Parameters

NameTypeDescription
requestEventSimpleEventThe SimpleEvent to use to make the request.
responseEventURIStringThe Event URI of the expected response event. The serializer set on the responseEvent's default destination will be used. If set to null, the underlying response javax.jmx.Message will be returned as an Object
requestEventDestinationURIStringThe URI (path) of the destination to use, to make the request.Eg. "/MyChannel/MyDestination"
If set to null the requestEvent's default destination will be used.
timeoutlongThe duration in milliseconds to wait for a response. Use -1 to wait forever.
propertiesStringA list of property name-value pairs in the format [name1=value1;name2=value2;...;] When present in the name or value each character [ =, or \] should be escaped with two antislash [ \ ] characters. E.G. 2=1+1 should be written as 2\\=1+1 and 2\3\4 should be written as 2\\\\3\\\\4.

Returns

TypeDescription
ObjectIf responseEventURI is specified, a SimpleEvent of type responseEventURI. If set to null, then the underlying javax.jms.Message response message.

Cautions

This method will fail if requestEvent has not been configured with a default destination and if requestEventDestinationURI is null.