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

    Constructors
    Constructor
    Description
    JettyInjector(org.eclipse.jetty.server.LocalConnector connector)
    Creates a new Jetty injector which handles requests for the given connector.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isRelevant(net.mcbrawls.inject.api.InjectorContext ctx, net.mcbrawls.inject.api.PacketDirection direction)
     
    boolean
    onRead(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buf)
     

    Methods inherited from class net.mcbrawls.inject.api.Injector

    channelRead, onWrite, write

    Methods inherited from class io.netty.channel.ChannelDuplexHandler

    bind, close, connect, deregister, disconnect, flush, read

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerAdded, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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:
      isRelevant in class net.mcbrawls.inject.api.Injector
    • onRead

      public boolean onRead(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buf) throws Exception
      Overrides:
      onRead in class net.mcbrawls.inject.api.Injector
      Throws:
      Exception