de.grogra.imp.net
public class SimpleResponseHandler extends java.lang.Object implements ResponseHandler
| Modifier and Type | Field and Description |
|---|---|
static int |
INT |
static int |
LONG |
static int |
STRING |
static int |
USER |
| Constructor and Description |
|---|
SimpleResponseHandler(int type) |
| Modifier and Type | Method and Description |
|---|---|
void |
consume(int value) |
int |
getInt() |
long |
getLong() |
java.lang.String |
getString() |
void |
handleResponse(Connection cx,
long requestId,
long responseId) |
protected void |
handleUserResponse(Connection cx,
long requestId,
long responseId) |
void |
waitForResult() |
void |
waitForResultWrapInterruption() |
public static final int INT
public static final int LONG
public static final int STRING
public static final int USER
public void consume(int value)
throws java.lang.InterruptedException,
java.io.IOException
java.lang.InterruptedExceptionjava.io.IOExceptionpublic int getInt()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic long getLong()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic java.lang.String getString()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void handleResponse(Connection cx, long requestId, long responseId) throws java.io.IOException
handleResponse in interface ResponseHandlerjava.io.IOExceptionprotected void handleUserResponse(Connection cx, long requestId, long responseId) throws java.io.IOException
java.io.IOExceptionpublic void waitForResult()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void waitForResultWrapInterruption()
throws java.io.IOException
java.io.IOException