Examples of TransportAddress


Examples of org.apache.cloudstack.framework.transport.TransportAddress

        dispatchPdu(pdu);
    }

    private void dispatchPdu(TransportPdu pdu) {

        TransportAddress transportAddress = TransportAddress.fromAddressString(pdu.getDestAddress());

        if (isLocalAddress(transportAddress)) {
            TransportEndpointSite endpointSite = null;
            synchronized (this) {
                endpointSite = _endpointMap.get(transportAddress.getEndpointId());
            }

            if (endpointSite != null)
                endpointSite.addOutputPdu(pdu);
        } else {
View Full Code Here

Examples of org.elasticsearch.common.transport.TransportAddress

* @author kimchy (shay.banon)
*/
public class TransportClientMoreLikeThisActionTests extends MoreLikeThisActionTests {

    @Override protected Client getClient1() {
        TransportAddress server1Address = ((InternalNode) node("server1")).injector().getInstance(TransportService.class).boundAddress().publishAddress();
        TransportClient client = new TransportClient(settingsBuilder()
                .put("cluster.name", "test-cluster-" + NetworkUtils.getLocalAddress().getHostName())
                .put("discovery.enabled", false).build());
        client.addTransportAddress(server1Address);
        return client;
View Full Code Here

Examples of org.elasticsearch.common.transport.TransportAddress

        client.addTransportAddress(server1Address);
        return client;
    }

    @Override protected Client getClient2() {
        TransportAddress server1Address = ((InternalNode) node("server2")).injector().getInstance(TransportService.class).boundAddress().publishAddress();
        TransportClient client = new TransportClient(settingsBuilder()
                .put("cluster.name", "test-cluster-" + NetworkUtils.getLocalAddress().getHostName())
                .put("discovery.enabled", false).build());
        client.addTransportAddress(server1Address);
        return client;
View Full Code Here

Examples of org.elasticsearch.common.transport.TransportAddress

* @author kimchy (shay.banon)
*/
public class TransportClientSniffDocumentActionsTests extends DocumentActionsTests {

    @Override protected Client getClient1() {
        TransportAddress server1Address = ((InternalNode) node("server1")).injector().getInstance(TransportService.class).boundAddress().publishAddress();
        TransportClient client = new TransportClient(settingsBuilder()
                .put("cluster.name", "test-cluster-" + NetworkUtils.getLocalAddress().getHostName())
                .put("client.transport.sniff", true).build());
        client.addTransportAddress(server1Address);
        return client;
View Full Code Here

Examples of org.elasticsearch.common.transport.TransportAddress

        client.addTransportAddress(server1Address);
        return client;
    }

    @Override protected Client getClient2() {
        TransportAddress server2Address = ((InternalNode) node("server2")).injector().getInstance(TransportService.class).boundAddress().publishAddress();
        TransportClient client = new TransportClient(settingsBuilder()
                .put("cluster.name", "test-cluster-" + NetworkUtils.getLocalAddress().getHostName())
                .put("client.transport.sniff", true).build());
        client.addTransportAddress(server2Address);
        return client;
View Full Code Here

Examples of org.elasticsearch.common.transport.TransportAddress

* @author kimchy (shay.banon)
*/
public class ClientTransportTwoNodesSearchTests extends TransportTwoNodesSearchTests {

    @Override protected Client getClient() {
        TransportAddress server1Address = ((InternalNode) node("server1")).injector().getInstance(TransportService.class).boundAddress().publishAddress();
        TransportClient client = new TransportClient(ImmutableSettings
                .settingsBuilder()
                .put("cluster.name", "test-cluster-" + NetworkUtils.getLocalAddress().getHostName())
                .build());
        client.addTransportAddress(server1Address);
View Full Code Here

Examples of org.elasticsearch.common.transport.TransportAddress

* @author kimchy (shay.banon)
*/
public class TransportClientDocumentActionsTests extends DocumentActionsTests {

    @Override protected Client getClient1() {
        TransportAddress server1Address = ((InternalNode) node("server1")).injector().getInstance(TransportService.class).boundAddress().publishAddress();
        TransportClient client = new TransportClient(settingsBuilder()
                .put("cluster.name", "test-cluster-" + NetworkUtils.getLocalAddress().getHostName())
                .put("client.transport.sniff", false).build());
        client.addTransportAddress(server1Address);
        return client;
View Full Code Here

Examples of org.elasticsearch.common.transport.TransportAddress

        client.addTransportAddress(server1Address);
        return client;
    }

    @Override protected Client getClient2() {
        TransportAddress server2Address = ((InternalNode) node("server2")).injector().getInstance(TransportService.class).boundAddress().publishAddress();
        TransportClient client = new TransportClient(settingsBuilder()
                .put("cluster.name", "test-cluster-" + NetworkUtils.getLocalAddress().getHostName())
                .put("client.transport.sniff", false).build());
        client.addTransportAddress(server2Address);
        return client;
View Full Code Here

Examples of org.elasticsearch.common.transport.TransportAddress

    public List<String> connectedNodes() {
        ImmutableList<DiscoveryNode> discoveryNodes = client().connectedNodes();
        List<String> nodes = new ArrayList<String>();
        for (DiscoveryNode discoveryNode : discoveryNodes) {
            TransportAddress address = discoveryNode.address();
            if (address != null) {
                nodes.add(address.toString());
            }
        }
        return nodes;
    }
View Full Code Here

Examples of org.elasticsearch.common.transport.TransportAddress

        // no exception means everything is cool
        ISODateTimeFormat.dateOptionalTimeParser().parseDateTime(hit.get("@timestamp").toString());
    }

    private int getPortOfRunningNode() {
        TransportAddress transportAddress = internalCluster().getInstance(HttpServerTransport.class).boundAddress().boundAddress();
        if (transportAddress instanceof InetSocketTransportAddress) {
            return ((InetSocketTransportAddress) transportAddress).address().getPort();
        }
        throw new ElasticsearchException("Could not find running tcp port");
    }
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.