Examples of consume()


Examples of ca.odell.glazedlists.impl.io.Bufferlo.consume()

        // read the data
        sequenceId = dataIn.readInt();
        keyBytesLength = dataIn.readInt();
        valueBytesLength = dataIn.readInt();
        keyBytes = chunkAsBytes.consume(keyBytesLength);

        // skip any excess
        chunkAsBytes.clear();

        // process the read data
View Full Code Here

Examples of ca.odell.glazedlists.impl.io.Bufferlo.consume()

    private void readHeader() throws IOException {
        try {
            // process the file header
            Bufferlo fileHeader = new Bufferlo();
            fileHeader.readFromChannel(persistentMap.getFileChannel(), 8);
            fileHeader.consume("GLAZED\n\n");
               
        } catch(ParseException e) {
            // the file header is broken, bail
            throw new IOException("The file cannot be read because it is not of the expected type");
        }
View Full Code Here

Examples of ca.odell.glazedlists.impl.io.Bufferlo.consume()

    public static ResourceUri localOrRemote(String uri, String localHost, int localPort) {
        try {
            Bufferlo parser = new Bufferlo();
            parser.write(uri);
           
            parser.consume("glazedlists\\:\\/\\/");
            String host = parser.readUntil("\\:");
            String portString = parser.readUntil("\\/");
            int port = Integer.parseInt(portString);
            String path = "/" + parser.toString();
           
View Full Code Here

Examples of charva.awt.event.KeyEvent.consume()

    key_event.getKeyCode() == KeyEvent.VK_ENTER &&
    super.isEnabled()) {
   
    EventQueue queue = Toolkit.getDefaultToolkit().getSystemEventQueue();
    queue.postEvent(new ActionEvent(this, getActionCommand()));
    key_event.consume();
      }
  }
  else if (evt_ instanceof ActionEvent)
      fireActionPerformed((ActionEvent) evt_);
  else if (evt_ instanceof ItemEvent)
View Full Code Here

Examples of com.alibaba.ons.api.MessageListener.consume()

            if (null == listener) {
                throw new ONSClientException("MessageListener is null");
            }

            final ConsumeContext context = new ConsumeContext();
            Action action = listener.consume(msg, context);
            if (action != null) {
                switch (action) {
                case CommitMessage:
                    return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
                case ReconsumeLater:
View Full Code Here

Examples of com.alibaba.ons.api.order.MessageOrderListener.consume()

            if (null == listener) {
                throw new ONSClientException("MessageOrderListener is null");
            }

            final ConsumeOrderContext context = new ConsumeOrderContext();
            OrderAction action = listener.consume(msg, context);
            if (action != null) {
                switch (action) {
                case ConsumeSuccessfully:
                    return ConsumeOrderlyStatus.SUCCESS;
                case SuspendMoment:
View Full Code Here

Examples of com.aliyun.openservices.ons.api.MessageListener.consume()

            if (null == listener) {
                throw new ONSClientException("MessageListener is null");
            }

            final ConsumeContext context = new ConsumeContext();
            Action action = listener.consume(msg, context);
            if (action != null) {
                switch (action) {
                case CommitMessage:
                    return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
                case ReconsumeLater:
View Full Code Here

Examples of com.aliyun.openservices.ons.api.order.MessageOrderListener.consume()

            if (null == listener) {
                throw new ONSClientException("MessageOrderListener is null");
            }

            final ConsumeOrderContext context = new ConsumeOrderContext();
            OrderAction action = listener.consume(msg, context);
            if (action != null) {
                switch (action) {
                case ConsumeSuccessfully:
                    return ConsumeOrderlyStatus.SUCCESS;
                case SuspendMoment:
View Full Code Here

Examples of com.bitmovers.maui.events.MActionEvent.consume()

    // Other alternative is make Deep Navigation clicks not action events but
    // a different type of event, so it can be filtered by their event type.
   
    if (aStateData != null && aStateData.equals(MActionEvent.ACTION_PUSH))
    {
      returnValue.consume();
    }
   
    return returnValue;
    //-- 377
  }
View Full Code Here

Examples of com.golden.gamedev.engine.network.NetworkPacket.consume()

      }
     
      NetworkPacket packet = this.getReceivedPacketCode(code);
      if (packet != null) {
        // packet arrived!
        packet.consume(); // since this unique packet, the packet must
                  // be the right packet
        // we simply consume it, to make everything much more easy
       
        return packet;
      }
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.