com.sun.jmx.snmp.agent.SnmpMibHandler Java Examples

The following examples show how to use com.sun.jmx.snmp.agent.SnmpMibHandler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SnmpAdaptorServer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #2
Source File: SnmpAdaptorServer.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #3
Source File: SnmpAdaptorServer.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #4
Source File: SnmpAdaptorServer.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #5
Source File: SnmpAdaptorServer.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #6
Source File: SnmpAdaptorServer.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #7
Source File: SnmpAdaptorServer.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #8
Source File: SnmpAdaptorServer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #9
Source File: SnmpAdaptorServer.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #10
Source File: SnmpAdaptorServer.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #11
Source File: SnmpAdaptorServer.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #12
Source File: SnmpAdaptorServer.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #13
Source File: SnmpAdaptorServer.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #14
Source File: SnmpAdaptorServer.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 * This method is to be called to set a specific agent to a specific OID.
 * This can be useful when dealing with MIB overlapping.
 * Some OID can be implemented in more than one MIB. In this case,
 * the OID nearer agent will be used on SNMP operations.
 *
 * @param mib The MIB to add.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib, SnmpOid[] oids)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    //If null oid array, just add it to the mib.
    if(oids == null)
        return addMib(mib);

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    for (int i = 0; i < oids.length; i++) {
        root.register(mib, oids[i].longValue());
    }
    return this;
}
 
Example #15
Source File: SnmpAdaptorServer.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #16
Source File: SnmpAdaptorServer.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #17
Source File: SnmpAdaptorServer.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #18
Source File: SnmpAdaptorServer.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #19
Source File: SnmpAdaptorServer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #20
Source File: SnmpAdaptorServer.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #21
Source File: SnmpAdaptorServer.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #22
Source File: SnmpAdaptorServer.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #23
Source File: SnmpAdaptorServer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #24
Source File: SnmpAdaptorServer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #25
Source File: SnmpAdaptorServer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #26
Source File: SnmpAdaptorServer.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #27
Source File: SnmpAdaptorServer.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler.
 *
 * @param mib The MIB to add.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib)
    throws IllegalArgumentException {
    if (mib == null) {
        throw new IllegalArgumentException() ;
    }

    if(!mibs.contains(mib))
        mibs.addElement(mib);

    root.register(mib);

    return this;
}
 
Example #28
Source File: SnmpAdaptorServer.java    From openjdk-8-source with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler. In SNMP V1 and V2 the
 * <CODE>contextName</CODE> is useless and this method
 * is equivalent to <CODE>addMib(SnmpMibAgent mib, SnmpOid[] oids)</CODE>.
 *
 * @param mib The MIB to add.
 * @param contextName The MIB context. If null is passed, will be
 *        registered in the default context.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib,
                             String contextName,
                             SnmpOid[] oids)
    throws IllegalArgumentException {

    return addMib(mib, oids);
}
 
Example #29
Source File: SnmpAdaptorServer.java    From hottub with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler. In SNMP V1 and V2 the
 * <CODE>contextName</CODE> is useless and this method
 * is equivalent to <CODE>addMib(SnmpMibAgent mib, SnmpOid[] oids)</CODE>.
 *
 * @param mib The MIB to add.
 * @param contextName The MIB context. If null is passed, will be
 *        registered in the default context.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib,
                             String contextName,
                             SnmpOid[] oids)
    throws IllegalArgumentException {

    return addMib(mib, oids);
}
 
Example #30
Source File: SnmpAdaptorServer.java    From jdk1.8-source-analysis with Apache License 2.0 3 votes vote down vote up
/**
 * Adds a new MIB in the SNMP MIB handler. In SNMP V1 and V2 the
 * <CODE>contextName</CODE> is useless and this method
 * is equivalent to <CODE>addMib(SnmpMibAgent mib, SnmpOid[] oids)</CODE>.
 *
 * @param mib The MIB to add.
 * @param contextName The MIB context. If null is passed, will be
 *        registered in the default context.
 * @param oids The set of OIDs this agent implements.
 *
 * @return A reference to the SNMP MIB handler.
 *
 * @exception IllegalArgumentException If the parameter is null.
 *
 * @since 1.5
 */
@Override
public SnmpMibHandler addMib(SnmpMibAgent mib,
                             String contextName,
                             SnmpOid[] oids)
    throws IllegalArgumentException {

    return addMib(mib, oids);
}