use of jp.ossc.nimbus.service.publish.tcp.StartReceiveMessage in project nimbus by nimbus-org.
the class ClientConnectionImpl method startReceive.
private void startReceive(long from, boolean isRestart) throws MessageSendException {
if (socket == null) {
throw new MessageSendException("Not connected.");
}
if (!isRestart && isStartReceive) {
return;
}
try {
isStartReceive = true;
send(new StartReceiveMessage(from), isAcknowledge);
} catch (SocketTimeoutException e) {
isStartReceive = false;
throw new MessageSendException(e);
} catch (SocketException e) {
isStartReceive = false;
throw new MessageSendException(e);
} catch (IOException e) {
isStartReceive = false;
throw new MessageSendException(e);
} catch (ClassNotFoundException e) {
isStartReceive = false;
throw new MessageSendException(e);
}
}
Aggregations