Package org.apache.airavata.wsmg.broker.subscription

Examples of org.apache.airavata.wsmg.broker.subscription.SubscriptionEntry


                int nRead;
                byte[] buffer = new byte[1024];
                ByteArrayOutputStream outStream = new ByteArrayOutputStream();

                while (rs.next()) {
                    SubscriptionEntry subscriptionEntry = new SubscriptionEntry();
                    subscriptionEntry.setSubscriptionId(rs.getString("SubscriptionId"));

                    /*
                     * Read Binary Stream
                     */
                    InputStream inStream = null;

                    try {
                        inStream = rs.getBinaryStream("content");
                        while ((nRead = inStream.read(buffer)) != -1) {
                            outStream.write(buffer, 0, nRead);
                        }
                        outStream.flush();

                        subscriptionEntry.setSubscribeXml(new String(outStream.toByteArray()));

                    } catch (IOException ie) {
                        logger.error("Unable to read XML from database", ie);

                        // skip this subscription entry
View Full Code Here


                + unexpirableSubscriptions.size());

        Collection<SubscriptionState> entries = expirableSubscriptions.values();

        for (SubscriptionState s : entries) {
            SubscriptionEntry se = new SubscriptionEntry();
            se.setSubscribeXml(s.getSubscribeXml());
            se.setSubscriptionId(s.getId());
            ret.add(se);
        }
        entries = unexpirableSubscriptions.values();
        for (SubscriptionState s : entries) {
            SubscriptionEntry se = new SubscriptionEntry();
            se.setSubscribeXml(s.getSubscribeXml());
            se.setSubscriptionId(s.getId());
            ret.add(se);
        }

        return ret;
    }
View Full Code Here

                int nRead;
                byte[] buffer = new byte[1024];
                ByteArrayOutputStream outStream = new ByteArrayOutputStream();

                while (rs.next()) {
                    SubscriptionEntry subscriptionEntry = new SubscriptionEntry();
                    subscriptionEntry.setSubscriptionId(rs.getString("SubscriptionId"));

                    /*
                     * Read Binary Stream
                     */
                    InputStream inStream = null;

                    try {
                        inStream = rs.getBinaryStream("content");
                        while ((nRead = inStream.read(buffer)) != -1) {
                            outStream.write(buffer, 0, nRead);
                        }
                        outStream.flush();

                        subscriptionEntry.setSubscribeXml(new String(outStream.toByteArray()));

                    } catch (IOException ie) {
                        logger.error("Unable to read XML from database", ie);

                        // skip this subscription entry
View Full Code Here

                int nRead;
                byte[] buffer = new byte[1024];
                ByteArrayOutputStream outStream = new ByteArrayOutputStream();

                while (rs.next()) {
                    SubscriptionEntry subscriptionEntry = new SubscriptionEntry();
                    subscriptionEntry.setSubscriptionId(rs.getString("SubscriptionId"));

                    /*
                     * Read Binary Stream
                     */
                    InputStream inStream = null;

                    try {
                        inStream = rs.getBinaryStream("content");
                        while ((nRead = inStream.read(buffer)) != -1) {
                            outStream.write(buffer, 0, nRead);
                        }
                        outStream.flush();

                        subscriptionEntry.setSubscribeXml(new String(outStream.toByteArray()));

                    } catch (IOException ie) {
                        logger.error("Unable to read XML from database", ie);

                        // skip this subscription entry
View Full Code Here

TOP

Related Classes of org.apache.airavata.wsmg.broker.subscription.SubscriptionEntry

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.