Class ServiceUtils


  • public class ServiceUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ServiceUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void sendRespAndDone​(org.apache.eventmesh.common.protocol.grpc.common.StatusCode code, java.lang.String message, EventEmitter<org.apache.eventmesh.common.protocol.grpc.protos.Response> emitter)  
      static void sendRespAndDone​(org.apache.eventmesh.common.protocol.grpc.common.StatusCode code, EventEmitter<org.apache.eventmesh.common.protocol.grpc.protos.Response> emitter)  
      static void sendStreamResp​(org.apache.eventmesh.common.protocol.grpc.protos.RequestHeader header, org.apache.eventmesh.common.protocol.grpc.common.StatusCode code, java.lang.String message, EventEmitter<org.apache.eventmesh.common.protocol.grpc.protos.SimpleMessage> emitter)  
      static void sendStreamRespAndDone​(org.apache.eventmesh.common.protocol.grpc.protos.RequestHeader header, org.apache.eventmesh.common.protocol.grpc.common.StatusCode code, java.lang.String message, EventEmitter<org.apache.eventmesh.common.protocol.grpc.protos.SimpleMessage> emitter)  
      static void sendStreamRespAndDone​(org.apache.eventmesh.common.protocol.grpc.protos.RequestHeader header, org.apache.eventmesh.common.protocol.grpc.common.StatusCode code, EventEmitter<org.apache.eventmesh.common.protocol.grpc.protos.SimpleMessage> emitter)  
      static boolean validateBatchMessage​(org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage batchMessage)  
      static boolean validateHeader​(org.apache.eventmesh.common.protocol.grpc.protos.RequestHeader header)  
      static boolean validateHeartBeat​(org.apache.eventmesh.common.protocol.grpc.protos.Heartbeat heartbeat)  
      static boolean validateMessage​(org.apache.eventmesh.common.protocol.grpc.protos.SimpleMessage message)  
      static boolean validateSubscription​(GrpcType grpcType, org.apache.eventmesh.common.protocol.grpc.protos.Subscription subscription)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServiceUtils

        public ServiceUtils()
    • Method Detail

      • validateHeader

        public static boolean validateHeader​(org.apache.eventmesh.common.protocol.grpc.protos.RequestHeader header)
      • validateMessage

        public static boolean validateMessage​(org.apache.eventmesh.common.protocol.grpc.protos.SimpleMessage message)
      • validateBatchMessage

        public static boolean validateBatchMessage​(org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage batchMessage)
      • validateSubscription

        public static boolean validateSubscription​(GrpcType grpcType,
                                                   org.apache.eventmesh.common.protocol.grpc.protos.Subscription subscription)
      • validateHeartBeat

        public static boolean validateHeartBeat​(org.apache.eventmesh.common.protocol.grpc.protos.Heartbeat heartbeat)
      • sendRespAndDone

        public static void sendRespAndDone​(org.apache.eventmesh.common.protocol.grpc.common.StatusCode code,
                                           EventEmitter<org.apache.eventmesh.common.protocol.grpc.protos.Response> emitter)
      • sendRespAndDone

        public static void sendRespAndDone​(org.apache.eventmesh.common.protocol.grpc.common.StatusCode code,
                                           java.lang.String message,
                                           EventEmitter<org.apache.eventmesh.common.protocol.grpc.protos.Response> emitter)
      • sendStreamResp

        public static void sendStreamResp​(org.apache.eventmesh.common.protocol.grpc.protos.RequestHeader header,
                                          org.apache.eventmesh.common.protocol.grpc.common.StatusCode code,
                                          java.lang.String message,
                                          EventEmitter<org.apache.eventmesh.common.protocol.grpc.protos.SimpleMessage> emitter)
      • sendStreamRespAndDone

        public static void sendStreamRespAndDone​(org.apache.eventmesh.common.protocol.grpc.protos.RequestHeader header,
                                                 org.apache.eventmesh.common.protocol.grpc.common.StatusCode code,
                                                 java.lang.String message,
                                                 EventEmitter<org.apache.eventmesh.common.protocol.grpc.protos.SimpleMessage> emitter)
      • sendStreamRespAndDone

        public static void sendStreamRespAndDone​(org.apache.eventmesh.common.protocol.grpc.protos.RequestHeader header,
                                                 org.apache.eventmesh.common.protocol.grpc.common.StatusCode code,
                                                 EventEmitter<org.apache.eventmesh.common.protocol.grpc.protos.SimpleMessage> emitter)