public static JpsRemoteProto.Message toMessage( final UUID sessionId, JpsRemoteProto.Message.Request request) { return JpsRemoteProto.Message.newBuilder() .setSessionId(toProtoUUID(sessionId)) .setMessageType(JpsRemoteProto.Message.Type.REQUEST) .setRequest(request) .build(); }
public static JpsRemoteProto.Message toMessage( final UUID sessionId, JpsRemoteProto.Message.Failure failure) { return JpsRemoteProto.Message.newBuilder() .setSessionId(toProtoUUID(sessionId)) .setMessageType(JpsRemoteProto.Message.Type.FAILURE) .setFailure(failure) .build(); }
public static JpsRemoteProto.Message toMessage( final UUID sessionId, JpsRemoteProto.Message.Response response) { return JpsRemoteProto.Message.newBuilder() .setSessionId(toProtoUUID(sessionId)) .setMessageType(JpsRemoteProto.Message.Type.RESPONSE) .setResponse(response) .build(); }