Package com.lotus.sametime.lookup

Examples of com.lotus.sametime.lookup.GroupContentGetter


    // convert the recipientGroupList into group content users
    private void getGroupContent() throws CruiseControlException {
        if (this.recipientGroupSet == null)  {
            return;
        }
        GroupContentGetter groupContentGetter = this.lookupService.createGroupContentGetter();
        groupContentGetter.addGroupContentListener(this);
        try {
            for (Iterator i = this.recipientGroupSet.iterator(); i.hasNext(); ) {
                this.groupContent = null;
                STGroup group = (STGroup) i.next();
                groupContentGetter.queryGroupContent(group);
                // how long do we wait to resolve?
                boolean bored = false;
                long waitStart = System.currentTimeMillis();
                while (!this.haveGroupContent() && !bored && !this.isQueryGroupContentError()) {
                    try {
                        Thread.sleep(this.getSleepMillis());
                    } catch (InterruptedException ex) {
                        throw new CruiseControlException("sleep interrupted: " + ex);
                    }
                    bored = System.currentTimeMillis() - waitStart > this.getTimeoutMillis();
                }
                if (this.isQueryGroupContentError()) {
                    throw new CruiseControlException(this.queryGroupContentFailMessage);
                }
                if (bored && !this.haveGroupContent()) {
                    throw new CruiseControlException("bored waiting to get group content for " + group);
                }
            }
        } finally {
            groupContentGetter.removeGroupContentListener(this);
        }
    }
View Full Code Here


    // convert the recipientGroupList into group content users
    private void getGroupContent() throws CruiseControlException {
        if (this.recipientGroupSet == null)  {
            return;
        }
        GroupContentGetter groupContentGetter = this.lookupService.createGroupContentGetter();
        groupContentGetter.addGroupContentListener(this);
        try {
            for (Iterator i = this.recipientGroupSet.iterator(); i.hasNext(); ) {
                this.groupContent = null;
                STGroup group = (STGroup) i.next();
                groupContentGetter.queryGroupContent(group);
                // how long do we wait to resolve?
                boolean bored = false;
                long waitStart = System.currentTimeMillis();
                while (!this.haveGroupContent() && !bored && !this.isQueryGroupContentError()) {
                    try {
                        Thread.sleep(this.getSleepMillis());
                    } catch (InterruptedException ex) {
                        throw new CruiseControlException("sleep interrupted: " + ex);
                    }
                    bored = System.currentTimeMillis() - waitStart > this.getTimeoutMillis();
                }
                if (this.isQueryGroupContentError()) {
                    throw new CruiseControlException(this.queryGroupContentFailMessage);
                }
                if (bored && !this.haveGroupContent()) {
                    throw new CruiseControlException("bored waiting to get group content for " + group);
                }
            }
        } finally {
            groupContentGetter.removeGroupContentListener(this);
        }
    }
View Full Code Here

TOP

Related Classes of com.lotus.sametime.lookup.GroupContentGetter

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.