Examples of bind()


Examples of com.google.code.yanf4j.nio.TCPController.bind()

  @Test
  public void testFailureMode_HasStandbyNode() throws Exception {
    TCPController memServer1 = new TCPController();
    memServer1.setHandler(new MockHandler("response from server1"));
    memServer1.setCodecFactory(new TextLineCodecFactory());
    memServer1.bind(new InetSocketAddress(4799));

    TCPController memServer2 = new TCPController();
    memServer2.setHandler(new MockHandler("response from server2"));
    memServer2.setCodecFactory(new TextLineCodecFactory());
    memServer2.bind(new InetSocketAddress(4798));
View Full Code Here

Examples of com.google.inject.Binder.bind()

      final Binding<T> binding, Binder binder, final Key<T> key) {
    final Binder sourcedBinder = binder.withSource(binding.getSource());

    return binding.acceptTargetVisitor(new BindingTargetVisitor<T, ScopedBindingBuilder>() {
      public ScopedBindingBuilder visit(InstanceBinding<? extends T> binding) {
        sourcedBinder.bind(key).toInstance(binding.getInstance());
        return null;
      }

      public ScopedBindingBuilder visit(ProviderInstanceBinding<? extends T> binding) {
        return sourcedBinder.bind(key).toProvider(binding.getProviderInstance());
View Full Code Here

Examples of com.google.inject.PrivateBinder.bind()

        new AbstractModule() {
          protected void configure() {
            PrivateBinder one = binder().newPrivateBinder();
            one.expose(ArrayList.class);
            one.expose(Collection.class).annotatedWith(SampleAnnotation.class);
            one.bind(List.class).to(ArrayList.class);

            PrivateBinder two = binder().withSource("1 ElementsTest.java")
                .newPrivateBinder().withSource("2 ElementsTest.java");
            two.expose(String.class).annotatedWith(Names.named("a"));
            two.expose(b);
View Full Code Here

Examples of com.google.sitebricks.binding.RequestBinder.bind()

        .anyTimes();

    expect(pageBook.get("/thing"))
        .andReturn(page);

    binder.bind(request, pageOb);
    expectLastCall().once();

    expect(page.isHeadless())
        .andReturn(false);
View Full Code Here

Examples of com.googlecode.protobuf.pro.duplex.server.DuplexTcpServerBootstrap.bind()

                log.debug("Connect with {}", clientChannel.getPeerInfo());
            }
        };
        bootstrap.registerConnectionEventListener(listener);

        bootstrap.bind();
    }

    public static String getBasePath() {
        return basePath;
    }
View Full Code Here

Examples of com.hazelcast.client.impl.ClientEngineImpl.bind()

            }
        }

        endpoint.authenticated(principal, credentials, ownerConnection);
        clientEngine.getEndpointManager().registerEndpoint(endpoint);
        clientEngine.bind(endpoint);
        return new SerializableCollection(serializationService.toData(clientEngine.getThisAddress())
                , serializationService.toData(principal));
    }

    private String getUuid() {
View Full Code Here

Examples of com.hazelcast.nio.TcpIpConnectionManager.bind()

    void bind(final ClientEndpoint endpoint) {
        final Connection conn = endpoint.getConnection();
        if (conn instanceof TcpIpConnection) {
            Address address = new Address(conn.getRemoteSocketAddress());
            TcpIpConnectionManager connectionManager = (TcpIpConnectionManager) node.getConnectionManager();
            connectionManager.bind((TcpIpConnection) conn, address, null, false);
        }
        sendClientEvent(endpoint);
    }

    private void sendClientEvent(ClientEndpoint endpoint) {
View Full Code Here

Examples of com.hazelcast.nio.tcp.TcpIpConnectionManager.bind()

    void bind(final ClientEndpoint endpoint) {
        final Connection conn = endpoint.getConnection();
        if (conn instanceof TcpIpConnection) {
            Address address = new Address(conn.getRemoteSocketAddress());
            TcpIpConnectionManager connectionManager = (TcpIpConnectionManager) node.getConnectionManager();
            connectionManager.bind((TcpIpConnection) conn, address, null, false);
        }
        sendClientEvent(endpoint);
    }

    void sendClientEvent(ClientEndpoint endpoint) {
View Full Code Here

Examples of com.higherfrequencytrading.affinity.AffinityLock.bind()

        final AffinityLock al2 = al.acquireLock(AffinityStrategies.SAME_SOCKET, AffinityStrategies.DIFFERENT_CORE);

        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                al2.bind();
                try {
                    StringBuilder sb = new StringBuilder();
                    final IntIndexedChronicle tsc = new IntIndexedChronicle(basePath);
                    tsc.useUnsafe(USE_UNSAFE);
                    final IntIndexedChronicle tsc2 = new IntIndexedChronicle(basePath2);
View Full Code Here

Examples of com.hp.hpl.jena.reasoner.Reasoner.bind()

     *
     * @param model the Model containing both instance data and schema assertions to be inferenced over
     */
    public static InfModel createRDFSModel(Model model) {
         Reasoner reasoner = ReasonerRegistry.getRDFSReasoner();
         InfGraph graph = reasoner.bind( model.getGraph() );
         return new InfModelImpl( graph );
    }

    /**
     * Return a Model through which all the RDFS entailments
View Full Code Here
TOP
Copyright © 2015 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.