org.vertx.java.core.net.impl

## Class ConnectionBase

- java.lang.Object
- - org.vertx.java.core.net.impl.ConnectionBase

Direct Known Subclasses:
  AbstractConnection, NetSocket

    public abstract class ConnectionBase
    extends java.lang.Object

Abstract base class for TCP connections.

### Field Summary

Fields
`protected org.jboss.netty.channel.Channel` `channel`
`protected Handler<java.lang.Void>` `closedHandler`
`protected Context` `context`
`protected Handler<java.lang.Exception>` `exceptionHandler`
`protected VertxInternal` `vertx`

### Constructor Summary

Constructors
`protected` `ConnectionBase(VertxInternal vertx, org.jboss.netty.channel.Channel channel, Context context)`

### Method Summary

Methods
`protected void` `addFuture(Handler<java.lang.Void> doneHandler, org.jboss.netty.channel.ChannelFuture future)`
`void` `close()` Close the connection
`void` `closedHandler(Handler<java.lang.Void> handler)` Set a closed handler on the connection
`void` `exceptionHandler(Handler<java.lang.Exception> handler)` Set an exception handler on the connection
`protected Context` `getContext()`
`protected void` `handleClosed()`
`protected void` `handleException(java.lang.Exception e)`
`protected void` `handleHandlerException(java.lang.Throwable t)`
`protected boolean` `isSSL()`
`void` `pause()` Pause the connection, see `ReadStream.pause()`
`void` `resume()` Resume the connection, see `ReadStream.resume()`
`protected org.jboss.netty.channel.ChannelFuture` `sendFile(java.io.File file)`
`protected void` `setContext()`
`void` `setWriteQueueMaxSize(int size)` Set the max size for the write queue, see `WriteStream.setWriteQueueMaxSize(int)`
`boolean` `writeQueueFull()` Is the write queue full?, see `WriteStream.writeQueueFull()`

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

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

### Field Detail

#### vertx

    protected final VertxInternal vertx

#### channel

    protected final org.jboss.netty.channel.Channel channel

#### context

    protected final Context context

#### exceptionHandler

    protected Handler<java.lang.Exception> exceptionHandler

#### closedHandler

    protected Handler<java.lang.Void> closedHandler

### Constructor Detail

#### ConnectionBase

    protected ConnectionBase(VertxInternal vertx,
                  org.jboss.netty.channel.Channel channel,
                  Context context)

### Method Detail

#### pause

    public void pause()

Pause the connection, see `ReadStream.pause()`

#### resume

    public void resume()

Resume the connection, see `ReadStream.resume()`

#### setWriteQueueMaxSize

    public void setWriteQueueMaxSize(int size)

Set the max size for the write queue, see `WriteStream.setWriteQueueMaxSize(int)`

#### writeQueueFull

    public boolean writeQueueFull()

Is the write queue full?, see `WriteStream.writeQueueFull()`

#### close

    public void close()

Close the connection

#### exceptionHandler

    public void exceptionHandler(Handler<java.lang.Exception> handler)

Set an exception handler on the connection

#### closedHandler

    public void closedHandler(Handler<java.lang.Void> handler)

Set a closed handler on the connection

#### getContext

    protected Context getContext()

#### handleException

    protected void handleException(java.lang.Exception e)

#### handleClosed

    protected void handleClosed()

#### addFuture

    protected void addFuture(Handler<java.lang.Void> doneHandler,
                 org.jboss.netty.channel.ChannelFuture future)

#### setContext

    protected void setContext()

#### handleHandlerException

    protected void handleHandlerException(java.lang.Throwable t)

#### isSSL

    protected boolean isSSL()

#### sendFile

    protected org.jboss.netty.channel.ChannelFuture sendFile(java.io.File file)