Package edu.caltech.nanodb.client
Class SharedClientState
- java.lang.Object
-
- edu.caltech.nanodb.client.SharedClientState
-
public class SharedClientState extends java.lang.Object
This class represents
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
SharedClientState.Receiver
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.logging.log4j.Logger
logger
private java.io.ObjectInputStream
objectInput
private java.io.ObjectOutputStream
objectOutput
This stream is used to send objects (commands, specifically) to theprivate java.io.PrintStream
out
private boolean
printTuples
private SharedClientState.Receiver
receiver
private java.lang.Thread
receiverThread
This thread receives data from the server asynchronously, and prints out whatever it receives.private Schema
schema
private java.util.concurrent.Semaphore
semCommandDone
private java.net.Socket
socket
private java.util.ArrayList<TupleLiteral>
tuples
-
Constructor Summary
Constructors Constructor Description SharedClientState(java.io.PrintStream out, boolean printTuples)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect(java.lang.String hostname, int port)
void
disconnect()
void
doCommand(java.lang.String commandString)
-
-
-
Field Detail
-
logger
private static org.apache.logging.log4j.Logger logger
-
socket
private java.net.Socket socket
-
objectInput
private java.io.ObjectInputStream objectInput
-
receiver
private SharedClientState.Receiver receiver
-
receiverThread
private java.lang.Thread receiverThread
This thread receives data from the server asynchronously, and prints out whatever it receives.
-
out
private java.io.PrintStream out
-
printTuples
private boolean printTuples
-
semCommandDone
private java.util.concurrent.Semaphore semCommandDone
-
schema
private Schema schema
-
tuples
private java.util.ArrayList<TupleLiteral> tuples
-
objectOutput
private java.io.ObjectOutputStream objectOutput
This stream is used to send objects (commands, specifically) to the
-
-
Method Detail
-
connect
public void connect(java.lang.String hostname, int port) throws java.io.IOException
- Throws:
java.io.IOException
-
doCommand
public void doCommand(java.lang.String commandString) throws java.lang.Exception
- Throws:
java.lang.Exception
-
disconnect
public void disconnect() throws java.io.IOException
- Throws:
java.io.IOException
-
-