Package org.objectweb.celtix.ws.rm

Examples of org.objectweb.celtix.ws.rm.Identifier


            }
            assert null != createSrcSequenceStmt;
            createSrcSequenceStmt.setString(1, sequenceIdentifier);
            Date expiry = seq.getExpiry();
            createSrcSequenceStmt.setLong(2, expiry == null ? 0 : expiry.getTime());
            Identifier osid = seq.getOfferingSequenceIdentifier();
            createSrcSequenceStmt.setString(3, osid == null ? null : osid.getValue());
            createSrcSequenceStmt.setString(4, endpointIdentifier);
            createSrcSequenceStmt.execute();   
           
            commit();
           
View Full Code Here


            selectDestSequencesStmt.setString(1, endpointIdentifier);
           
            ResultSet res = selectDestSequencesStmt.executeQuery();
            while (res.next()) {
                // do something
                Identifier sid = RMUtils.getWSRMFactory().createIdentifier();               
                sid.setValue(res.getString(1));
                EndpointReferenceType acksTo = RMUtils.createReference(res.getString(2))
                BigDecimal lm = res.getBigDecimal(3);
                InputStream is = res.getBinaryStream(4);
                SequenceAcknowledgement ack = null;
                if (null != is) {
View Full Code Here

            }
            selectSrcSequencesStmt.setString(1, endpointIdentifier);
            ResultSet res = selectSrcSequencesStmt.executeQuery();
           
            while (res.next()) {
                Identifier sid = RMUtils.getWSRMFactory().createIdentifier();
                sid.setValue(res.getString(1));
                BigInteger cmn = res.getBigDecimal(2).toBigInteger();
                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 = RMUtils.getWSRMFactory().createIdentifier();
                    oi.setValue(oidValue);
                }                           
                SourceSequence seq = new SourceSequence(sid, expiry, oi, cmn, lm);
                seqs.add(seq);                         
            }
        } catch (SQLException ex) {
View Full Code Here

    public void testSetSequence() {
        RMPropertiesImpl rmps = new RMPropertiesImpl();
        IMocksControl control = createNiceControl();
       
        SourceSequence seq = control.createMock(SourceSequence.class);
        Identifier sid = control.createMock(Identifier.class);
        seq.getIdentifier();
        expectLastCall().andReturn(sid);
        seq.getCurrentMessageNr();
        expectLastCall().andReturn(BigInteger.TEN);
        seq.isLastMessage();
View Full Code Here

        RMSource source = EasyMock.createMock(RMSource.class);
        AbstractBindingBase binding = EasyMock.createMock(AbstractBindingBase.class);
        Transport transport = EasyMock.createMock(Transport.class);
        HandlerChainInvoker hci = new HandlerChainInvoker(new ArrayList<Handler>());
       
        Identifier sid = RMUtils.getWSRMFactory().createIdentifier();
        sid.setValue("TerminatedSequence");
        SourceSequence seq = new SourceSequence(sid, null, null);
       
       
        binding.createObjectContext();
        EasyMock.expectLastCall().andReturn(objectCtx);
View Full Code Here

        store.createSourceSequence(EasyMock.isA(SourceSequence.class));
        expectLastCall().times(2);
        store.removeSourceSequence(EasyMock.isA(Identifier.class));

        control.replay();
        Identifier sid = s.generateSequenceIdentifier();
        SourceSequence seq = new SourceSequence(sid);
        assertNull(s.getCurrent());
        s.addSequence(seq);
        assertNotNull(s.getSequence(sid));
        assertNull(s.getCurrent());       
View Full Code Here

        assertNull(s.getSequence(sid));
        control.verify();
    }

    public void testCurrent() {
        Identifier sid = s.generateSequenceIdentifier();
        SourceSequence seq = new SourceSequence(sid);
        assertNull(s.getCurrent());
        Identifier inSid = s.generateSequenceIdentifier();
        assertNull(s.getCurrent(inSid));
        s.setCurrent(seq);
        assertNotNull(s.getCurrent());
        assertSame(seq, s.getCurrent());
        assertNull(s.getCurrent(inSid));
View Full Code Here

        ObjectMessageContext ctx = new ObjectMessageContextImpl();
        AddressingProperties maps = new AddressingPropertiesImpl();
        ctx.put(CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, maps);
        RMPropertiesImpl rmps = new RMPropertiesImpl();
        SequenceType seq = control.createMock(SequenceType.class);
        Identifier sid = control.createMock(Identifier.class);
        rmps.setSequence(seq);
        RMContextUtils.storeRMProperties(ctx, rmps, true);  
        SourceSequence ss = control.createMock(SourceSequence.class);
        RMMessage msg = control.createMock(RMMessage.class);
        AbstractClientBinding binding = control.createMock(AbstractClientBinding.class);
View Full Code Here

        store.createSourceSequence(EasyMock.isA(SourceSequence.class));
        expectLastCall();
       
        control.replay();
       
        Identifier sid1 = s.generateSequenceIdentifier();
        Identifier sid2 = s.generateSequenceIdentifier();
        SourceSequence seq = new SourceSequence(sid1, null, null, BigInteger.TEN, true);
        seq.setSource(s);
        s.addSequence(seq);
              
        SequenceAcknowledgement ack = RMUtils.getWSRMFactory().createSequenceAcknowledgement();
View Full Code Here

        Configuration c = control.createMock(Configuration.class);
        EasyMock.expect(handler.getConfiguration()).andReturn(c);
        Configuration pc = control.createMock(Configuration.class);
        EasyMock.expect(c.getParent()).andReturn(pc);
        EasyMock.expect(pc.getId()).andReturn("endpoint");
        Identifier id = RMUtils.getWSRMFactory().createIdentifier();
        id.setValue("source1");
        SourceSequence ss = new SourceSequence(id);
        Collection<RMSourceSequence> sss = new ArrayList<RMSourceSequence>();
        sss.add(ss);
        EasyMock.expect(store.getSourceSequences("endpoint")).andReturn(sss);
        EasyMock.expect(handler.getStore()).andReturn(store);
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.ws.rm.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.