Package kg.apc.perfmon.client

Examples of kg.apc.perfmon.client.Transport


     * Test of setTransport method, of class NewAgentConnector.
     */
    @Test
    public void testSetTransport() {
        System.out.println("setTransport");
        Transport atransport = null;
        instance.setTransport(atransport);
    }
View Full Code Here


    }

    protected PerfMonAgentConnector getConnector(String host, int port) throws IOException {
        log.debug("Trying new connector");
        SocketAddress addr = new InetSocketAddress(host, port);
        Transport transport = null;
        try {
            transport = TransportFactory.TCPInstance(addr);
            if (!transport.test()) {
                throw new IOException("Agent is unreachable via TCP");
            }
        } catch (IOException e) {
            log.info("Can't connect TCP transport for host: " + addr.toString(), e);
            boolean useUDP = JMeterUtils.getPropDefault("jmeterPlugin.perfmon.useUDP", false);
            if (!useUDP) {
                throw e;
            } else {
                try {
                    log.debug("Connecting UDP");
                    transport = TransportFactory.UDPInstance(addr);
                    if (!transport.test()) {
                        throw new IOException("Agent is unreachable via UDP");
                    }
                } catch (IOException ex) {
                    log.info("Can't connect UDP transport for host: " + addr.toString(), ex);
                    throw ex;
View Full Code Here

TOP

Related Classes of kg.apc.perfmon.client.Transport

Copyright © 2018 www.massapicom. 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.