congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CompositeTransport.add
Code IndexAdd Tabnine to your IDE (free)

How to use
add
method
in
org.apache.activemq.transport.CompositeTransport

Best Java code snippets using org.apache.activemq.transport.CompositeTransport.add (Showing top 10 results out of 315)

origin: apache/activemq

@Override
public void onServiceAdd(DiscoveryEvent event) {
  String url = event.getServiceName();
  if (url != null) {
    try {
      URI uri = new URI(url);
      LOG.info("Adding new broker connection URL: " + uri);
      uri = URISupport.applyParameters(uri, parameters, DISCOVERED_OPTION_PREFIX);
      serviceURIs.put(event.getServiceName(), uri);
      next.add(false,new URI[] {uri});
    } catch (URISyntaxException e) {
      LOG.warn("Could not connect to remote URI: " + url + " due to bad URI syntax: " + e, e);
    }
  }
}
origin: apache/activemq

private Transport createRemoteTransport(final Transport local) throws Exception {
  Transport transport = TransportFactory.compositeConnect(remote);
  CompositeTransport ct = transport.narrow(CompositeTransport.class);
  if (ct != null && localUri != null && proxyToLocalBroker) {
    ct.add(false, new URI[] { localUri });
  }
  // Add a transport filter so that we can track the transport life cycle
  transport = new TransportFilter(transport) {
    @Override
    public void stop() throws Exception {
      LOG.info("Stopping proxy.");
      super.stop();
      ProxyConnection dummy = new ProxyConnection(local, this);
      LOG.debug("Removing proxyConnection {}", dummy.toString());
      connections.remove(dummy);
    }
  };
  return transport;
}
origin: pierre/meteo

public void onServiceAdd(DiscoveryEvent event) {
  String url = event.getServiceName();
  if (url != null) {
    try {
      URI uri = new URI(url);
      LOG.info("Adding new broker connection URL: " + uri);
      uri = URISupport.applyParameters(uri, parameters, DISCOVERED_OPTION_PREFIX);
      serviceURIs.put(event.getServiceName(), uri);
      next.add(false,new URI[] {uri});
    } catch (URISyntaxException e) {
      LOG.warn("Could not connect to remote URI: " + url + " due to bad URI syntax: " + e, e);
    }
  }
}
origin: org.apache.activemq/activemq-osgi

@Override
public void onServiceAdd(DiscoveryEvent event) {
  String url = event.getServiceName();
  if (url != null) {
    try {
      URI uri = new URI(url);
      LOG.info("Adding new broker connection URL: " + uri);
      uri = URISupport.applyParameters(uri, parameters, DISCOVERED_OPTION_PREFIX);
      serviceURIs.put(event.getServiceName(), uri);
      next.add(false,new URI[] {uri});
    } catch (URISyntaxException e) {
      LOG.warn("Could not connect to remote URI: " + url + " due to bad URI syntax: " + e, e);
    }
  }
}
origin: org.apache.activemq/activemq-client

@Override
public void onServiceAdd(DiscoveryEvent event) {
  String url = event.getServiceName();
  if (url != null) {
    try {
      URI uri = new URI(url);
      LOG.info("Adding new broker connection URL: " + uri);
      uri = URISupport.applyParameters(uri, parameters, DISCOVERED_OPTION_PREFIX);
      serviceURIs.put(event.getServiceName(), uri);
      next.add(false,new URI[] {uri});
    } catch (URISyntaxException e) {
      LOG.warn("Could not connect to remote URI: " + url + " due to bad URI syntax: " + e, e);
    }
  }
}
origin: org.apache.activemq/activemq-all

@Override
public void onServiceAdd(DiscoveryEvent event) {
  String url = event.getServiceName();
  if (url != null) {
    try {
      URI uri = new URI(url);
      LOG.info("Adding new broker connection URL: " + uri);
      uri = URISupport.applyParameters(uri, parameters, DISCOVERED_OPTION_PREFIX);
      serviceURIs.put(event.getServiceName(), uri);
      next.add(false,new URI[] {uri});
    } catch (URISyntaxException e) {
      LOG.warn("Could not connect to remote URI: " + url + " due to bad URI syntax: " + e, e);
    }
  }
}
origin: pierre/meteo

private Transport createRemoteTransport() throws Exception {
  Transport transport = TransportFactory.compositeConnect(remote);
  CompositeTransport ct = transport.narrow(CompositeTransport.class);
  if (ct != null && localUri != null && proxyToLocalBroker) {
    ct.add(false,new URI[] {localUri});
  }
  // Add a transport filter so that we can track the transport life cycle
  transport = new TransportFilter(transport) {
    @Override
    public void stop() throws Exception {
      LOG.info("Stopping proxy.");
      super.stop();
      connections.remove(this);
    }
  };
  return transport;
}
origin: org.apache.activemq/activemq-osgi

private Transport createRemoteTransport(final Transport local) throws Exception {
  Transport transport = TransportFactory.compositeConnect(remote);
  CompositeTransport ct = transport.narrow(CompositeTransport.class);
  if (ct != null && localUri != null && proxyToLocalBroker) {
    ct.add(false, new URI[] { localUri });
  }
  // Add a transport filter so that we can track the transport life cycle
  transport = new TransportFilter(transport) {
    @Override
    public void stop() throws Exception {
      LOG.info("Stopping proxy.");
      super.stop();
      ProxyConnection dummy = new ProxyConnection(local, this);
      LOG.debug("Removing proxyConnection {}", dummy.toString());
      connections.remove(dummy);
    }
  };
  return transport;
}
origin: org.apache.activemq/activemq-broker

private Transport createRemoteTransport(final Transport local) throws Exception {
  Transport transport = TransportFactory.compositeConnect(remote);
  CompositeTransport ct = transport.narrow(CompositeTransport.class);
  if (ct != null && localUri != null && proxyToLocalBroker) {
    ct.add(false, new URI[] { localUri });
  }
  // Add a transport filter so that we can track the transport life cycle
  transport = new TransportFilter(transport) {
    @Override
    public void stop() throws Exception {
      LOG.info("Stopping proxy.");
      super.stop();
      ProxyConnection dummy = new ProxyConnection(local, this);
      LOG.debug("Removing proxyConnection {}", dummy.toString());
      connections.remove(dummy);
    }
  };
  return transport;
}
origin: org.apache.activemq/activemq-all

private Transport createRemoteTransport(final Transport local) throws Exception {
  Transport transport = TransportFactory.compositeConnect(remote);
  CompositeTransport ct = transport.narrow(CompositeTransport.class);
  if (ct != null && localUri != null && proxyToLocalBroker) {
    ct.add(false, new URI[] { localUri });
  }
  // Add a transport filter so that we can track the transport life cycle
  transport = new TransportFilter(transport) {
    @Override
    public void stop() throws Exception {
      LOG.info("Stopping proxy.");
      super.stop();
      ProxyConnection dummy = new ProxyConnection(local, this);
      LOG.debug("Removing proxyConnection {}", dummy.toString());
      connections.remove(dummy);
    }
  };
  return transport;
}
org.apache.activemq.transportCompositeTransportadd

Popular methods of CompositeTransport

  • remove
  • start

Popular in Java

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • setContentView (Activity)
  • runOnUiThread (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now