void operationFailed(final String processName, final ProcessMessageHandler.OperationType operationType) { synchronized (lock) { for (Connection connection : managedConnections) { try { final OutputStream os = connection.writeMessage(); try { os.write(Protocol.OPERATION_FAILED); os.write(operationType.getCode()); StreamUtils.writeUTFZBytes(os, processName); os.close(); } finally { StreamUtils.safeClose(os); } } catch (IOException e) { ROOT_LOGGER.failedToWriteMessage("OPERATION_FAILED", e); removeManagedConnection(connection); } } } }
void operationFailed(final String processName, final ProcessMessageHandler.OperationType operationType) { synchronized (lock) { for (Connection connection : managedConnections) { try { final OutputStream os = connection.writeMessage(); try { os.write(Protocol.OPERATION_FAILED); os.write(operationType.getCode()); StreamUtils.writeUTFZBytes(os, processName); os.close(); } finally { StreamUtils.safeClose(os); } } catch (IOException e) { ProcessLogger.ROOT_LOGGER.failedToWriteMessage("OPERATION_FAILED", e); removeManagedConnection(connection); } } } }
void operationFailed(final String processName, final ProcessMessageHandler.OperationType operationType) { synchronized (lock) { for (Connection connection : managedConnections) { try { final OutputStream os = connection.writeMessage(); try { os.write(Protocol.OPERATION_FAILED); os.write(operationType.getCode()); StreamUtils.writeUTFZBytes(os, processName); os.close(); } finally { StreamUtils.safeClose(os); } } catch (IOException e) { ProcessLogger.ROOT_LOGGER.failedToWriteMessage("OPERATION_FAILED", e); removeManagedConnection(connection); } } } }
try { os.write(Protocol.OPERATION_FAILED); os.write(operationType.getCode()); StreamUtils.writeUTFZBytes(os, processName); os.close();
try { os.write(Protocol.OPERATION_FAILED); os.write(operationType.getCode()); StreamUtils.writeUTFZBytes(os, processName); os.close();
try { os.write(Protocol.OPERATION_FAILED); os.write(operationType.getCode()); StreamUtils.writeUTFZBytes(os, processName); os.close();
static OperationType fromCode(int code) { for(OperationType type : values()) { if( type.getCode() == code) { return type; } } return null; } }
static OperationType fromCode(int code) { for(OperationType type : values()) { if( type.getCode() == code) { return type; } } return null; } }
static OperationType fromCode(int code) { for(OperationType type : values()) { if( type.getCode() == code) { return type; } } return null; } }