Java CAPS JMS Reference

receive(timeout, destination)

Description

Receives the next message of type com.stc.connectors.jms.Message that arrives from the specified message destination during the specified timeout interval.

Parameters

Name 

Type 

Description 

timeout

long

The number of milliseconds before the receive method times out.

destination

java.lang.String

The name of the topic or queue from which this method receives messages. 

Return Value

Returns 

Type 

The next message produced, or null if the timeout expires. 

com.stc.connectors.jms.Message

Exceptions

Throws JMSException.