io.netty.channel.ChannelOutboundHandler Java Examples

The following examples show how to use io.netty.channel.ChannelOutboundHandler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GatewayConfig.java    From api-gateway-core with Apache License 2.0 4 votes vote down vote up
public void addChannelOutboundHandler(ChannelOutboundHandler channelOutboundHandler) {
    channelOutboundHandlerList.add(channelOutboundHandler);
}
 
Example #2
Source File: GatewayConfig.java    From api-gateway-core with Apache License 2.0 4 votes vote down vote up
public List<ChannelOutboundHandler> getChannelOutboundHandlerList() {
    return channelOutboundHandlerList;
}
 
Example #3
Source File: GatewayConfig.java    From api-gateway-core with Apache License 2.0 4 votes vote down vote up
public void addHttpResponseHandler(ChannelOutboundHandler channelOutboundHandler) {
    httpResponseHandlerList.add(channelOutboundHandler);
}
 
Example #4
Source File: GatewayConfig.java    From api-gateway-core with Apache License 2.0 4 votes vote down vote up
public List<ChannelOutboundHandler> getHttpResponseHandlerList() {
    return httpResponseHandlerList;
}
 
Example #5
Source File: RsfDuplexHandler.java    From hasor with Apache License 2.0 4 votes vote down vote up
public RsfDuplexHandler(ChannelInboundHandler inBoundArray, ChannelOutboundHandler outBoundArray) {
    super(inBoundArray, outBoundArray);
}
 
Example #6
Source File: Connection.java    From reactor-netty with Apache License 2.0 3 votes vote down vote up
/**
 * Add a {@link ChannelHandler} with {@link #addHandlerFirst} if of type of
 * {@link io.netty.channel.ChannelOutboundHandler} otherwise with
 * {@link #addHandlerLast}. Implementation may add more auto handling in particular
 * HTTP based context will prepend an HttpContent body extractor.
 * <p>
 * {@code [ [reactor codecs], [<- user FIRST HANDLERS added here, user LAST HANDLERS added here ->], [reactor handlers] ]}
 * <p>
 * If effectively added, the handler will be safely removed when the channel is made
 * inactive (pool release).
 * As the Connection object is available once the channel is in active state, events prior this state
 * will not be available (i.e. {@code channelRegistered}, {@code initChannel}, {@code channelActive}, etc.)
 *
 * @param name handler name
 * @param handler handler instance
 *
 * @return this Connection
 */
default Connection addHandler(String name, ChannelHandler handler){
	if(handler instanceof ChannelOutboundHandler){
		addHandlerFirst(name, handler);
	}
	else {
		addHandlerLast(name, handler);
	}
	return this;
}