public abstract class SocketSerializableHandler extends SocketHandler
| 限定符和类型 | 字段和说明 |
|---|---|
protected static boolean |
DEBUG |
protected static int |
RECEIVE_MESSAGE |
CONNECTED_MESSAGE, DISCONNECTED_MESSAGE, FAIL_MESSAGE, isInterrupted, readLocker, START_MESSAGE, writeLocker| 构造器和说明 |
|---|
SocketSerializableHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
handleMessage(Message msg) |
protected void |
handleReceiveMessage(Serializable response) |
boolean |
handleSocketRead(DataInputStream inputStream) |
boolean |
handleSocketWrite(DataOutputStream outputStream) |
abstract void |
onReceive(Serializable msg) |
protected Serializable |
read(DataInputStream is) |
void |
sendReceiveMessage(Serializable obj) |
protected void |
write(OutputStream os,
Serializable obj) |
getSend, handleConnectedMessage, handleDisconnectedMessage, handleFailMessage, handleStartMessage, interrupted, isInterrupted, obtainMessage, obtainMessage, onConnected, onDisconnected, onFail, onStart, sendConnectedMessage, sendDisconnectedMessage, sendFailMessage, sendMessage, sendStartMessageprotected static final boolean DEBUG
protected static final int RECEIVE_MESSAGE
public abstract void onReceive(Serializable msg)
public void sendReceiveMessage(Serializable obj)
protected void handleReceiveMessage(Serializable response)
protected void write(OutputStream os, Serializable obj) throws IOException
IOExceptionprotected Serializable read(DataInputStream is) throws IOException, ClassNotFoundException
protected void handleMessage(Message msg)
handleMessage 在类中 SocketHandlerpublic boolean handleSocketWrite(DataOutputStream outputStream) throws IOException
handleSocketWrite 在类中 SocketHandlerIOExceptionpublic boolean handleSocketRead(DataInputStream inputStream) throws IOException, ClassNotFoundException
handleSocketRead 在类中 SocketHandlerIOExceptionClassNotFoundException