Examples of narrow()


Examples of org.apache.activemq.transport.Transport.narrow()

        if (target.isAssignableFrom(getClass())) {
            return target.cast(this);
        }
        Transport transport = connectedTransport.get();
        if ( transport != null) {
            return transport.narrow(target);
        }
        return null;

    }
View Full Code Here

Examples of org.apache.activemq.transport.Transport.narrow()

                LOG.debug("Test Transport Listener records transport Resumed: " + transportResumptions);
            }
        });
        transport.start();

        this.failoverTransport = transport.narrow(FailoverTransport.class);

        return transport;
    }
}
View Full Code Here

Examples of org.apache.activemq.transport.Transport.narrow()

        if (target.isAssignableFrom(getClass())) {
            return target.cast(this);
        }
        Transport transport = connectedTransport.get();
        if (transport != null) {
            return transport.narrow(target);
        }
        return null;

    }
View Full Code Here

Examples of org.apache.activemq.transport.Transport.narrow()

            public void transportResumed() {
            }
        });
        transport.start();

        this.failoverTransport = transport.narrow(FailoverTransport.class);

        assertTrue("no implicit limit of 1000", Wait.waitFor(new Wait.Condition() {
            @Override
            public boolean isSatisified() throws Exception {
                return failoverTransport.getConnectFailures() > 1002;
View Full Code Here

Examples of org.apache.activemq.transport.Transport.narrow()

            public void transportResumed() {
            }
        });
        transport.start();

        this.failoverTransport = transport.narrow(FailoverTransport.class);

        return transport;
    }

}
View Full Code Here

Examples of org.apache.activemq.transport.Transport.narrow()

        return TransportFactory.bind(bind);
    }

    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
View Full Code Here

Examples of org.apache.activemq.transport.Transport.narrow()

        if (target.isAssignableFrom(getClass())) {
            return target.cast(this);
        }
        Transport transport = connectedTransport.get();
        if (transport != null) {
            return transport.narrow(target);
        }
        return null;

    }
View Full Code Here

Examples of org.apache.activemq.transport.Transport.narrow()

        return TransportFactory.bind(bind);
    }

    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
View Full Code Here

Examples of org.apache.activemq.transport.Transport.narrow()

            return null;

        if( getConfig().bySourceIp !=null && !getConfig().bySourceIp.isEmpty() ) {
            TransportConnection connection = (TransportConnection)monitor.context.getConnection();
            Transport transport = connection.getTransport();
            Socket socket = transport.narrow(Socket.class);
            if( socket !=null ) {
                SocketAddress address = socket.getRemoteSocketAddress();
                if( address instanceof InetSocketAddress) {
                    String ip = ((InetSocketAddress) address).getAddress().getHostAddress();
                    Target targetDTO = getConfig().bySourceIp.get(ip);
View Full Code Here

Examples of org.apache.activemq.transport.Transport.narrow()

        return TransportFactory.bind(bind);
    }

    private Transport createRemoteTransport() throws Exception {
        Transport transport = TransportFactory.compositeConnect(remote);
        CompositeTransport ct = (CompositeTransport)transport.narrow(CompositeTransport.class);
        if (ct != null && localUri != null) {
            ct.add(new URI[] {localUri});
        }

        // Add a transport filter so that can track the transport life cycle
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.