public class GzipInterceptor extends ChannelInterceptorBase
ChannelInterceptor.InterceptorEvent| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULT_BUFFER_SIZE | 
optionFlag| Constructor and Description | 
|---|
| GzipInterceptor() | 
| Modifier and Type | Method and Description | 
|---|---|
| static byte[] | compress(byte[] data) | 
| static byte[] | decompress(byte[] data) | 
| void | messageReceived(ChannelMessage msg)the  messageReceivedis invoked when a message is received. | 
| void | sendMessage(Member[] destination,
           ChannelMessage msg,
           InterceptorPayload payload)The  sendMessagemethod is called when a message is being sent to one more destinations. | 
accept, fireInterceptorEvent, getChannel, getLocalMember, getMember, getMembers, getNext, getOptionFlag, getPrevious, hasMembers, heartbeat, memberAdded, memberDisappeared, okToProcess, setChannel, setNext, setOptionFlag, setPrevious, start, stoppublic static final int DEFAULT_BUFFER_SIZE
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException
ChannelInterceptorsendMessage method is called when a message is being sent to one more destinations.
 The interceptor can modify any of the parameters and then pass on the message down the stack by
 invoking getNext().sendMessage(destination,msg,payload)getNext().sendMessage(destination,msg,payload)sendMessage in interface ChannelInterceptorsendMessage in class ChannelInterceptorBasedestination - Member[] - the destination for this messagemsg - ChannelMessage - the message to be sentpayload - InterceptorPayload - the payload, carrying an error handler and future useful data, can be nullChannelException - if a serialization error happens.ErrorHandler, 
InterceptorPayloadpublic void messageReceived(ChannelMessage msg)
ChannelInterceptormessageReceived is invoked when a message is received.
 ChannelMessage.getAddress() is the sender, or the reply-to address
 if it has been overwritten.messageReceived in interface ChannelInterceptormessageReceived in class ChannelInterceptorBasemsg - ChannelMessagepublic static byte[] compress(byte[] data)
                       throws IOException
IOExceptionpublic static byte[] decompress(byte[] data)
                         throws IOException
data - Data to decompressIOExceptionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.