Class Utils
- java.lang.Object
-
- org.apache.eventmesh.runtime.util.Utils
-
public class Utils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetServiceId(java.lang.String topic)get serviceId according to topicstatic voidlogFailedMessageFlow(io.netty.channel.ChannelFuture future, org.apache.eventmesh.common.protocol.tcp.Package pkg, org.apache.eventmesh.common.protocol.tcp.UserAgent user, long startTime, long taskExecuteTime)print the message flow of failed sendingstatic voidlogSucceedMessageFlow(org.apache.eventmesh.common.protocol.tcp.Package pkg, org.apache.eventmesh.common.protocol.tcp.UserAgent user, long startTime, long taskExecuteTime)print the message flow of successful sending.static java.util.Map<java.lang.String,java.lang.Object>parseHttpHeader(io.netty.handler.codec.http.HttpRequest fullReq)parse http headerstatic java.lang.StringprintMqMessage(org.apache.eventmesh.common.protocol.tcp.EventMeshMessage eventMeshMessage)print part of the mq messagestatic voidwriteAndFlush(org.apache.eventmesh.common.protocol.tcp.Package pkg, long startTime, long taskExecuteTime, io.netty.channel.ChannelHandlerContext ctx, Session session)used to send messages to the client
-
-
-
Method Detail
-
writeAndFlush
public static void writeAndFlush(org.apache.eventmesh.common.protocol.tcp.Package pkg, long startTime, long taskExecuteTime, io.netty.channel.ChannelHandlerContext ctx, Session session)used to send messages to the client- Parameters:
pkg-startTime-ctx-session-
-
logFailedMessageFlow
public static void logFailedMessageFlow(io.netty.channel.ChannelFuture future, org.apache.eventmesh.common.protocol.tcp.Package pkg, org.apache.eventmesh.common.protocol.tcp.UserAgent user, long startTime, long taskExecuteTime)print the message flow of failed sending- Parameters:
future-pkg-user-startTime-
-
logSucceedMessageFlow
public static void logSucceedMessageFlow(org.apache.eventmesh.common.protocol.tcp.Package pkg, org.apache.eventmesh.common.protocol.tcp.UserAgent user, long startTime, long taskExecuteTime)print the message flow of successful sending.- Parameters:
pkg-user-startTime-
-
printMqMessage
public static java.lang.String printMqMessage(org.apache.eventmesh.common.protocol.tcp.EventMeshMessage eventMeshMessage)
print part of the mq message- Parameters:
eventMeshMessage-- Returns:
-
getServiceId
public static java.lang.String getServiceId(java.lang.String topic)
get serviceId according to topic
-
parseHttpHeader
public static java.util.Map<java.lang.String,java.lang.Object> parseHttpHeader(io.netty.handler.codec.http.HttpRequest fullReq)
parse http header- Parameters:
fullReq- request parameter- Returns:
- http header
-
-