Beispiel #1
0
 /**
  * This method should be used when a message has to be sent and then time for responses to be
  * broadcast back is needed before moving on. In this case, the connection will broadcast the
  * message and then sleep for an amount of time appropriate based on the underlying comms protocol
  * in use. For example, the JVM connection won't sleep for long, but a connection sending
  * information over a network should wait longer.
  *
  * @param message The message to broadcast
  * @throws Exception If there was an error when sending the message
  */
 public void broadcastAndSleep(PorticoMessage message) throws Exception {
   validateConnected();
   joinedFederation.send(message);
   PorticoConstants.sleep(Configuration.RESPONSE_TIMEOUT);
 }
Beispiel #2
0
 /**
  * Broadcast the given message out to all participants in a federation asynchronously. As soon as
  * the message has been received for processing or sent, this method is free to return. No
  * response will be waited for.
  *
  * @param message The message to broadcast
  * @throws Exception If there was an error when sending the message
  */
 public void broadcast(PorticoMessage message)
     throws JFederateNotExecutionMember, JRTIinternalError {
   validateConnected();
   joinedFederation.send(message);
 }