Package org.apache.geronimo.network.protocol

Examples of org.apache.geronimo.network.protocol.PacketFactory


        factories.put(key, factory);
    }

    public UpPacket read(ByteBuffer buffer) throws ProtocolException {
        Integer key = new Integer(buffer.getInt());
        PacketFactory factory = (PacketFactory) factories.get(key);

        if (factory == null) throw new ProtocolException("No factory registered for " + key);

        return factory.create(buffer.slice());
    }
View Full Code Here


        factories.put(key, factory);
    }

    public UpPacket read(ByteBuffer buffer) throws ProtocolException {
        Short key = new Short(buffer.getShort());
        PacketFactory factory = (PacketFactory) factories.get(key);

        if (factory == null) throw new ProtocolException("No factory registered for " + key);

        return factory.create(buffer.slice());
    }
View Full Code Here

        factories.put(key, factory);
    }

    public UpPacket read(ByteBuffer buffer) throws ProtocolException {
        Long key = new Long(buffer.getLong());
        PacketFactory factory = (PacketFactory) factories.get(key);

        if (factory == null) throw new ProtocolException("No factory registered for " + key);

        return factory.create(buffer.slice());
    }
View Full Code Here

        factories.put(new Byte(key), factory);
    }

    public UpPacket read(ByteBuffer buffer) throws ProtocolException {
        Byte key = new Byte(buffer.get());
        PacketFactory factory = (PacketFactory) factories.get(key);

        if (factory == null) throw new ProtocolException("No factory registered for " + key);

        return factory.create(buffer.slice());
    }
View Full Code Here

        factories.put(name, factory);
    }

    public UpPacket read(ByteBuffer buffer) throws ProtocolException {
        String key = PacketUtil.getString(buffer);
        PacketFactory factory = (PacketFactory) factories.get(key);

        if (factory == null) throw new ProtocolException("No factory registered for " + key);

        return factory.create(buffer.slice());
    }
View Full Code Here

        factories.put(key, factory);
    }

    public UpPacket read(ByteBuffer buffer) throws ProtocolException {
        Integer key = new Integer(buffer.getInt());
        PacketFactory factory = (PacketFactory) factories.get(key);

        if (factory == null) throw new ProtocolException("No factory registered for " + key);

        return factory.create(buffer.slice());
    }
View Full Code Here

        factories.put(key, factory);
    }

    public UpPacket read(ByteBuffer buffer) throws ProtocolException {
        Short key = new Short(buffer.getShort());
        PacketFactory factory = (PacketFactory) factories.get(key);

        if (factory == null) throw new ProtocolException("No factory registered for " + key);

        return factory.create(buffer.slice());
    }
View Full Code Here

        factories.put(key, factory);
    }

    public UpPacket read(ByteBuffer buffer) throws ProtocolException {
        Long key = new Long(buffer.getLong());
        PacketFactory factory = (PacketFactory) factories.get(key);

        if (factory == null) throw new ProtocolException("No factory registered for " + key);

        return factory.create(buffer.slice());
    }
View Full Code Here

        factories.put(new Byte(key), factory);
    }

    public UpPacket read(ByteBuffer buffer) throws ProtocolException {
        Byte key = new Byte(buffer.get());
        PacketFactory factory = (PacketFactory) factories.get(key);

        if (factory == null) throw new ProtocolException("No factory registered for " + key);

        return factory.create(buffer.slice());
    }
View Full Code Here

        factories.put(name, factory);
    }

    public UpPacket read(ByteBuffer buffer) throws ProtocolException {
        String key = PacketUtil.getString(buffer);
        PacketFactory factory = (PacketFactory) factories.get(key);

        if (factory == null) throw new ProtocolException("No factory registered for " + key);

        return factory.create(buffer.slice());
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.network.protocol.PacketFactory

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.