public class NetUtils extends Object
| Constructor and Description |
|---|
NetUtils() |
| Modifier and Type | Method and Description |
|---|---|
static PubSubProtocol.PubSubRequest.Builder |
buildConsumeRequest(long txnId,
TopicSubscriber topicSubscriber,
PubSubProtocol.MessageSeqId messageSeqId)
Build consume request
|
static PubSubProtocol.PubSubRequest.Builder |
buildPubSubRequest(long txnId,
PubSubData pubSubData)
This is a helper method to build the actual pub/sub message.
|
static InetSocketAddress |
getHostFromChannel(org.jboss.netty.channel.Channel channel)
Helper static method to get the String Hostname:Port from a netty
Channel.
|
public static InetSocketAddress getHostFromChannel(org.jboss.netty.channel.Channel channel)
channel - Netty channel to extract the hostname and port from.public static PubSubProtocol.PubSubRequest.Builder buildPubSubRequest(long txnId, PubSubData pubSubData)
txnId - Transaction Id.pubSubData - Publish call's data wrapper object.public static PubSubProtocol.PubSubRequest.Builder buildConsumeRequest(long txnId, TopicSubscriber topicSubscriber, PubSubProtocol.MessageSeqId messageSeqId)
txnId - Transaction Id.topicSubscriber - Topic Subscriber.messageSeqId - Message Seq Id.Copyright © 2011–2021 The Apache Software Foundation. All rights reserved.