SimpleClient (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.transport

## Class SimpleClient

- java.lang.Object
- - org.apache.cassandra.transport.SimpleClient

- Direct Known Subclasses:
    Client

      public class SimpleClient
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected io.netty.bootstrap.Bootstrap` | `bootstrap`
    `protected io.netty.channel.Channel` | `channel`
    `protected Connection` | `connection`
    `java.lang.String` | `host`
    `protected io.netty.channel.ChannelFuture` | `lastWriteFuture`
    `int` | `port`
    `protected org.apache.cassandra.transport.SimpleClient.ResponseHandler` | `responseHandler`
    `protected Connection.Tracker` | `tracker`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleClient(java.lang.String host, int port)`
    `SimpleClient(java.lang.String host, int port, EncryptionOptions.ClientEncryptionOptions encryptionOptions)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `connect(boolean useCompression)`
    `protected void` | `establishConnection()`
    `protected Message.Response` | `execute(Message.Request request)`
    `ResultMessage` | `execute(java.lang.String query, ConsistencyLevel consistency)`
    `ResultMessage` | `execute(java.lang.String query, java.util.List<java.nio.ByteBuffer> values, ConsistencyLevel consistencyLevel)`
    `ResultMessage` | `executePrepared(byte[] statementId, java.util.List<java.nio.ByteBuffer> values, ConsistencyLevel consistency)`
    `void` | `login(java.util.Map<java.lang.String,java.lang.String> credentials)`
    `ResultMessage.Prepared` | `prepare(java.lang.String query)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### host

          public final java.lang.String host

    - #### port

          public final int port

    - #### responseHandler

          protected final org.apache.cassandra.transport.SimpleClient.ResponseHandler responseHandler

    - #### tracker

          protected final Connection.Tracker tracker

    - #### connection

          protected final Connection connection

    - #### bootstrap

          protected io.netty.bootstrap.Bootstrap bootstrap

    - #### channel

          protected io.netty.channel.Channel channel

    - #### lastWriteFuture

          protected io.netty.channel.ChannelFuture lastWriteFuture

  - ### Constructor Detail

    - #### SimpleClient

          public SimpleClient(java.lang.String host,
                      int port,
                      EncryptionOptions.ClientEncryptionOptions encryptionOptions)

    - #### SimpleClient

          public SimpleClient(java.lang.String host,
                      int port)

  - ### Method Detail

    - #### connect

          public void connect(boolean useCompression)
                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### establishConnection

          protected void establishConnection()
                                      throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### login

          public void login(java.util.Map<java.lang.String,java.lang.String> credentials)

    - #### execute

          public ResultMessage execute(java.lang.String query,
                              ConsistencyLevel consistency)

    - #### execute

          public ResultMessage execute(java.lang.String query,
                              java.util.List<java.nio.ByteBuffer> values,
                              ConsistencyLevel consistencyLevel)

    - #### prepare

          public ResultMessage.Prepared prepare(java.lang.String query)

    - #### executePrepared

          public ResultMessage executePrepared(byte[] statementId,
                                      java.util.List<java.nio.ByteBuffer> values,
                                      ConsistencyLevel consistency)

    - #### close

          public void close()

    - #### execute

          protected Message.Response execute(Message.Request request)

Copyright © 2014 The Apache Software Foundation