Package com.proofpoint.node

Examples of com.proofpoint.node.NodeConfig


        System.setProperty(JAVAX_NET_SSL_TRUST_STORE, getResource("localhost.keystore").getPath());
        tempDir = Files.createTempDir().getCanonicalFile(); // getCanonicalFile needed to get around Issue 365 (http://code.google.com/p/guava-libraries/issues/detail?id=365)
        config = new HttpServerConfig()
                .setHttpPort(0)
                .setLogPath(new File(tempDir, "http-request.log").getAbsolutePath());
        nodeInfo = new NodeInfo("test-application", new NodeConfig()
                .setEnvironment("test")
                .setNodeInternalIp(InetAddresses.forString("127.0.0.1"))
                .setNodeBindIp(InetAddresses.forString("127.0.0.1"))
                .setNodeExternalAddress("localhost")
                .setNodeInternalHostname("localhost")
View Full Code Here


    @BeforeMethod
    protected void setUp()
            throws Exception
    {
        nodeInfo = new NodeInfo("test-application", new NodeConfig().setEnvironment("test").setPool("pool"));
        discoveryClient = new InMemoryDiscoveryClient(nodeInfo, MAX_AGE);
        serviceAnnouncement = ServiceAnnouncement.serviceAnnouncement(serviceType.value()).addProperty("a", "apple").build();
        announcer = new Announcer(discoveryClient, ImmutableSet.of(serviceAnnouncement));
    }
View Full Code Here

    @Override
    public void configure(Binder binder)
    {
        binder.bind(NodeInfo.class).in(Scopes.SINGLETON);
        NodeConfig nodeConfig = new NodeConfig()
                .setEnvironment(environment)
                .setNodeInternalIp(getV4Localhost())
                .setNodeBindIp(getV4Localhost());

        if (pool.isPresent()) {
            nodeConfig.setPool(pool.get());
        }

        binder.bind(NodeConfig.class).toInstance(nodeConfig);

        newExporter(binder).export(NodeInfo.class).withGeneratedName();
View Full Code Here

    @BeforeMethod
    public void setup()
            throws MalformedObjectNameException
    {
        nodeInfo = new NodeInfo("test-application", new NodeConfig()
                .setEnvironment("test_environment")
                .setNodeInternalHostname("test.hostname")
                .setPool("test_pool")
        );
View Full Code Here

    }

    @Test
    public void testBuilderNodeInfo()
    {
        NodeInfo nodeInfo = new NodeInfo("test-application", new NodeConfig().setEnvironment("test").setPool("pool"));

        ServiceDescriptor expected = new ServiceDescriptor(
                UUID.fromString("12345678-1234-1234-1234-123456789012"),
                nodeInfo.getNodeId(),
                "type",
View Full Code Here

    @Test
    public void testDefaultToNodePool()
    {
        serviceSelector = new CachingServiceSelector("apple",
                new ServiceSelectorConfig(),
                new NodeInfo("test-application", new NodeConfig().setEnvironment("environment").setPool("nodepool")));
        assertEquals(serviceSelector.getType(), "apple");
        assertEquals(serviceSelector.getPool(), "nodepool");
    }
View Full Code Here

        discoveryClient.addDiscoveredService(DIFFERENT_TYPE);
        discoveryClient.addDiscoveredService(DIFFERENT_POOL);

        updater = new ServiceDescriptorsUpdater(serviceSelector, "apple",
                new ServiceSelectorConfig(),
                new NodeInfo("test-application", new NodeConfig().setEnvironment("environment").setPool("pool")),
                discoveryClient,
                executor);
        updater.start();

        Thread.sleep(100);
View Full Code Here

TOP

Related Classes of com.proofpoint.node.NodeConfig

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.