Examples of WireFormatInfo


Examples of io.fabric8.gateway.handlers.detecting.protocol.openwire.command.WireFormatInfo

        });
        h.codecHandler(new Handler<Command>() {
            @Override
            public void handle(Command event) {
                if( event instanceof WireFormatInfo){
                    WireFormatInfo info = (WireFormatInfo) event;
                    ConnectionParameters parameters = new ConnectionParameters();
                    try {
                        parameters.protocolVirtualHost = info.getHost();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                    handler.handle(parameters);
                } else {
View Full Code Here

Examples of org.activemq.message.WireFormatInfo

     * @param dataOut
     * @param dataIn
     * @throws JMSException
     */
    public void initiateClientSideProtocol(DataOutputStream dataOut,DataInputStream dataIn) throws JMSException{
        WireFormatInfo info = new WireFormatInfo();
        info.setVersion(getCurrentWireFormatVersion());
        try {
            writePacket(info, dataOut);
            dataOut.flush();
        }
        catch (IOException e) {
View Full Code Here

Examples of org.activemq.message.WireFormatInfo

            case Packet.CAPACITY_INFO :
                return readPacket(dataIn, capacityInfoReader);
            case Packet.CAPACITY_INFO_REQUEST :
                return readPacket(dataIn, capacityInfoRequestReader);
            case Packet.WIRE_FORMAT_INFO :
                WireFormatInfo info =  (WireFormatInfo)readPacket(dataIn, wireFormatInfoReader);
                if (info != null){
                    if (info.getVersion() < 3){
                        throw new IOException("Cannot support wire format version: " + info.getVersion());
                    }
                }
                return info;
           
            case Packet.KEEP_ALIVE :
View Full Code Here

Examples of org.activemq.message.WireFormatInfo

      }

      this.transportChannel.setUsedInternally(internalConnection);
      this.transportChannel.start();
      if (transportChannel.doesSupportWireFormatVersioning()) {
        WireFormatInfo info = new WireFormatInfo();
        info.setVersion(transportChannel.getCurrentWireFormatVersion());
        this.asyncSendPacket(info);
      }
    }
    if (this.closed) {
      throw new ConnectionClosedException();
View Full Code Here

Examples of org.activemq.message.WireFormatInfo

      }

      this.transportChannel.setUsedInternally(internalConnection);
      this.transportChannel.start();
      if (transportChannel.doesSupportWireFormatVersioning()) {
        WireFormatInfo info = new WireFormatInfo();
        info.setVersion(transportChannel.getCurrentWireFormatVersion());
        this.asyncSendPacket(info);
      }
    }
    if (this.closed) {
      throw new ConnectionClosedException();
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.WireFormatInfo

     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

        WireFormatInfo info = (WireFormatInfo)o;

        info.beforeUnmarshall(wireFormat);
       
        info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
        info.setVersion(dataIn.readInt());
        info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));

        info.afterUnmarshall(wireFormat);

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.WireFormatInfo

    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        WireFormatInfo info = (WireFormatInfo)o;

        info.beforeMarshall(wireFormat);

        super.looseMarshal(wireFormat, o, dataOut);
        looseMarshalConstByteArray(wireFormat, info.getMagic(), dataOut, 8);
        dataOut.writeInt(info.getVersion());
        looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.WireFormatInfo

   
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new WireFormatInfo();
    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.WireFormatInfo

     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

        WireFormatInfo info = (WireFormatInfo)o;

        info.beforeUnmarshall(wireFormat);
       
        info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
        info.setVersion(dataIn.readInt());
        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));

        info.afterUnmarshall(wireFormat);

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.WireFormatInfo

    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        WireFormatInfo info = (WireFormatInfo)o;

        info.beforeMarshall(wireFormat);

        int rc = super.tightMarshal1(wireFormat, o, bs);
        rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8);
        rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);

        return rc + 4;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.