Examples of Transcoder


Examples of com.cloudhopper.mq.transcoder.Transcoder

      message = "No local consumers for queue " + queueName;

        } else {

      // get the transcoder
      Transcoder tc = queue.getTranscoder();

      try {
          // transcode the item
          Object item = item = tc.decode(entityContent);
          logger.trace("[{}] Parsed item: {}", queueName, item);

          try {
        // if we get here, put the item ont the queue
        // delegate the actual "putting" of the item
View Full Code Here

Examples of com.volantis.map.sti.transcoder.Transcoder

        Result result = Result.SUCCESS;

        try {
            // Create new instance of transcoder in synchronized block, since
            // the TranscoderFactory is not guaranteed to be thread-safe.
            Transcoder transcoder;

            synchronized (mutex) {
                transcoder = transcoderFactory.createTranscoder();            }

            // Perform transcoding on local instance of transcoder,
            // thus in thread-safe way.
            transcoder.transcode(descriptor, request, response);

        } catch (TranscoderFactoryException e) {
            // thrown when the TranscoderFactory instantiation fails.
            LOGGER.error(e);
            result = Result.UNSUPPORTED;
View Full Code Here

Examples of flex2.compiler.Transcoder

                {
                    mimeType = MimeMappings.SKIN;
                }
            }

            Transcoder t = getTranscoder(transcoders, mimeType);

            if (t == null)
            {
                logTranscoderException(new TranscoderException.NoMatchingTranscoder(mimeType), nameForReporting, line, col);
            }
            else
            {
                if (!args.containsKey( Transcoder.SYMBOL ) &&
                    !args.containsKey( Transcoder.NEWNAME )) // FIXME - this should probably go away, no exports in fp9
                {
                    args.put( Transcoder.NEWNAME, className );
                }

                // put the transcoding output into the compilation unit
                results = t.transcode( context, symbolTable, args, className, generateCode );
            }
        }
        catch(TranscoderException transcoderException)
        {
            logTranscoderException(transcoderException, origin, line, col);
View Full Code Here

Examples of net.rubyeye.xmemcached.transcoders.Transcoder

        .buf().array()));
    optimiezeCommand.decode(null, ByteBuffer.wrap("VALUE 0 0 2\r\n10\r\n"
        .getBytes()));

    assertEquals(0, this.currentCmd.getLatch().getCount());
    Transcoder transcoder = new SerializingTranscoder();
    assertEquals("10", transcoder.decode((CachedData) this.currentCmd
        .getResult()));
    for (Command cmd : localQueue) {
      assertEquals(0, cmd.getLatch().getCount());
      assertEquals("10", transcoder.decode((CachedData) this.currentCmd
          .getResult()));
    }
    assertEquals(0, optimiezeCommand.getMergeCount());
  }
View Full Code Here

Examples of net.rubyeye.xmemcached.transcoders.Transcoder

  public void testCreateStoreCommand() {
    String key = "test";
    String value = "test";
    byte[] keyBytes = ByteUtils.getBytes(key);
    int exp = 0;
    Transcoder transcoder = new StringTranscoder();
    Command storeCmd = this.commandFactory.createSetCommand(key, keyBytes, exp, value,false, transcoder);
    storeCmd.encode();
    assertFalse(storeCmd.isNoreply());
    assertEquals(CommandType.SET, storeCmd.getCommandType());
    String commandStr = new String(storeCmd.getIoBuffer().buf()
View Full Code Here

Examples of net.rubyeye.xmemcached.transcoders.Transcoder

        .buf().array()));
    optimiezeCommand.decode(null,
        ByteBuffer.wrap("VALUE 0 0 2\r\n10\r\n".getBytes()));

    assertEquals(0, this.currentCmd.getLatch().getCount());
    Transcoder transcoder = new SerializingTranscoder();
    assertEquals("10",
        transcoder.decode((CachedData) this.currentCmd.getResult()));
    for (Command cmd : localQueue) {
      assertEquals(0, cmd.getLatch().getCount());
      assertEquals("10",
          transcoder.decode((CachedData) this.currentCmd.getResult()));
    }
    assertEquals(0, optimiezeCommand.getMergeCount());
  }
View Full Code Here

Examples of net.rubyeye.xmemcached.transcoders.Transcoder

  public void testCreateStoreCommand() {
    String key = "test";
    String value = "test";
    byte[] keyBytes = ByteUtils.getBytes(key);
    int exp = 0;
    Transcoder transcoder = new StringTranscoder();
    Command storeCmd = this.commandFactory.createSetCommand(key, keyBytes, exp, value,false, transcoder);
    storeCmd.encode();
    assertFalse(storeCmd.isNoreply());
    assertEquals(CommandType.SET, storeCmd.getCommandType());
    String commandStr = new String(storeCmd.getIoBuffer().buf()
View Full Code Here

Examples of net.sourceforge.plantuml.code.Transcoder

        request.setCharacterEncoding("UTF-8");
        String text = request.getParameter("text");
        String url = request.getParameter("url");
        String encoded = "";

        Transcoder transcoder = getTranscoder();
        // the URL form has been submitted
        if (url != null && !url.trim().isEmpty()) {
            // Catch the last part of the URL if necessary
            Matcher m1 = URL_PATTERN.matcher(url);
            if (m1.find()) {
                url = m1.group(1);
            }
            // Check it's a valid compressed text
            Matcher m2 = ENCODED_PATTERN.matcher(url);
            if (m2.find()) {
                    url = m2.group(0);
                    text = transcoder.decode(url);
            } else {
                System.out.println("PlantUML ERROR Not a valid compressed string : " + url);
            }
        }
        // the Text form has been submitted
        if (text != null && !text.trim().isEmpty()) {
            encoded = transcoder.encode(text);
        }

        request.setAttribute("decoded", text);
        request.setAttribute("encoded", encoded);
View Full Code Here

Examples of net.sourceforge.plantuml.code.Transcoder

        try {
            text = URLDecoder.decode(source, "UTF-8");
        } catch (UnsupportedEncodingException uee) {
            text = "' invalid encoded string";
        }
        Transcoder transcoder = TranscoderUtil.getDefaultTranscoder();
        try {
            text = transcoder.decode(text);
        } catch (IOException ioe) {
            text = "' unable to decode string";
        }

        // encapsulate the UML syntax if necessary
View Full Code Here

Examples of org.apache.batik.transcoder.Transcoder

        else{
            dstFiles = computeDstFiles(sources);
        }

        // Now, get the transcoder to use for the operation
        Transcoder transcoder = destinationType.getTranscoder();
        if(transcoder == null) {
            throw new SVGConverterException(ERROR_CANNOT_ACCESS_TRANSCODER,
                                             new Object[]{destinationType.toString()},
                                             true /* fatal error */);
        }

        // Now, compute the set of transcoding hints to use
        Map hints = computeTranscodingHints();
        transcoder.setTranscodingHints(hints);

        // Notify listener that task has been computed
        if(!controller.proceedWithComputedTask(transcoder,
                                               hints,
                                               sources,
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.