Examples of Ports


Examples of com.github.dockerjava.api.model.Ports

        if (lxcConf != null) {
            startContainerCmd.withLxcConf(lxcConf);
        }
       
        Ports ports = DockerHelper.getProperty(DockerConstants.DOCKER_PORT_BINDINGS, configuration, message, Ports.class);

        if (ports != null) {
            startContainerCmd.withPortBindings(ports);
        }
       
View Full Code Here

Examples of net.tomp2p.connection.Ports

        client2Port = getNewRandomPort();
    }

    private int getNewRandomPort() {
        // new Ports().tcpPort() returns a random port
        int newPort = new Ports().tcpPort();
        while (newPort == client1Port || newPort == client2Port)
            newPort = new Ports().tcpPort();

        return newPort;
    }
View Full Code Here

Examples of net.tomp2p.connection.Ports

   
  }

  private Peer createPeer(int port) throws IOException {
    ChannelServerConfiguration csc = PeerBuilder.createDefaultChannelServerConfiguration();
    csc.ports(new Ports(port, port));
    csc.portsForwarding(new Ports(port, port));
    csc.connectionTimeoutTCPMillis(10 * 1000);
    csc.idleTCPSeconds(10);
    csc.idleUDPSeconds(10);
   
    return new PeerBuilder(new Number160(port)).ports(port).channelServerConfiguration(csc).start();
View Full Code Here

Examples of net.tomp2p.connection.Ports

                                peer.peerBean().serverPeerAddress(serverAddress);
                                LOG.info("we were having the wrong interface, change it to: {}", serverAddress);
                            } else {
                                // now we know our internal IP, where we receive
                                // packets
                                final Ports ports = peer.connectionBean().channelServer().channelServerConfiguration().portsForwarding();
                                if (ports.isManualPort()) {
                                  final PeerAddress serverAddressOrig = serverAddress;
                                    serverAddress = serverAddress.changePorts(ports.tcpPort(),
                                            ports.udpPort());
                                    serverAddress = serverAddress.changeAddress(seenAs.inetAddress());
                                    //manual port forwarding detected, set flag
                                    serverAddress = serverAddress.changePortForwarding(true);
                                    peer.peerBean().serverPeerAddress(serverAddress);
                                    peer.peerBean().serverPeerAddress().internalPeerSocketAddress(serverAddressOrig.peerSocketAddress());
View Full Code Here

Examples of net.tomp2p.connection.Ports

    //post config
    if(isBehindFirewallSet) {
      channelServerConfiguration.behindFirewall(behindFirewall);
    }
    if(isTcpPortSet || isUdpPortSet) {
      channelServerConfiguration.ports(new Ports(tcpPort, udpPort));
    }
   
    channelServerConfiguration.portsForwarding(new Ports(tcpPortForwarding, udpPortForwarding));
   
    if (channelClientConfiguration == null) {
      channelClientConfiguration = createDefaultChannelClientConfiguration();
    }
    if (keyPair == null) {
View Full Code Here

Examples of net.tomp2p.connection.Ports

  public static ChannelServerConfiguration createDefaultChannelServerConfiguration() {
    ChannelServerConfiguration channelServerConfiguration = new ChannelServerConfiguration();
    channelServerConfiguration.bindings(new Bindings());
    //these two values may be overwritten in the peer builder
    channelServerConfiguration.ports(new Ports(Ports.DEFAULT_PORT, Ports.DEFAULT_PORT));
    channelServerConfiguration.portsForwarding(new Ports(Ports.DEFAULT_PORT, Ports.DEFAULT_PORT));
    channelServerConfiguration.behindFirewall(false);
    channelServerConfiguration.pipelineFilter(new DefaultPipelineFilter());
    channelServerConfiguration.signatureFactory(new DSASignatureFactory());
    return channelServerConfiguration;
  }
View Full Code Here

Examples of net.tomp2p.connection.Ports

        if (future.reporter() != null) {
          futureNAT.reporter(future.reporter());
        }

        if (future.isFailed() && future.isNat() && !isManualPorts()) {
          Ports externalPorts = setupPortforwarding(future.internalAddress().getHostAddress(), peer
              .connectionBean().channelServer().channelServerConfiguration().portsForwarding());
          if (externalPorts != null) {
            final PeerAddress serverAddressOrig = peer.peerBean().serverPeerAddress();
            final PeerAddress serverAddress = serverAddressOrig
                .changePorts(externalPorts.tcpPort(), externalPorts.udpPort())
                .changeAddress(future.externalAddress());
           
            //set the new address regardless wheter it will succeed or not.
            // The discover will eventually check wheter the announced ip matches the one that it sees.
            peer.peerBean().serverPeerAddress(serverAddress);
View Full Code Here

Examples of org.glassfish.internal.embedded.Ports

        }

        listenerName = webListener.getId();

        try {
            Ports ports = habitat.getComponent(Ports.class);
            Port port = ports.createPort(webListener.getPort());
            bind(port, webListener, vsId);
        } catch (java.io.IOException ex) {
            throw new ConfigException(ex);
        }
View Full Code Here

Examples of org.glassfish.internal.embedded.Ports

        }

        listenerName = webListener.getId();

        try {
            Ports ports = habitat.getComponent(Ports.class);
            Port port = ports.createPort(webListener.getPort());
            bind(port, webListener, vsId);
        } catch (java.io.IOException ex) {
            throw new ConfigException(ex);
        }
View Full Code Here

Examples of org.glassfish.internal.embedded.Ports

        }

        listenerName = webListener.getId();

        try {
            Ports ports = habitat.getComponent(Ports.class);
            Port port = ports.createPort(webListener.getPort());
            bind(port, webListener, vsId);
        } catch (java.io.IOException ex) {
            throw new ConfigException(ex);
        }
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.