# Class ConnectionBase

java.lang.Object
org.a11y.brlapi.Component
org.a11y.brlapi.NativeComponent
org.a11y.brlapi.ConnectionBase

All Implemented Interfaces:
  `AutoCloseable`

Direct Known Subclasses:
  `Connection`

public class ConnectionBase extends NativeComponent implements AutoCloseable

## Field Summary

### Fields inherited from class Component

`BYTE_MASK, UNICODE_BRAILLE_ROW`

## Constructor Summary

Constructors
Constructor
Description
`ConnectionBase(ConnectionSettings settings)`

## Method Summary

Modifier and Type
Method
Description
`void`
`acceptAllKeys()`
`void`
`acceptKeyRanges(long[][] ranges)`
`void`
`acceptKeys(long type, long[] keys)`
`void`
`close()`
`void`
`enterRawMode(String driver)`
`int`
`enterTtyMode(int tty, String driver)`
`void`
`enterTtyModeWithPath(String driver, int... ttys)`
`final String`
`getAuthenticationScheme()`
`static ConnectionBase`
`getConnection(long handle)`
`DisplaySize`
`getDisplaySize()`
`String`
`getDriverName()`
`final int`
`getFileDescriptor()`
`String`
`getModelIdentifier()`
`Object`
`getParameter(int parameter, long subparam, boolean global)`
`final String`
`getServerHost()`
`void`
`ignoreAllKeys()`
`void`
`ignoreKeyRanges(long[][] ranges)`
`void`
`ignoreKeys(long type, long[] keys)`
`final boolean`
`isUnusable()`
`void`
`leaveRawMode()`
`void`
`leaveTtyMode()`
`void`
`pause(int milliseconds)`
`Long`
`readKey(boolean wait)`
`long`
`readKeyWithTimeout(int milliseconds)`
`int`
`recvRaw(byte[] buffer)`
`int`
`sendRaw(byte[] buffer)`
`void`
`setFocus(int tty)`
`void`
`setParameter(int parameter, long subparam, boolean global, Object value)`
`static void`
`setUnusable(long handle)`
`static void`
`unwatchParameter(long identifier)`
`long`
`watchParameter(int parameter, long subparam, boolean global, ParameterWatcher watcher)`
`void`
`write(WriteArguments arguments)`
`protected void`
`writeDots(byte[] dots)`
`protected void`
`writeText(int cursor, String text)`

### Methods inherited from class Component

`getObjectName, getObjectName, printf, toOperandName, toUnicodeBraille, toUnicodeBraille`

### Methods inherited from class Object

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

## Constructor Details

### ConnectionBase

public ConnectionBase(ConnectionSettings settings) throws ConnectException

Throws:
  `ConnectException`

## Method Details

### getServerHost

public final String getServerHost()

### getAuthenticationScheme

public final String getAuthenticationScheme()

### getFileDescriptor

public final int getFileDescriptor()

### close

public void close()

Specified by:
  `close` in interface `AutoCloseable`

### getConnection

public static ConnectionBase getConnection(long handle)

### setUnusable

public static void setUnusable(long handle)

### isUnusable

public final boolean isUnusable()

### getDriverName

public String getDriverName()

### getModelIdentifier

public String getModelIdentifier()

### getDisplaySize

public DisplaySize getDisplaySize()

### pause

public void pause(int milliseconds) throws InterruptedIOException

Throws:
  `InterruptedIOException`

### enterTtyMode

public int enterTtyMode(int tty, String driver)

### enterTtyModeWithPath

public void enterTtyModeWithPath(String driver, int... ttys)

### leaveTtyMode

public void leaveTtyMode()

### setFocus

public void setFocus(int tty)

### writeText

protected void writeText(int cursor, String text)

### writeDots

protected void writeDots(byte[] dots)

### write

public void write(WriteArguments arguments)

### readKey

public Long readKey(boolean wait) throws InterruptedIOException

Throws:
  `InterruptedIOException`

### readKeyWithTimeout

public long readKeyWithTimeout(int milliseconds) throws InterruptedIOException, TimeoutException

Throws:
  `InterruptedIOException`
  `TimeoutException`

### ignoreKeys

public void ignoreKeys(long type, long[] keys)

### acceptKeys

public void acceptKeys(long type, long[] keys)

### ignoreAllKeys

public void ignoreAllKeys()

### acceptAllKeys

public void acceptAllKeys()

### ignoreKeyRanges

public void ignoreKeyRanges(long[][] ranges)

### acceptKeyRanges

public void acceptKeyRanges(long[][] ranges)

### enterRawMode

public void enterRawMode(String driver)

### leaveRawMode

public void leaveRawMode()

### sendRaw

public int sendRaw(byte[] buffer)

### recvRaw

public int recvRaw(byte[] buffer) throws InterruptedIOException

Throws:
  `InterruptedIOException`

### getParameter

public Object getParameter(int parameter, long subparam, boolean global)

### setParameter

public void setParameter(int parameter, long subparam, boolean global, Object value)

### watchParameter

public long watchParameter(int parameter, long subparam, boolean global, ParameterWatcher watcher)

### unwatchParameter

public static void unwatchParameter(long identifier)