Search in sources :

Example 1 with StopReceiveMessage

use of jp.ossc.nimbus.service.publish.tcp.StopReceiveMessage in project nimbus by nimbus-org.

the class ClientConnectionImpl method stopReceive.

public void stopReceive() throws MessageSendException {
    if (socket == null) {
        throw new MessageSendException("Not connected.");
    }
    if (!isStartReceive) {
        return;
    }
    try {
        send(new StopReceiveMessage(), isAcknowledge);
        isStartReceive = false;
    } catch (SocketTimeoutException e) {
        throw new MessageSendException(e);
    } catch (SocketException e) {
        throw new MessageSendException(e);
    } catch (IOException e) {
        throw new MessageSendException(e);
    } catch (ClassNotFoundException e) {
        throw new MessageSendException(e);
    }
}
Also used : SocketException(java.net.SocketException) MessageSendException(jp.ossc.nimbus.service.publish.MessageSendException) SocketTimeoutException(java.net.SocketTimeoutException) StopReceiveMessage(jp.ossc.nimbus.service.publish.tcp.StopReceiveMessage) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 SocketException (java.net.SocketException)1 SocketTimeoutException (java.net.SocketTimeoutException)1 MessageSendException (jp.ossc.nimbus.service.publish.MessageSendException)1 StopReceiveMessage (jp.ossc.nimbus.service.publish.tcp.StopReceiveMessage)1