Examples of ClientConnection


Examples of chatbot.client.ClientConnection

  private static final String NICKNAME = "Reddit";

  private final RedditBot chatBot;

  public static void main(String[] args) {
    ClientConnection clientConnection = new PircClientConnection("irc.uk.quakenet.org", 6667, NICKNAME, "lolomg");
    RedditIrc ircBot = new RedditIrc(clientConnection, "#bhynjk");
    ircBot.start();
  }
View Full Code Here

Examples of chatroom.connection.ClientConnection

            @Override
            public void actionPerformed(ActionEvent ae) {
                try {
                    // establish connection
                    clientConnection = new ClientConnection(login.getServer(),
                            Integer.valueOf(login.getPort()));
                    clientConnection.start();
                } catch (IOException ex) {
                    Logger.getLogger(ChatroomClient.class.getName()).log(Level.SEVERE, null, ex);
                    return;
View Full Code Here

Examples of com.hazelcast.client.connection.nio.ClientConnection

    public Xid[] recover() {
        final SerializationService serializationService = client.getSerializationService();
        final ClientInvocationServiceImpl invocationService = (ClientInvocationServiceImpl) client.getInvocationService();
        final Xid[] empty = new Xid[0];
        try {
            final ClientConnection connection = connect();
            if (connection == null) {
                return empty;
            }
            final RecoverAllTransactionsRequest request = new RecoverAllTransactionsRequest();
            final ICompletableFuture<SerializableCollection> future = invocationService.send(request, connection);
View Full Code Here

Examples of com.hazelcast.client.connection.nio.ClientConnection

    }

    public boolean recover(Xid xid, boolean commit) {
        final SerializableXID sXid = new SerializableXID(xid.getFormatId(),
                xid.getGlobalTransactionId(), xid.getBranchQualifier());
        final ClientConnection connection = recoveredTransactions.remove(sXid);
        if (connection == null) {
            return false;
        }
        final ClientInvocationServiceImpl invocationService = (ClientInvocationServiceImpl) client.getInvocationService();
        final RecoverTransactionRequest request = new RecoverTransactionRequest(sXid, commit);
View Full Code Here

Examples of com.hazelcast.client.connection.nio.ClientConnection

        request.setSingleConnection();
        return doSend(request, connection, null);
    }

    public Future reSend(ClientCallFuture future) throws Exception {
        final ClientConnection connection = connectionManager.tryToConnect(null);
        _send(future, connection);
        return future;
    }
View Full Code Here

Examples of com.hazelcast.client.connection.nio.ClientConnection


    //NIO private

    private ICompletableFuture send(ClientRequest request) throws Exception {
        final ClientConnection connection = connectionManager.tryToConnect(null);
        return doSend(request, connection, null);
    }
View Full Code Here

Examples of com.hazelcast.client.connection.nio.ClientConnection

        final ClientConnection connection = connectionManager.tryToConnect(null);
        return doSend(request, connection, null);
    }

    private ICompletableFuture send(ClientRequest request, Address target) throws Exception {
        final ClientConnection connection = connectionManager.tryToConnect(target);
        return doSend(request, connection, null);
    }
View Full Code Here

Examples of com.hazelcast.client.connection.nio.ClientConnection

        final ClientConnection connection = connectionManager.tryToConnect(target);
        return doSend(request, connection, null);
    }

    private ICompletableFuture sendAndHandle(ClientRequest request, EventHandler handler) throws Exception {
        final ClientConnection connection = connectionManager.tryToConnect(null);
        return doSend(request, connection, handler);
    }
View Full Code Here

Examples of com.hazelcast.client.connection.nio.ClientConnection

        final ClientConnection connection = connectionManager.tryToConnect(null);
        return doSend(request, connection, handler);
    }

    private ICompletableFuture sendAndHandle(ClientRequest request, Address target, EventHandler handler) throws Exception {
        final ClientConnection connection = connectionManager.tryToConnect(target);
        return doSend(request, connection, handler);
    }
View Full Code Here

Examples of com.hazelcast.client.connection.nio.ClientConnection

        return Clock.currentTimeMillis();
    }

    public Client getLocalClient() {
        ClientPrincipal cp = connectionManager.getPrincipal();
        ClientConnection conn = clusterThread.conn;
        return new ClientImpl(cp != null ? cp.getUuid() : null, conn != null ? conn.getLocalSocketAddress() : null);
    }
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.