# Class ClientServerConnection

java.lang.Object
java.lang.Thread
com.sparshui.client.ClientServerConnection

All Implemented Interfaces:
  `Runnable`

public class ClientServerConnection extends Thread
Represents the connection to the GestureServer.

Author:
  Jay Roltgen

## Nested Class Summary

### Nested classes/interfaces inherited from class Thread

`Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler`

## Field Summary

### Fields inherited from class Thread

`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

## Constructor Summary

Constructors
Constructor
Description
`ClientServerConnection(String address, SparshClient client)`
Instantiate a Server Connection object.

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`void`
`run()`
Begin processing requests.

### Methods inherited from class Thread

`activeCount, checkAccess, clone, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, threadId, toString, yield`

### Methods inherited from class Object

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

## Constructor Details

### ClientServerConnection

public ClientServerConnection(String address, SparshClient client) throws UnknownHostException, IOException
Instantiate a Server Connection object.

Parameters:
  `address` - The ip address of the server to connect to.
  `client` - The client object that the gesture client is using to listen for messages from the server.
Throws:
  `UnknownHostException` - If "address" is an unknwown host.
  `IOException` - If a communication error ocurrs.

## Method Details

### run

public void run()
Begin processing requests.

Specified by:
  `run` in interface `Runnable`
Overrides:
  `run` in class `Thread`

### close

public void close()