Examples of ContextBrokerException


Examples of org.nimbustools.ctxbroker.ContextBrokerException

    public String getID(EndpointReferenceType epr)
            throws ContextBrokerException {

        if (epr == null) {
            throw new ContextBrokerException("epr is null");
        }

        if (epr.getProperties() == null) {
            throw new ContextBrokerException("epr properties are null");
        }

        MessageElement key = epr.getProperties().get(this.getKeyTypeName());
        if (key == null) {
            throw new ContextBrokerException("contextualization " +
                    "resource key not present in EPR");
        }

        return key.getValue();
    }
View Full Code Here

Examples of org.nimbustools.ctxbroker.ContextBrokerException

    }

    public static String getID(ResourceKey key)
                                    throws ContextBrokerException {
        if (key == null) {
            throw new ContextBrokerException("key is null");
        }
        return (String)key.getValue();
    }
View Full Code Here

Examples of org.nimbustools.ctxbroker.ContextBrokerException

        Identity perhaps = this.identities.get(iface);
        if (perhaps != null) {
            // Binding does not allow different NIC names in the real id's,
            // it must be the provides section's fault
            throw new ContextBrokerException("Duplicate interface found." +
                    "  Identity names in provides section can not be" +
                    " duplicated. [[interface already added: interface = " +
                    iface + ", given Identity = " + id + ", Identity " +
                    "already given for this interface: " + perhaps + "]]");
        }
View Full Code Here

Examples of org.nimbustools.ctxbroker.ContextBrokerException

    public void injectData(String dataName, String value)
            throws ContextBrokerException {

        if (dataName == null || dataName.trim().length() == 0) {
            // does not happen when object is created via XML (which is usual)
            throw new ContextBrokerException("Empty data element name (?)");
        }

        synchronized (this.dbLock) {
            this._newData(dataName, value);
        }
View Full Code Here

Examples of org.nimbustools.ctxbroker.ContextBrokerException

        synchronized (this.dbLock) {

            if (this.totalNodes > 0) {
                if (this.totalNodes != totalNodesFromAgent) {
                    throw new ContextBrokerException("Context '" +
                        this.id + "' has received a conflicting " +
                        "total node count.  Was previously " + this.totalNodes +
                        "but has received a cluster definition with a total " +
                        "of " + totalNodesFromAgent);
                }
            } else {
                this.totalNodes = totalNodesFromAgent;
            }

            this.numNodes += 1;

            if (this.numNodes > this.totalNodes) {
                throw new ContextBrokerException("Context '" +
                        this.id + "' has heard from a new agent which " +
                        "makes the total node count exceed the theoretical" +
                        "maximum from the cluster definitions (" +
                        this.totalNodes + ").");
            }

            // invalidate cache if it existed
            this.allIdentityCache = null;

            Node node = this.allNodes.get(workspaceID);
            if (node != null) {
                throw new ContextBrokerException("Blackboard has " +
                        "already added node with ID #" + workspaceID);
            }

            String[] requiredDataNames = null;
            if (requiredData != null && requiredData.length > 0) {
View Full Code Here

Examples of org.nimbustools.ctxbroker.ContextBrokerException

                // only this specific interface provides the role

                final Identity identity = node.getParticularIdentity(iface);
                if (identity == null) {
                    throw new ContextBrokerException("There is an " +
                            "interface specification ('" + iface + "') in " +
                            "the provides section for role '" + roleName +
                            "' that does not have matching identity element " +
                            "with that interface name.  Cannot " +
                            "contextualize #" + node.getId());
View Full Code Here

Examples of org.nimbustools.ctxbroker.ContextBrokerException

                        found = true;
                        break;
                    }
                }
                if (!found) {
                    throw new ContextBrokerException("Set contained a " +
                            "required role already but we cannot find the " +
                            "object in the set's iterator (?).  Role: " + role);
                }
            }
View Full Code Here

Examples of org.nimbustools.ctxbroker.ContextBrokerException

            throw new IllegalArgumentException("workspaceID cannot be null");
        }
       
        final Node node = this.allNodes.get(workspaceID);
        if (node == null) {
            throw new ContextBrokerException("Blackboard is not aware " +
                    "of node with ID #" + workspaceID);
        }

        synchronized(this.dbLock) {
View Full Code Here

Examples of org.nimbustools.ctxbroker.ContextBrokerException

    public void okExit(Integer workspaceID)
            throws ContextBrokerException {

        final Node node = this.allNodes.get(workspaceID);
        if (node == null) {
            throw new ContextBrokerException("unknown workspace #" + workspaceID);
        }
        synchronized (this.dbLock) {
            CtxResult result = node.getCtxResult();

            if (result.hasOkOccurred() || result.hasErrorOccurred()) {
                throw new ContextBrokerException("already received " +
                        "exiting report from workspace #" + workspaceID);
            }

            result.setOkOccurred(true);
View Full Code Here

Examples of org.nimbustools.ctxbroker.ContextBrokerException

                          String errorMessage)
            throws ContextBrokerException {

        final Node node = this.allNodes.get(workspaceID);
        if (node == null) {
            throw new ContextBrokerException("unknown workspace #" + workspaceID);
        }
        synchronized (this.dbLock) {
            CtxResult result = node.getCtxResult();

            if (result.hasOkOccurred() || result.hasErrorOccurred()) {
                throw new ContextBrokerException("already received " +
                        "exiting report from workspace #" + workspaceID);
            }

            result.setErrorOccurred(true);
            result.setErrorCode(exitCode);
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.