Package org.nimbustools.ctxbroker

Examples of org.nimbustools.ctxbroker.ContextBrokerException


        String url;
        try {
            url = ServiceHost.getBaseURL()
                            + BrokerConstants.CTX_BROKER_PATH;
        } catch (IOException e) {
            throw new ContextBrokerException(e.getMessage(), e);
        }

        this.newBootstrap("fake-UUID", url, expires);

        // for now, not going through and checking validity of cert
View Full Code Here


    // always access it this way internally in the class or there may
    // be a check then act on the cache set
    public synchronized Blackboard getBlackboard()
                                    throws ContextBrokerException {
        if (this.resourceID == null) {
            throw new ContextBrokerException("no resource id yet (?)");
        }
        if (this.blackboard == null) {
            this.blackboard =
                    Blackboard.createOrGetBlackboard(this.resourceID);
        }
View Full Code Here

    }

    public void noMoreInjections() throws ContextBrokerException {

        if (!this.allowInjections) {
            throw new ContextBrokerException("Erroneous: noMoreInjections " +
                    "called but injections weren't expected in the first" +
                    "place");
        }

        synchronized (this.statusLock) {
View Full Code Here

                // (without going through role finding which will always place
                // identities in the filled requires document for a role,
                // regardless if all identities are required or not).

                if (givenID.length > 1) {
                    throw new ContextBrokerException("Given requires " +
                            "section has multiple identity elements? Currently " +
                            "only supporting zero or one empty identity element " +
                            "in requires section (which signals all identities " +
                            "are desired).  Will not contextualize #" +
                            workspaceID + ".");
                }

                if (givenID[0].getHostname() != null ||
                        givenID[0].getIp() != null ||
                        givenID[0].getPubkey() != null) {

                    throw new ContextBrokerException("Given requires " +
                            "section has an identity element with information " +
                            "in it? Currently only supporting zero or one " +
                            "*empty* identity element in requires section " +
                            "(which signals all identities are desired).  Will " +
                            "not contextualize #" + workspaceID + ".");
View Full Code Here

                    Requires_TypeData data = datas[i];
                    final String dataName = data.getName();

                    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 (?)");
                    }
                    dataPairs[i] = new DataPair(dataName, data.get_value());
                }
                return dataPairs;
            }
View Full Code Here

        // name attribute is relevant for given requires roles, NOT value
        final String roleName = typeRole.getName();
        if (roleName == null || roleName.trim().equals("")) {
            // does not happen when object is created via XML (which is usual)
            throw new ContextBrokerException("Empty role name (?)");
        }

        boolean hostRequired = false;
        if (typeRole.getHostname() != null &&
                typeRole.getHostname()) {
View Full Code Here

TOP

Related Classes of org.nimbustools.ctxbroker.ContextBrokerException

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.