Examples of NetworkClient


Examples of com.jme3.network.NetworkClient

    } catch (NumberFormatException e) {
      String errMsg = "Wrong portnumber: " + serverStrings[1];
      loginFailed(errMsg);
      LogFactory.getLog(ClientMain.class).warn(errMsg, e);
    }
    final NetworkClient cisClient = Network.createClient();

    try {
      cisClient.connectToServer(serverStrings[0], port, port);
    } catch (IOException e) {
      String errMsg = "Could not find server!";
      LogFactory.getLog(ClientMain.class).warn(errMsg, e);
      loginFailed(errMsg);
View Full Code Here

Examples of network.NetworkClient

    private Message message;
   
    @Override
    public void run()
    {
        NetworkClient sender = new NetworkClient(message.getReceiverIP(), Constants.PORT_TCP);
        if (!sender.sendMessage(message))
        {
            sendErrorMessage(message);
            StatusManager.updateAnotherHostStatus(Host.findHostByIP(message.getReceiverIP()), false);
        }
    }
View Full Code Here

Examples of org.apache.kafka.clients.NetworkClient

                                                 metrics,
                                                 time);
        List<InetSocketAddress> addresses = ClientUtils.parseAndValidateAddresses(config.getList(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG));
        this.metadata.update(Cluster.bootstrap(addresses), time.milliseconds());

        NetworkClient client = new NetworkClient(new Selector(this.metrics, time),
                                                 this.metadata,
                                                 clientId,
                                                 config.getInt(ProducerConfig.MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION),
                                                 config.getLong(ProducerConfig.RECONNECT_BACKOFF_MS_CONFIG),
                                                 config.getInt(ProducerConfig.SEND_BUFFER_CONFIG),
View Full Code Here

Examples of org.jclouds.cloudstack.features.NetworkClient

   }

   @Override
   public Map<String, Network> get() {
      User currentUser = currentUserSupplier.get();
      NetworkClient networkClient = client.getNetworkClient();
      return Maps.uniqueIndex(
            networkClient.listNetworks(accountInDomain(currentUser.getAccount(), currentUser.getDomainId())),
            new Function<Network, String>() {

               @Override
               public String apply(Network arg0) {
                  return arg0.getId();
View Full Code Here

Examples of org.jclouds.cloudstack.features.NetworkClient

    @Test
    public void testEnsureNetworkExistsWithProvidedExistingNetwork() throws Exception {
        final String networkId = "network-id-0123";
        final CloudStackClient mockClient = mock(CloudStackClient.class);
        final NetworkClient mockNetworkClient = mock(NetworkClient.class);
        final Network mockNetwork = mock(Network.class);
        final org.apache.provisionr.api.network.Network network = org.apache.provisionr.api.network.Network.builder()
            .option(NetworkOptions.EXISTING_NETWORK_ID, networkId).createNetwork();

        execution.setVariable(ProcessVariables.NETWORK_ID, networkId);

        when(pool.getNetwork()).thenReturn(network);
        when(mockClient.getNetworkClient()).thenReturn(mockNetworkClient);
        when(mockNetworkClient.getNetwork(networkId)).thenReturn(mockNetwork);
        when(mockNetwork.getId()).thenReturn(networkId);

        activity.execute(mockClient, pool, execution);
        assertThat(collector.getVariable(ProcessVariables.NETWORK_ID)).isEqualTo(networkId);
    }
View Full Code Here

Examples of org.jclouds.cloudstack.features.NetworkClient

   }

   @Override
   public Map<String, Network> get() {
      User currentUser = currentUserSupplier.get();
      NetworkClient networkClient = client.getNetworkClient();
      return Maps.uniqueIndex(
            networkClient.listNetworks(accountInDomain(currentUser.getAccount(), currentUser.getDomainId())),
            new Function<Network, String>() {

               @Override
               public String apply(Network arg0) {
                  return arg0.getId();
View Full Code Here

Examples of org.jclouds.cloudstack.features.NetworkClient

    @Test
    public void testEnsureNetworkExistsWithProvidedExistingNetwork() throws Exception {
        final String networkId = "network-id-0123";
        final CloudStackClient mockClient = mock(CloudStackClient.class);
        final NetworkClient mockNetworkClient = mock(NetworkClient.class);
        final Network mockNetwork = mock(Network.class);
        final com.axemblr.provisionr.api.network.Network network = com.axemblr.provisionr.api.network.Network.builder()
            .option(NetworkOptions.EXISTING_NETWORK_ID, networkId).createNetwork();

        execution.setVariable(ProcessVariables.NETWORK_ID, networkId);

        when(pool.getNetwork()).thenReturn(network);
        when(mockClient.getNetworkClient()).thenReturn(mockNetworkClient);
        when(mockNetworkClient.getNetwork(networkId)).thenReturn(mockNetwork);
        when(mockNetwork.getId()).thenReturn(networkId);

        activity.execute(mockClient, pool, execution);
        assertThat(collector.getVariable(ProcessVariables.NETWORK_ID)).isEqualTo(networkId);
    }
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.