Examples of Binary


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

                    delivery.setTransportDelivery(transportDelivery);
                    sender.getSession().getTransportSession().addUnsettledOutgoing(deliveryId, delivery);

                    final Transfer transfer = new Transfer();
                    transfer.setDeliveryId(deliveryId);
                    transfer.setDeliveryTag(new Binary(delivery.getTag()));
                    transfer.setHandle(transportLink.getLocalHandle());

                    if(delivery.isSettled())
                    {
                        transfer.setSettled(Boolean.TRUE);
View Full Code Here

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

        incrementNextIncomingId();
        if(transfer.getDeliveryId() == null || transfer.getDeliveryId().equals(_currentDeliveryId))
        {
            TransportReceiver transportReceiver = (TransportReceiver) getLinkFromRemoteHandle(transfer.getHandle());
            ReceiverImpl receiver = transportReceiver.getReceiver();
            Binary deliveryTag = transfer.getDeliveryTag();
            delivery = _unsettledIncomingDeliveriesById.get(_currentDeliveryId);
            delivery.getTransportDelivery().incrementSessionSize();

        }
        else
        {
            // TODO - check deliveryId has been incremented by one
            _currentDeliveryId = transfer.getDeliveryId();
            // TODO - check link handle valid and a receiver
            TransportReceiver transportReceiver = (TransportReceiver) getLinkFromRemoteHandle(transfer.getHandle());
            ReceiverImpl receiver = transportReceiver.getReceiver();
            Binary deliveryTag = transfer.getDeliveryTag();
            delivery = receiver.delivery(deliveryTag.getArray(), deliveryTag.getArrayOffset(),
                                                      deliveryTag.getLength());
            TransportDelivery transportDelivery = new TransportDelivery(_currentDeliveryId, delivery, transportReceiver);
            delivery.setTransportDelivery(transportDelivery);
            _unsettledIncomingDeliveriesById.put(_currentDeliveryId, delivery);
        }
        if( transfer.getState()!=null )
View Full Code Here

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

                    try
                    {
                        _decoder.setByteBuffer(in);
                        Object val = _decoder.readObject();

                        Binary payload;

                        if(in.hasRemaining())
                        {
                            byte[] payloadBytes = new byte[in.remaining()];
                            in.get(payloadBytes);
                            payload = new Binary(payloadBytes);
                        }
                        else
                        {
                            payload = null;
                        }
View Full Code Here

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

                    try
                    {
                        _sasl.getDecoder().setByteBuffer(in);
                        Object val = _sasl.getDecoder().readObject();

                        Binary payload;

                        if(in.hasRemaining())
                        {
                            byte[] payloadBytes = new byte[in.remaining()];
                            in.get(payloadBytes);
                            payload = new Binary(payloadBytes);
                        }
                        else
                        {
                            payload = null;
                        }
View Full Code Here

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

        byte[] passwordBytes = password.getBytes();
        byte[] data = new byte[usernameBytes.length+passwordBytes.length+2];
        System.arraycopy(usernameBytes, 0, data, 1, usernameBytes.length);
        System.arraycopy(passwordBytes, 0, data, 2+usernameBytes.length, passwordBytes.length);

        setChallengeResponse(new Binary(data));

    }
View Full Code Here

Examples of org.apache.qpid.transport.Binary

        final Broker broker = mock(Broker.class);
        when(broker.getRootMessageLogger()).thenReturn(mock(RootMessageLogger.class));
        ServerConnection connection = new ServerConnection(1, broker);
        connection.setVirtualHost(_virtualHost);
        ServerSession session1 = new ServerSession(connection, new ServerSessionDelegate(),
                new Binary(getName().getBytes()), 0);

        // create a session with the same name but on a different connection
        ServerConnection connection2 = new ServerConnection(2, broker);
        connection2.setVirtualHost(_virtualHost);
        ServerSession session2 = new ServerSession(connection2, new ServerSessionDelegate(),
                new Binary(getName().getBytes()), 0);

        assertFalse("Unexpected compare result", session1.compareTo(session2) == 0);
        assertEquals("Unexpected compare result", 0, session1.compareTo(session1));
    }
View Full Code Here

Examples of org.apache.sqoop.schema.type.Binary

    switch (type) {
      case ARRAY:
        output = new Array(key);
        break;
      case BINARY:
        output = new Binary().setSize(size);
        break;
      case BIT:
        output = new Bit();
        break;
      case DATE:
View Full Code Here

Examples of org.bson.types.Binary

        variety.getSourceCollection().insert(new BasicDBObject()
            .append("key_string", "Just plain String")
            .append("key_boolean", true)
            .append("key_number", 1)
            .append("key_date", new Date())
            .append("key_binData-generic", new Binary((byte)0x00, new byte[]{1,2,3,4}))
            .append("key_binData-function", new Binary((byte) 0x01, new byte[]{1,2,3,4}))
            .append("key_binData-old", new Binary((byte) 0x02, new byte[]{1,2,3,4}))
            .append("key_binData-UUID", new Binary((byte) 0x03, new byte[]{1,2,3,4}))
            .append("key_binData-MD5", new Binary((byte) 0x05, new byte[]{1,2,3,4}))
            .append("key_binData-user", new Binary((byte) 0x80, new byte[]{1,2,3,4}))
            .append("key_array", new ArrayList<>())
            .append("key_object", new BasicDBObject())
            .append("key_null", null)
        );
    }
View Full Code Here

Examples of org.drools.guvnor.server.files.Response.Binary

    }

    private Response buildAssetContentResponse(ModuleItem pkg, AssetItem asset) {
        if (asset.isBinary()) {
            Binary r = new Response.Binary();
            r.lastModified = asset.getLastModified();
            r.stream = asset.getBinaryContentAttachment();
            return r;
        } else {
            Text r = new Response.Text();
View Full Code Here

Examples of org.drools.repository.remoteapi.Response.Binary

  }

  private Response buildAssetContentResponse(PackageItem pkg, AssetItem asset) {
    if (asset.isBinary()) {
      Binary r = new Response.Binary();
      r.lastModified = asset.getLastModified();
      r.stream = asset.getBinaryContentAttachment();
      return r;
    } else {
      Text r = new Response.Text();
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.