Examples of port()


Examples of javaflow.components.api.InputPorts.port()

        InputPorts ports = mock(InputPorts.class);
        InputPort port1 = mock(InputPort.class, "port #1");
        InputPort port2 = mock(InputPort.class, "port #2");
        when(ports.size()).thenReturn(2);
        when(ports.port(0)).thenReturn(port1);
        when(ports.port(1)).thenReturn(port2);

        when(port1.isClosed()).thenReturn(true);
        when(port2.isClosed()).thenReturn(true);

        Iterator<InputPort> outs = new InputPortRoundRobinIterator(ports);
View Full Code Here

Examples of javaflow.components.api.OutputPorts.port()

        Packet packet2 = mock(Packet.class);
        Packet packet3 = mock(Packet.class);
        Packet packet4 = mock(Packet.class);

        when(ports.size()).thenReturn(2);
        when(ports.port(0)).thenReturn(port1);
        when(ports.port(1)).thenReturn(port2);
        Iterator<OutputPort> outs = new OutputPortRoundRobinIterator(ports);
        Assert.assertTrue(outs.hasNext());
        outs.next().send(packet1);
        Assert.assertTrue(outs.hasNext());
View Full Code Here

Examples of javaflow.components.api.OutputPorts.port()

        Packet packet3 = mock(Packet.class);
        Packet packet4 = mock(Packet.class);

        when(ports.size()).thenReturn(2);
        when(ports.port(0)).thenReturn(port1);
        when(ports.port(1)).thenReturn(port2);
        Iterator<OutputPort> outs = new OutputPortRoundRobinIterator(ports);
        Assert.assertTrue(outs.hasNext());
        outs.next().send(packet1);
        Assert.assertTrue(outs.hasNext());
        outs.next().send(packet2);
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.port()

                ((UriBuilderImpl) expectedUriBuilder).port(expectedPort);
            } else if (expectedUriBuilder instanceof ExtendedUriBuilder) {
                ((ExtendedUriBuilder) expectedUriBuilder).port(expectedPort);
            } else {
                if (expectedPort == null || expectedPort.equals("")) {
                    expectedUriBuilder.port(-1);
                } else {
                    try {
                        int portInt = Integer.valueOf(expectedPort);
                    } catch (NumberFormatException e) {
                        System.out
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.port()

   {
      String server = servletRequest.getScheme() + "://" + servletRequest.getServerName();
      UriBuilder builder = UriBuilder.fromUri(server);
      int port = servletRequest.getServerPort();
      if (port != 80)
         builder.port(port);
      builder.path(servletRequest.getContextPath() + servletRequest.getServletPath());
      return builder.build();
   }

   /**
 
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.port()

         {
            // disabled?
            return null;
         }
         UriBuilder secureUrl = UriBuilder.fromUri(url).scheme("https").port(-1);
         if (port != 443) secureUrl.port(port);
         url = secureUrl.build().toString();
      }
      return realmInfo.getAuthUrl().clone()
              .queryParam("client_id", realmInfo.getClientId())
              .queryParam("redirect_uri", url)
View Full Code Here

Examples of kafka.cluster.Broker.port()

                        log.warn("No leader for partition %s/%s found!", metadata.topic(), part.partitionId());
                    }
                    else {
                        builder.add(new KafkaPartition(metadata.topic(),
                                part.partitionId(),
                                HostAddress.fromParts(leader.host(), leader.port()),
                                ImmutableList.copyOf(Lists.transform(part.isr(), brokerToHostAddress()))));
                    }
                }
            }
View Full Code Here

Examples of kafka.server.KafkaConfig.port()

        if (leader == kafkaServer.getServer(0).config().brokerId()) {
            config = kafkaServer.getServer(0).config();
        } else {
            config = kafkaServer.getServer(1).config();
        }
        SimpleConsumer consumer = new SimpleConsumer(config.hostName(), config.port(), 100000, 100000, "clientId");
        FetchResponse response = consumer.fetch(new FetchRequestBuilder().addFetch(TOPIC_NAME, 0, 0, 100000).build());

        List<MessageAndOffset> messageSet = Lists.newArrayList(response.messageSet(TOPIC_NAME, 0).iterator());
        assertEquals("Should have fetched 2 messages", 2, messageSet.size());
View Full Code Here

Examples of net.jsunit.PropertiesFileConfiguration.port()

        writePropertiesFile("temp.file");
        PropertiesFileConfiguration configuration = new PropertiesFileConfiguration("temp.file");
        configuration.initialize();
        assertEquals("aaa", configuration.browserFileNames());
        assertEquals("bbb", configuration.logsDirectory());
        assertEquals("1234", configuration.port());
        assertEquals("ccc", configuration.resourceBase());
        assertEquals("ddd", configuration.url());
    }

    public void tearDown() throws Exception {
View Full Code Here

Examples of net.kuujo.vertigo.io.InputContext.port()

        if (curi.hasEndpoint()) {
          switch (curi.getEndpoint()) {
            case ContextUri.ENDPOINT_IN:
              InputContext input = instance.input();
              if (curi.hasPort()) {
                InputPortContext inPort = input.port(curi.getPort());
                if (inPort == null) {
                  throw new IllegalArgumentException("The URI port " + curi.getPort() + " does not exist in the given input configuration");
                }
                return (T) inPort;
              }
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.