@Override @SuppressWarnings("rawtypes") public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception { return compositeConfigure(transport, format, options); }
public synchronized void init() throws ServletException { // lets initialize the ActiveMQ broker try { if (broker == null) { broker = createBroker(); // Add the servlet connector String url = getConnectorURL(); HttpTransportFactory factory = new HttpTransportFactory(); transportConnector = (HttpTransportServer) factory.doBind(new URI(url)); broker.addConnector(transportConnector); String brokerURL = getServletContext().getInitParameter("org.apache.activemq.brokerURL"); if (brokerURL != null) { log("Listening for internal communication on: " + brokerURL); } } broker.start(); } catch (Exception e) { throw new ServletException("Failed to start embedded broker: " + e, e); } // now lets register the listener TransportAcceptListener listener = transportConnector.getAcceptListener(); getServletContext().setAttribute("transportChannelListener", listener); super.init(); }
protected Transport createTransport(URI location, WireFormat wf) throws IOException { TextWireFormat textWireFormat = asTextWireFormat(wf); // need to remove options from uri URI uri; try { uri = URISupport.removeQuery(location); } catch (URISyntaxException e) { MalformedURLException cause = new MalformedURLException("Error removing query on " + location); cause.initCause(e); throw cause; } return new HttpClientTransport(textWireFormat, uri); }
@SuppressWarnings("rawtypes") public Transport compositeConfigure(Transport transport, WireFormat format, Map options) { transport = super.compositeConfigure(transport, format, options); HttpClientTransport httpTransport = (HttpClientTransport)transport.narrow(HttpClientTransport.class); if(httpTransport != null && httpTransport.isTrace() ) { try { transport = TransportLoggerFactory.getInstance().createTransportLogger(transport); } catch (Throwable e) { LOG.error("Could not create TransportLogger object for: " + TransportLoggerFactory.defaultLogWriterName + ", reason: " + e, e); } } boolean useInactivityMonitor = "true".equals(getOption(options, "useInactivityMonitor", "true")); if (useInactivityMonitor) { transport = new InactivityMonitor(transport, null /* ignore wire format as no negotiation over http */); IntrospectionSupport.setProperties(transport, options); } return transport; } }
transport = transportFactory.serverConfigure(answer, null, options); } catch (Exception e) { throw IOExceptionSupport.create(e);
public synchronized void init() throws ServletException { // lets initialize the ActiveMQ broker try { if (broker == null) { broker = createBroker(); // Add the servlet connector String url = getConnectorURL(); HttpTransportFactory factory = new HttpTransportFactory(); transportConnector = (HttpTransportServer) factory.doBind(new URI(url)); broker.addConnector(transportConnector); String brokerURL = getServletContext().getInitParameter("org.apache.activemq.brokerURL"); if (brokerURL != null) { log("Listening for internal communication on: " + brokerURL); } } broker.start(); } catch (Exception e) { throw new ServletException("Failed to start embedded broker: " + e, e); } // now lets register the listener TransportAcceptListener listener = transportConnector.getAcceptListener(); getServletContext().setAttribute("transportChannelListener", listener); super.init(); }
@Override protected Transport createTransport(URI location, WireFormat wf) throws IOException { TextWireFormat textWireFormat = asTextWireFormat(wf); // need to remove options from uri URI uri; try { uri = URISupport.removeQuery(location); } catch (URISyntaxException e) { MalformedURLException cause = new MalformedURLException("Error removing query on " + location); cause.initCause(e); throw cause; } return new HttpClientTransport(textWireFormat, uri); }
@Override @SuppressWarnings("rawtypes") public Transport compositeConfigure(Transport transport, WireFormat format, Map options) { transport = super.compositeConfigure(transport, format, options); HttpClientTransport httpTransport = transport.narrow(HttpClientTransport.class); if (httpTransport != null && httpTransport.isTrace()) { try { transport = TransportLoggerFactory.getInstance().createTransportLogger(transport); } catch (Throwable e) { LOG.error("Could not create TransportLogger object for: " + TransportLoggerFactory.defaultLogWriterName + ", reason: " + e, e); } } boolean useInactivityMonitor = "true".equals(getOption(options, "useInactivityMonitor", "true")); if (useInactivityMonitor) { transport = new HttpInactivityMonitor(transport); IntrospectionSupport.setProperties(transport, options); } return transport; } }
transport = transportFactory.serverConfigure(answer, null, options); } catch (Exception e) { throw IOExceptionSupport.create(e);
public synchronized void init() throws ServletException { // lets initialize the ActiveMQ broker try { if (broker == null) { broker = createBroker(); // Add the servlet connector String url = getConnectorURL(); HttpTransportFactory factory = new HttpTransportFactory(); transportConnector = (HttpTransportServer) factory.doBind(new URI(url)); broker.addConnector(transportConnector); String brokerURL = getServletContext().getInitParameter("org.apache.activemq.brokerURL"); if (brokerURL != null) { log("Listening for internal communication on: " + brokerURL); } } broker.start(); } catch (Exception e) { throw new ServletException("Failed to start embedded broker: " + e, e); } // now lets register the listener TransportAcceptListener listener = transportConnector.getAcceptListener(); getServletContext().setAttribute("transportChannelListener", listener); super.init(); }
@Override @SuppressWarnings("rawtypes") public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception { return compositeConfigure(transport, format, options); }
@Override protected Transport createTransport(URI location, WireFormat wf) throws IOException { TextWireFormat textWireFormat = asTextWireFormat(wf); // need to remove options from uri URI uri; try { uri = URISupport.removeQuery(location); } catch (URISyntaxException e) { MalformedURLException cause = new MalformedURLException("Error removing query on " + location); cause.initCause(e); throw cause; } return new HttpClientTransport(textWireFormat, uri); }
@Override @SuppressWarnings("rawtypes") public Transport compositeConfigure(Transport transport, WireFormat format, Map options) { transport = super.compositeConfigure(transport, format, options); HttpClientTransport httpTransport = transport.narrow(HttpClientTransport.class); if (httpTransport != null && httpTransport.isTrace()) { try { transport = TransportLoggerFactory.getInstance().createTransportLogger(transport); } catch (Throwable e) { LOG.error("Could not create TransportLogger object for: " + TransportLoggerFactory.defaultLogWriterName + ", reason: " + e, e); } } boolean useInactivityMonitor = "true".equals(getOption(options, "useInactivityMonitor", "true")); if (useInactivityMonitor) { transport = new HttpInactivityMonitor(transport); IntrospectionSupport.setProperties(transport, options); } return transport; } }
transport = transportFactory.serverConfigure(answer, null, options); } catch (Exception e) { throw IOExceptionSupport.create(e);
public synchronized void init() throws ServletException { // lets initialize the ActiveMQ broker try { if (broker == null) { broker = createBroker(); // Add the servlet connector String url = getConnectorURL(); HttpTransportFactory factory = new HttpTransportFactory(); transportConnector = (HttpTransportServer) factory.doBind(new URI(url)); broker.addConnector(transportConnector); String brokerURL = getServletContext().getInitParameter("org.apache.activemq.brokerURL"); if (brokerURL != null) { log("Listening for internal communication on: " + brokerURL); } } broker.start(); } catch (Exception e) { throw new ServletException("Failed to start embedded broker: " + e, e); } // now lets register the listener TransportAcceptListener listener = transportConnector.getAcceptListener(); getServletContext().setAttribute("transportChannelListener", listener); super.init(); }
@Override @SuppressWarnings("rawtypes") public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception { return compositeConfigure(transport, format, options); }
@Override protected Transport createTransport(URI location, WireFormat wf) throws IOException { TextWireFormat textWireFormat = asTextWireFormat(wf); // need to remove options from uri URI uri; try { uri = URISupport.removeQuery(location); } catch (URISyntaxException e) { MalformedURLException cause = new MalformedURLException("Error removing query on " + location); cause.initCause(e); throw cause; } return new HttpClientTransport(textWireFormat, uri); }
@Override @SuppressWarnings("rawtypes") public Transport compositeConfigure(Transport transport, WireFormat format, Map options) { transport = super.compositeConfigure(transport, format, options); HttpClientTransport httpTransport = transport.narrow(HttpClientTransport.class); if (httpTransport != null && httpTransport.isTrace()) { try { transport = TransportLoggerFactory.getInstance().createTransportLogger(transport); } catch (Throwable e) { LOG.error("Could not create TransportLogger object for: " + TransportLoggerFactory.defaultLogWriterName + ", reason: " + e, e); } } boolean useInactivityMonitor = "true".equals(getOption(options, "useInactivityMonitor", "true")); if (useInactivityMonitor) { transport = new HttpInactivityMonitor(transport); IntrospectionSupport.setProperties(transport, options); } return transport; } }
transport = transportFactory.serverConfigure(answer, null, options); } catch (Exception e) { throw IOExceptionSupport.create(e);
@SuppressWarnings("rawtypes") public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception { return compositeConfigure(transport, format, options); }