Examples of Token


Examples of de.fhkn.in.uce.stun.attribute.Token

                    Socket s = new Socket();
                    s.connect(relayServerEndpoint);
                    MessageWriter dataConnectionWriter = new MessageWriter(s.getOutputStream());
                    Message connectionBindRequestMessage = MessageStaticFactory.newSTUNMessageInstance(
                            STUNMessageClass.REQUEST, RelayingMethod.CONNECTION_BIND);
                    connectionBindRequestMessage.addAttribute(new Token(message.getAttribute(Token.class).getToken()));
                    dataConnectionWriter.writeMessage(connectionBindRequestMessage);
                    // TODO erfolgs oder fehlermeldung abwarten
                    socketQueue.add(s);
                } else if (message.isMethod(STUNMessageMethod.KEEP_ALIVE) && message.isSuccessResponse()) {
                    int lifetime = message.getAttribute(RelayingLifetime.class).getLifeTime();
View Full Code Here

Examples of de.fosd.typechef.lexer.Token

    @After
    public void tearDown() throws Exception {
        writer.close();

        Token t;
        do {
            t = p.getNextToken();
            System.out.println("Remaining token " + t);
        } while (t.getType() != EOF);
    }
View Full Code Here

Examples of de.odysseus.el.tree.impl.Scanner.Token

  /**
   * consume current token (get next token).
   * @return the consumed token (which was the current token when calling this method)
   */
  protected final Token consumeToken() throws ScanException, ParseException {
    Token result = token;
    if (lookahead.isEmpty()) {
      token = scanner.next();
      position = scanner.getPosition();
    } else {
      LookaheadToken next = lookahead.remove(0);
View Full Code Here

Examples of de.pdark.decentxml.Token

        int idx = 0;
        List<Node> nodes = e.getNodes();
        for (Node node: nodes.toArray(new Node[nodes.size()])) {
            if (node instanceof Comment) {
                Comment c = (Comment) node;
                Token token = c.getToken();
                if (token != null) {
                    String text = token.getText().trim().replace("<!--", "").replace("-->", "").trim();
                    Element descr = findOrCreateDescriptionOnNextElement(e, idx, root);
                    if (descr == null) {
                        // lets move the comment node to before the root element...
                      Activator.getLogger().warning("No description node found");
                        e.removeNode(c);
View Full Code Here

Examples of de.susebox.jtopas.Token

    long    start       = System.currentTimeMillis();
    long    localStart  = start;
   
    // tokenizer loop
    while (tokenizer.hasMoreToken()) {
      Token token = tokenizer.nextToken();
      int   type  = token.getType();
     
      switch (type) {
      case Token.WHITESPACE:
      case Token.EOF:
        break;
      default:
        // use if instead of assertTrue alone for performance reasons (no string
        // concatenation nessecary)
        // System.out.println(tokenizer.currentImage());
        if (expected[index] != type) {
          assertTrue("Line/Column " + token.getStartLine() + "/" + token.getStartColumn() + ": Expected " + Token.getTypeName(expected[index]) + ", got " + Token.getTypeName(type) + ".\n" + tokenizer.currentImage(), false);
        }
        if (++index >= expected.length) {
          long localEnd = System.currentTimeMillis();
         
          diffTime   = localEnd - localStart;
View Full Code Here

Examples of de.uniluebeck.itm.ncoap.communication.dispatching.client.Token

    @Test
    public void testSameRequests() throws Exception {
        URI targetUri = new URI("coap", null, "localhost", 5683, "/path/to/service", null, null);

        CoapRequest coapRequest1 = new CoapRequest(MessageType.Name.NON, MessageCode.Name.GET, targetUri);
        coapRequest1.setToken(new Token(new byte[0]));
        coapRequest1.setMessageID(12345);

        CoapRequest coapRequest2 = new CoapRequest(MessageType.Name.NON, MessageCode.Name.GET, targetUri);
        coapRequest2.setToken(new Token(new byte[0]));
        coapRequest2.setMessageID(12345);

        Assert.assertEquals(coapRequest1, coapRequest2);
    }
View Full Code Here

Examples of dtool.parser.common.Token

    DeeTokens... additionalIgnores) {
    DeeLexer generatedSourceLexer = new DeeLexer(source);
    DeeLexer expectedSourceLexer = new DeeLexer(expectedSource);
   
    while(true) {
      Token tok = getContentToken(generatedSourceLexer, true, additionalIgnores);
      Token tokExp = getContentToken(expectedSourceLexer, true, additionalIgnores);
      if(tok.type.equals(tokExp.type) && tok.source.equals(tokExp.source)) {
      } else if(failOnUnequal) {
        assertFail();
      } else {
        return false;
View Full Code Here

Examples of eas.miscellaneous.jedit.tokenmarker.Token

    }
    /* If syntax coloring is enabled, we have to do this because
     * tokens can vary in width */
    else
    {
      Token tokens;
      if(painter.currentLineIndex == line
        && painter.currentLineTokens != null)
        tokens = painter.currentLineTokens;
      else
      {
View Full Code Here

Examples of edu.cmu.sphinx.decoder.search.Token

         */
        while (true) {
            acousticScore += token.getAcousticScore()
                    + token.getInsertionScore();
            languageScore += token.getLanguageScore();
            Token preToken = token.getPredecessor();

            if (preToken == null)
                return;

            if (preToken.isWord()
                    || (loserManager != null && loserManager
                            .hasAlternatePredecessors(token)))
                break;
            token = preToken;
        }
View Full Code Here

Examples of edu.harvard.wcfia.yoshikoder.document.tokenizer.Token

  }
 
    public String getLeftHandSideView(){
        StringBuffer sb = new StringBuffer();
        for (Iterator<Token> iter = lhs.iterator(); iter.hasNext();) {
            Token el = iter.next();
            sb.append(el.getText() + " ");
        }
        if (sb.length()>0)
            sb.deleteCharAt(sb.length()-1);
        return sb.toString();       
    }
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.