Package be.demmel.jgws.packets

Examples of be.demmel.jgws.packets.Packet


  }
 
  @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
    MDC.put("channel", ctx.channel().id().asLongText());
    Packet packet = (Packet) msg;
    LOGGER.debug("Choosing handler for packet {}", packet);
    PacketHandler<Packet, TServerData> packetHandler = this.packetHandlers.get(packet.getClass());
   
    List<QueueAction> actions = new ArrayList<>();
   
    if(packetHandler != null) {
      TServerData serverData = ctx.channel().attr(this.dataKey).get();
View Full Code Here


        LOGGER.error(msg);
        throw new IllegalStateException(msg);
      }

      // Use the PacketUnmarshaller to create a new packet instance
      Packet packet = packetDeserializer.deserialize(in);
     
      if(LOGGER.isInfoEnabled() && !this.logBlackList.contains(packet.getClass())) {
        LOGGER.debug("Decoded body: {}", packet);
      }
     
      out.add(packet);
      checkpoint(PacketDecoderState.READ_NOTHING);
View Full Code Here

  }

  @Override
  public Packet deserialize(ByteBuf dataToDeserialize) {
    LOGGER.debug("Deserializing Packet");
    Packet incomingPacketInstance;
    try { // create a new instance of the packet
      incomingPacketInstance = incomingPacketConstructor.newInstance();
    } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { // should never happen
      LOGGER.error("Unexpected error: ", e);
      throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of be.demmel.jgws.packets.Packet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.