Package org.apache.qpid.amqp_1_0.type

Examples of org.apache.qpid.amqp_1_0.type.Binary


        }
        else
        {
            byte[] dup = new byte[correlationId.length];
            System.arraycopy(correlationId,0,dup,0,correlationId.length);
            setCorrelationId(new Binary(dup));
        }
    }
View Full Code Here


    public String getJMSCorrelationID() throws JMSException
    {
        Object o = getProperties().getCorrelationId();
        if(o instanceof Binary)
        {
            Binary id = (Binary) o;
            return new String(id.getArray(), id.getArrayOffset(), id.getLength());
        }
        else
        {
            return o == null ? null : o.toString();
        }
View Full Code Here

        fs.setLinkCredit(UnsignedInteger.valueOf(18));
        fs.setAvailable(UnsignedInteger.valueOf(0));
        fs.setDrain(false);

        xfr.setHandle(UnsignedInteger.valueOf(0));
        xfr.setDeliveryTag(new Binary("\"queue\"<-6ec024a7-d98e-4196-9348-15f6026c32ca:0".getBytes()));
        //xfr.setDeliveryTag(new Binary(new byte[] {0}));
        xfr.setDeliveryId(UnsignedInteger.valueOf(0));
        xfr.setSettled(true);

View Full Code Here

        SimpleDateFormat df = new SimpleDateFormat("HHa z MMM d yyyy");

        encodeTypes("timestamp",  df.parse("9AM PST Dec 6 2010"),   df.parse("9AM PST Dec 6 1910"));
        encodeTypes("uuid",  UUID.fromString("f275ea5e-0c57-4ad7-b11a-b20c563d3b71"));
        encodeTypes("binary"new Binary( new byte[] {(byte)0xDE, (byte)0xAD, (byte)0xBE, (byte)0xEF}), new Binary(new byte[] { (byte)0xCA,(byte)0xFE, (byte)0xBA, (byte)0xBE}));
        encodeTypes("string""The quick brown fox jumped over the lazy cow.");
        encodeTypes("symbol",  Symbol.valueOf("connectathon"));
        encodeTypes("list",  Arrays.asList(new Object[] {Long.valueOf(1), "two", Double.valueOf(3.14159265359), null, Boolean.FALSE}));
        Map map = new HashMap();
        map.put("one", Long.valueOf(1));
View Full Code Here

        {
            try
            {
                if(RAW_LOGGER.isLoggable(Level.FINE))
                {
                    Binary bin = new Binary(buf.array(),buf.arrayOffset()+buf.position(), buf.limit()-buf.position());
                    RAW_LOGGER.fine("SEND["+ _conn.getRemoteAddress() +"] : " + bin.toString());
                }
                _outputStream.write(buf.array(),buf.arrayOffset()+buf.position(), buf.limit()-buf.position());
                buf.position(buf.limit());
            }
            catch (IOException e)
View Full Code Here

            int read;
            boolean done = false;
            while(!done && (read = inputStream.read(buf)) != -1)
            {
                ByteBuffer bbuf = ByteBuffer.wrap(buf, 0, read);
                Binary b = new Binary(buf,0,read);

                if(RAW_LOGGER.isLoggable(Level.FINE))
                {
                    RAW_LOGGER.fine("RECV [" + _conn.getRemoteAddress() + "] : " + b.toString());
                }
                /*System.err.println(b);
                System.err.println("XXX: " + bbuf.hasRemaining() + "; " + handler.isDone());
                if(handler.isDone())
                {
View Full Code Here

            msg.setTtl(null);
        }

        if(!getDisableMessageID() && msg.getMessageId() == null)
        {
            final Binary messageId = generateMessageId();
            msg.setMessageId(messageId);

        }

        if(message != msg)
View Full Code Here

    }

    private Binary generateMessageId()
    {
        UUID uuid = UUID.randomUUID();
        return new Binary(uuid.toString().getBytes());
    }
View Full Code Here

            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(serializable);
            oos.flush();
            oos.close();

            _objectData = new Data(new Binary(baos.toByteArray()));

        }
        catch (IOException e)
        {
            e.printStackTrace()//TODO
View Full Code Here

        if(_objectData == null)
        {
            return null;
        }

        Binary data = _objectData.getValue();

        try
        {
            ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(data.getArray(), data.getArrayOffset(), data.getLength()));
            return (Serializable) ois.readObject();
        }
        catch (IOException e)
        {
            JMSException jmsException = new JMSException(e.getMessage());
View Full Code Here

TOP

Related Classes of org.apache.qpid.amqp_1_0.type.Binary

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.