Example #1
0
 public EndpointType getEndpoint(String name) {
   for (EndpointType e : endpoints) {
     if (e.getName().equals(name)) {
       return e;
     }
   }
   return null;
 }
  protected Exchange createExchange() throws TimeoutException, NotConnectedException {
    LOG.trace("createExchange()");
    Identity info = getIdentity();
    Exchange exchange = endpoint.createExchange();

    ExchangePattern exchangePattern = exchange.getPattern();
    LOG.trace("exchangePattern=" + exchangePattern);

    // TODO CHECK InOnly. InOut, OutOnly

    // SET DEFAULT HEADER
    Message message = exchange.getIn();
    message.setHeader("uid", info.uid);
    message.setHeader("connectedUid", info.connectedUid);
    message.setHeader("deviceIdentifier", info.deviceIdentifier);
    message.setHeader("position", info.position);

    return exchange;
  }