Package net.mcbrawls.inject.jetty
Class JettyInjector
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
net.mcbrawls.inject.api.Injector
net.mcbrawls.inject.jetty.JettyInjector
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,io.netty.channel.ChannelOutboundHandler
public class JettyInjector
extends net.mcbrawls.inject.api.Injector
Represents an injector which handles Jetty requests.
This also needs to be registered!
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Constructor Summary
ConstructorsConstructorDescriptionJettyInjector(org.eclipse.jetty.server.LocalConnector connector) Creates a new Jetty injector which handles requests for the given connector. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisRelevant(net.mcbrawls.inject.api.InjectorContext ctx, net.mcbrawls.inject.api.PacketDirection direction) booleanonRead(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buf) Methods inherited from class net.mcbrawls.inject.api.Injector
channelRead, onWrite, writeMethods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, readMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Constructor Details
-
JettyInjector
public JettyInjector(org.eclipse.jetty.server.LocalConnector connector) Creates a new Jetty injector which handles requests for the given connector.- Parameters:
connector- the Jetty connector
-
-
Method Details
-
isRelevant
public boolean isRelevant(net.mcbrawls.inject.api.InjectorContext ctx, net.mcbrawls.inject.api.PacketDirection direction) - Overrides:
isRelevantin classnet.mcbrawls.inject.api.Injector
-
onRead
public boolean onRead(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buf) throws Exception - Overrides:
onReadin classnet.mcbrawls.inject.api.Injector- Throws:
Exception
-