Package be.demmel.jgws.packets.serialization

Examples of be.demmel.jgws.packets.serialization.PacketDeserializer


    case READ_HEADER: // the body has yet to be decoded
      LOGGER.debug("Decode body");
      // now parse the body of a packet (if there are enough bytes to do so)
      // Find the correct PacketDeserializer for this packet (using the unique header)
      header = ctx.attr(HEADER).get();
      PacketDeserializer packetDeserializer = packetDeserializers.get(header);
      // If the PacketDeserializer corresponding to the header cannot be found, processing cannot continue
      if (packetDeserializer == null) {
        String msg = "No suitable PacketDeserializer found for header: " + header;
        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);
      }
     
View Full Code Here


    for (Class<? extends Packet> packetClass : packetClasses) {
      LOGGER.info("Creating deserializer for packet class: {}", packetClass);

      int header = extractHeader(packetClass);

      PacketDeserializer packetDeserializer = packetDeserializers.get(header);

      if (packetDeserializer == null) {
        packetDeserializer = new ReflectionPacketDeserializer(header, packetClass);
        packetDeserializers.put(header, packetDeserializer);
      } else {
View Full Code Here

TOP

Related Classes of be.demmel.jgws.packets.serialization.PacketDeserializer

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.