Package r194

Examples of r194.GenerateAsm$Identifier


            }
            selectDestSequencesStmt.setString(1, endpointIdentifier);
           
            ResultSet res = selectDestSequencesStmt.executeQuery();
            while (res.next()) {
                Identifier sid = new Identifier();               
                sid.setValue(res.getString(1));
                EndpointReferenceType acksTo = RMUtils.createReference(res.getString(2))
                long lm = res.getLong(3);
                InputStream is = res.getBinaryStream(4);
                SequenceAcknowledgement ack = null;
                if (null != is) {
View Full Code Here


        control.verify();
    }
   
    @Test
    public void testGetSequence() {
        Identifier id = control.createMock(Identifier.class);
        String sid = "s1";
        EasyMock.expect(id.getValue()).andReturn(sid);
        control.replay();
        assertNull(destination.getSequence(id));
    }
View Full Code Here

            }
            selectSrcSequencesStmt.setString(1, endpointIdentifier);
            ResultSet res = selectSrcSequencesStmt.executeQuery();
           
            while (res.next()) {
                Identifier sid = new Identifier();
                sid.setValue(res.getString(1));
                long cmn = res.getLong(2);
                boolean lm = res.getBoolean(3);
                long lval = res.getLong(4);
                Date expiry = 0 == lval ? null : new Date(lval);
                String oidValue = res.getString(5);
                Identifier oi = null;
                if (null != oidValue) {
                    oi = new Identifier();
                    oi.setValue(oidValue);
                }                           
                SourceSequence seq = new SourceSequence(sid, expiry, oi, cmn, lm, protocol);
                seqs.add(seq);                         
            }
        } catch (SQLException ex) {
View Full Code Here

    @Test
    public void testAddRemoveSequence() {
        DestinationSequence ds = control.createMock(DestinationSequence.class);
        ds.setDestination(destination);
        EasyMock.expectLastCall();
        Identifier id = control.createMock(Identifier.class);
        EasyMock.expect(ds.getIdentifier()).andReturn(id).times(3);
        String sid = "s1";
        EasyMock.expect(id.getValue()).andReturn(sid).times(3);
        RMManager manager = control.createMock(RMManager.class);
        EasyMock.expect(rme.getManager()).andReturn(manager).times(2);       
        RMStore store = control.createMock(RMStore.class);
        EasyMock.expect(manager.getStore()).andReturn(store).times(2);
        store.createDestinationSequence(ds);
View Full Code Here

        Message message = setupMessage();
        RMProperties rmps = control.createMock(RMProperties.class);
        EasyMock.expect(message.get(RMMessageConstants.RM_PROPERTIES_INBOUND)).andReturn(rmps);
        SequenceType st = control.createMock(SequenceType.class);
        EasyMock.expect(rmps.getSequence()).andReturn(st);
        Identifier id = control.createMock(Identifier.class);
        EasyMock.expect(st.getIdentifier()).andReturn(id).times(2);
        EasyMock.expect(rme.getProtocol()).andReturn(ProtocolVariation.RM10WSA200408).anyTimes();
        String sid = "sid";
        EasyMock.expect(id.getValue()).andReturn(sid);
        control.replay();
        try {
            destination.acknowledge(message);  
            fail("Expected SequenceFault not thrown.");
        } catch (SequenceFault ex) {
View Full Code Here

        Message message = setupMessage();
        RMProperties rmps = control.createMock(RMProperties.class);
        EasyMock.expect(message.get(RMMessageConstants.RM_PROPERTIES_INBOUND)).andReturn(rmps);
        SequenceType st = control.createMock(SequenceType.class);
        EasyMock.expect(rmps.getSequence()).andReturn(st);
        Identifier id = control.createMock(Identifier.class);
        EasyMock.expect(st.getIdentifier()).andReturn(id);
        DestinationSequence ds = control.createMock(DestinationSequence.class);
        EasyMock.expect(destination.getSequence(id)).andReturn(ds);
        long nr = 10;
        EasyMock.expect(st.getMessageNumber()).andReturn(nr)
View Full Code Here

        return dss;
    }

    private SourceSequence createTestSourceSequence(Source source, String sid,
                                                    EndpointReferenceType to, long[] acked) {
        Identifier identifier = RMUtils.getWSRMFactory().createIdentifier();
        identifier.setValue(sid);
        SourceSequence ss = new SourceSequence(identifier, null);
        ss.setSource(source);
        ss.setTarget(to);
        List<SequenceAcknowledgement.AcknowledgementRange> ranges =
            ss.getAcknowledgement().getAcknowledgementRange();
View Full Code Here

  }
 
  public void filterTokens(){
    List<Lexeme> newTokens = new ArrayList<>();
    for (int i = 0; i < tokens.size(); i++) {
      Lexeme t = tokens.get(i);
      if (t.type != Token.WHITESPACE){
        newTokens.add(t);
      }
    }
    tokens = newTokens;
View Full Code Here

    }
  }
 
  public Lexeme lookahead(int i) {
    if (position + i >= tokens.size()){
      return new Lexeme("", Token.EOF);
    }
    return tokens.get(position + i);
  }
View Full Code Here

    List<Lexer.Lexeme> lexed = new Lexer().lex(code);
    System.out.println("Compiling");
    Parser p = new Parser(lexed);
    p.filterTokens();
    System.out.println(p.tokens);
    AbstractSyntaxNode program = p.program();
    System.out.println(program);
    System.out.println("Generating");
    GenerateAsm asm = new GenerateAsm();
    List<String> gen = asm.generate(program);
   
View Full Code Here

TOP

Related Classes of r194.GenerateAsm$Identifier

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.