Package net.percederberg.mibble

Examples of net.percederberg.mibble.MibException


        throws MibException {

        ArrayList  list = new ArrayList();

        if (!(symbol instanceof MibValueSymbol)) {
            throw new MibException(symbol.getLocation(),
                                   "only values can have the " +
                                   getName() + " type");
        }
        enterprise = enterprise.initialize(log, null);
        for (int i = 0; i < variables.size(); i++) {
View Full Code Here


     */
    public MibType initialize(MibSymbol symbol, MibLoaderLog log)
        throws MibException {

        if (!(symbol instanceof MibValueSymbol)) {
            throw new MibException(symbol.getLocation(),
                                   "only values can have the " +
                                   getName() + " type");
        }
        return this;
    }
View Full Code Here

        throws MibException {

        SnmpRevision  rev;

        if (!(symbol instanceof MibValueSymbol)) {
            throw new MibException(symbol.getLocation(),
                                   "only values can have the " +
                                   getName() + " type");
        }
        for (int i = 0; i < revisions.size(); i++) {
            rev = (SnmpRevision) revisions.get(i);
View Full Code Here

     */
    public MibType initialize(MibSymbol symbol, MibLoaderLog log)
        throws MibException {

        if (!(symbol instanceof MibValueSymbol)) {
            throw new MibException(symbol.getLocation(),
                                   "only values can have the " +
                                   getName() + " type");
        }
        for (int i = 0; i < modules.size(); i++) {
            ((SnmpModuleSupport) modules.get(i)).initialize(log);
View Full Code Here

        ArrayList  list = new ArrayList();
        MibValue   value;

        if (!(symbol instanceof MibValueSymbol)) {
            throw new MibException(symbol.getLocation(),
                                   "only values can have the " +
                                   getName() + " type");
        }
        for (int i = 0; i < objects.size(); i++) {
            value = (MibValue) objects.get(i);
View Full Code Here

        throws MibException {

        ArrayList  list = new ArrayList();

        if (!(symbol instanceof MibValueSymbol)) {
            throw new MibException(symbol.getLocation(),
                                   "only values can have the " +
                                   getName() + " type");
        }
        for (int i = 0; i < notifications.size(); i++) {
            list.add(((MibValue) notifications.get(i)).initialize(log, null));
View Full Code Here

        super("OBJECT IDENTIFIER");
        this.parent = parent;
        this.name = name;
        this.value = value;
        if (parent.getChildByValue(value) != null) {
            throw new MibException(location,
                                   "cannot add duplicate OID " +
                                   "children with value " + value);
        }
        parent.addChild(null, location, this);
    }
View Full Code Here

        if (ref != null) {
            if (parent instanceof ObjectIdentifierValue) {
                oid = (ObjectIdentifierValue) parent;
                oid.addChild(log, location, this);
            } else {
                throw new MibException(ref.getLocation(),
                                       "referenced value is not an " +
                                       "object identifier");
            }
        }
        location = null;
View Full Code Here

            name = parent.name;
        } else if (parent.name != null && !parent.name.equals(name)) {
            msg = "OID component '" + parent.name + "' was previously " +
                  "defined as '" + name + "'";
            if (log == null) {
                throw new MibException(location, msg);
            } else {
                log.addWarning(location, msg);
            }
        }
        if (parent.symbol != null) {
            throw new MibException(location,
                                   "INTERNAL ERROR: OID merge with " +
                                   "symbol reference already set");
        }
        for (int i = 0; i < parent.children.size(); i++) {
            child = (ObjectIdentifierValue) parent.children.get(i);
View Full Code Here

                return null;
            }
            try {
                value = value.createReference();
            } catch (UnsupportedOperationException e) {
                throw new MibException(location, e.getMessage());
            }
            if (!(value instanceof ObjectIdentifierValue)) {
                value.setReferenceSymbol((MibValueSymbol) sym);
            }
            return value;
        } else if (sym == null) {
            message = "undefined symbol '" + name + "'";
            throw new MibException(location, message);
        } else {
            message = "referenced symbol '" + name + "' is not a value";
            throw new MibException(location, message);
        }
    }
View Full Code Here

TOP

Related Classes of net.percederberg.mibble.MibException

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.