Java 类com.sun.jmx.snmp.InetAddressAcl 实例源码

项目:OpenJSharp    文件:SnmpAdaptorServer.java   
private void createSnmpRequestHandler(SnmpAdaptorServer server,
                                      int id,
                                      DatagramSocket s,
                                      DatagramPacket p,
                                      SnmpMibTree tree,
                                      Vector<SnmpMibAgent> m,
                                      InetAddressAcl a,
                                      SnmpPduFactory factory,
                                      SnmpUserDataFactory dataFactory,
                                      MBeanServer f,
                                      ObjectName n) {
    final SnmpRequestHandler handler =
        new SnmpRequestHandler(this, id, s, p, tree, m, a, factory,
                               dataFactory, f, n);
    threadService.submitTask(handler);
}
项目:OpenJSharp    文件:SnmpAdaptorServer.java   
/**
 * Common initializations.
 */
private void init(InetAddressAcl acl, int p, InetAddress a) {

    root= new SnmpMibTree();

    // The default Agent is initialized with a SnmpErrorHandlerAgent agent.
    root.setDefaultAgent(new SnmpErrorHandlerAgent());

    // For the trap time, use the time the agent started ...
    //
    startUpTime= java.lang.System.currentTimeMillis();
    maxActiveClientCount = 10;

    // Create the default message factory
    pduFactory = new SnmpPduFactoryBER() ;

    port = p ;
    ipacl = acl ;
    address = a ;

    if ((ipacl == null) && (useAcl == true))
        throw new IllegalArgumentException("ACL object cannot be null") ;

    threadService = new ThreadService(threadNumber);
}
项目:OpenJSharp    文件:SnmpRequestHandler.java   
/**
 * Full constructor
 */
public SnmpRequestHandler(SnmpAdaptorServer server, int id,
                          DatagramSocket s, DatagramPacket p,
                          SnmpMibTree tree, Vector<SnmpMibAgent> m,
                          InetAddressAcl a,
                          SnmpPduFactory factory,
                          SnmpUserDataFactory dataFactory,
                          MBeanServer f, ObjectName n)
{
    super(server, id, f, n);

    // Need a reference on SnmpAdaptorServer for getNext & getBulk,
    // in case of oid equality (mib overlapping).
    //
    adaptor = server;
    socket = s;
    packet = p;
    root= tree;
    mibs = new Vector<>(m);
    subs= new Hashtable<>(mibs.size());
    ipacl = a;
    pduFactory = factory ;
    userDataFactory = dataFactory ;
    //thread.start();
}
项目:jdk8u-jdk    文件:SnmpAdaptorServer.java   
private void createSnmpRequestHandler(SnmpAdaptorServer server,
                                      int id,
                                      DatagramSocket s,
                                      DatagramPacket p,
                                      SnmpMibTree tree,
                                      Vector<SnmpMibAgent> m,
                                      InetAddressAcl a,
                                      SnmpPduFactory factory,
                                      SnmpUserDataFactory dataFactory,
                                      MBeanServer f,
                                      ObjectName n) {
    final SnmpRequestHandler handler =
        new SnmpRequestHandler(this, id, s, p, tree, m, a, factory,
                               dataFactory, f, n);
    threadService.submitTask(handler);
}
项目:jdk8u-jdk    文件:SnmpAdaptorServer.java   
/**
 * Common initializations.
 */
private void init(InetAddressAcl acl, int p, InetAddress a) {

    root= new SnmpMibTree();

    // The default Agent is initialized with a SnmpErrorHandlerAgent agent.
    root.setDefaultAgent(new SnmpErrorHandlerAgent());

    // For the trap time, use the time the agent started ...
    //
    startUpTime= java.lang.System.currentTimeMillis();
    maxActiveClientCount = 10;

    // Create the default message factory
    pduFactory = new SnmpPduFactoryBER() ;

    port = p ;
    ipacl = acl ;
    address = a ;

    if ((ipacl == null) && (useAcl == true))
        throw new IllegalArgumentException("ACL object cannot be null") ;

    threadService = new ThreadService(threadNumber);
}
项目:jdk8u-jdk    文件:SnmpRequestHandler.java   
/**
 * Full constructor
 */
public SnmpRequestHandler(SnmpAdaptorServer server, int id,
                          DatagramSocket s, DatagramPacket p,
                          SnmpMibTree tree, Vector<SnmpMibAgent> m,
                          InetAddressAcl a,
                          SnmpPduFactory factory,
                          SnmpUserDataFactory dataFactory,
                          MBeanServer f, ObjectName n)
{
    super(server, id, f, n);

    // Need a reference on SnmpAdaptorServer for getNext & getBulk,
    // in case of oid equality (mib overlapping).
    //
    adaptor = server;
    socket = s;
    packet = p;
    root= tree;
    mibs = new Vector<>(m);
    subs= new Hashtable<>(mibs.size());
    ipacl = a;
    pduFactory = factory ;
    userDataFactory = dataFactory ;
    //thread.start();
}
项目:jdk8u_jdk    文件:SnmpAdaptorServer.java   
private void createSnmpRequestHandler(SnmpAdaptorServer server,
                                      int id,
                                      DatagramSocket s,
                                      DatagramPacket p,
                                      SnmpMibTree tree,
                                      Vector<SnmpMibAgent> m,
                                      InetAddressAcl a,
                                      SnmpPduFactory factory,
                                      SnmpUserDataFactory dataFactory,
                                      MBeanServer f,
                                      ObjectName n) {
    final SnmpRequestHandler handler =
        new SnmpRequestHandler(this, id, s, p, tree, m, a, factory,
                               dataFactory, f, n);
    threadService.submitTask(handler);
}
项目:jdk8u_jdk    文件:SnmpAdaptorServer.java   
/**
 * Common initializations.
 */
private void init(InetAddressAcl acl, int p, InetAddress a) {

    root= new SnmpMibTree();

    // The default Agent is initialized with a SnmpErrorHandlerAgent agent.
    root.setDefaultAgent(new SnmpErrorHandlerAgent());

    // For the trap time, use the time the agent started ...
    //
    startUpTime= java.lang.System.currentTimeMillis();
    maxActiveClientCount = 10;

    // Create the default message factory
    pduFactory = new SnmpPduFactoryBER() ;

    port = p ;
    ipacl = acl ;
    address = a ;

    if ((ipacl == null) && (useAcl == true))
        throw new IllegalArgumentException("ACL object cannot be null") ;

    threadService = new ThreadService(threadNumber);
}
项目:jdk8u_jdk    文件:SnmpRequestHandler.java   
/**
 * Full constructor
 */
public SnmpRequestHandler(SnmpAdaptorServer server, int id,
                          DatagramSocket s, DatagramPacket p,
                          SnmpMibTree tree, Vector<SnmpMibAgent> m,
                          InetAddressAcl a,
                          SnmpPduFactory factory,
                          SnmpUserDataFactory dataFactory,
                          MBeanServer f, ObjectName n)
{
    super(server, id, f, n);

    // Need a reference on SnmpAdaptorServer for getNext & getBulk,
    // in case of oid equality (mib overlapping).
    //
    adaptor = server;
    socket = s;
    packet = p;
    root= tree;
    mibs = new Vector<>(m);
    subs= new Hashtable<>(mibs.size());
    ipacl = a;
    pduFactory = factory ;
    userDataFactory = dataFactory ;
    //thread.start();
}
项目:lookaside_java-1.8.0-openjdk    文件:SnmpAdaptorServer.java   
private void createSnmpRequestHandler(SnmpAdaptorServer server,
                                      int id,
                                      DatagramSocket s,
                                      DatagramPacket p,
                                      SnmpMibTree tree,
                                      Vector<SnmpMibAgent> m,
                                      InetAddressAcl a,
                                      SnmpPduFactory factory,
                                      SnmpUserDataFactory dataFactory,
                                      MBeanServer f,
                                      ObjectName n) {
    final SnmpRequestHandler handler =
        new SnmpRequestHandler(this, id, s, p, tree, m, a, factory,
                               dataFactory, f, n);
    threadService.submitTask(handler);
}
项目:lookaside_java-1.8.0-openjdk    文件:SnmpAdaptorServer.java   
/**
 * Common initializations.
 */
private void init(InetAddressAcl acl, int p, InetAddress a) {

    root= new SnmpMibTree();

    // The default Agent is initialized with a SnmpErrorHandlerAgent agent.
    root.setDefaultAgent(new SnmpErrorHandlerAgent());

    // For the trap time, use the time the agent started ...
    //
    startUpTime= java.lang.System.currentTimeMillis();
    maxActiveClientCount = 10;

    // Create the default message factory
    pduFactory = new SnmpPduFactoryBER() ;

    port = p ;
    ipacl = acl ;
    address = a ;

    if ((ipacl == null) && (useAcl == true))
        throw new IllegalArgumentException("ACL object cannot be null") ;

    threadService = new ThreadService(threadNumber);
}
项目:lookaside_java-1.8.0-openjdk    文件:SnmpRequestHandler.java   
/**
 * Full constructor
 */
public SnmpRequestHandler(SnmpAdaptorServer server, int id,
                          DatagramSocket s, DatagramPacket p,
                          SnmpMibTree tree, Vector<SnmpMibAgent> m,
                          InetAddressAcl a,
                          SnmpPduFactory factory,
                          SnmpUserDataFactory dataFactory,
                          MBeanServer f, ObjectName n)
{
    super(server, id, f, n);

    // Need a reference on SnmpAdaptorServer for getNext & getBulk,
    // in case of oid equality (mib overlapping).
    //
    adaptor = server;
    socket = s;
    packet = p;
    root= tree;
    mibs = new Vector<>(m);
    subs= new Hashtable<>(mibs.size());
    ipacl = a;
    pduFactory = factory ;
    userDataFactory = dataFactory ;
    //thread.start();
}
项目:infobip-open-jdk-8    文件:SnmpAdaptorServer.java   
private void createSnmpRequestHandler(SnmpAdaptorServer server,
                                      int id,
                                      DatagramSocket s,
                                      DatagramPacket p,
                                      SnmpMibTree tree,
                                      Vector<SnmpMibAgent> m,
                                      InetAddressAcl a,
                                      SnmpPduFactory factory,
                                      SnmpUserDataFactory dataFactory,
                                      MBeanServer f,
                                      ObjectName n) {
    final SnmpRequestHandler handler =
        new SnmpRequestHandler(this, id, s, p, tree, m, a, factory,
                               dataFactory, f, n);
    threadService.submitTask(handler);
}
项目:infobip-open-jdk-8    文件:SnmpAdaptorServer.java   
/**
 * Common initializations.
 */
private void init(InetAddressAcl acl, int p, InetAddress a) {

    root= new SnmpMibTree();

    // The default Agent is initialized with a SnmpErrorHandlerAgent agent.
    root.setDefaultAgent(new SnmpErrorHandlerAgent());

    // For the trap time, use the time the agent started ...
    //
    startUpTime= java.lang.System.currentTimeMillis();
    maxActiveClientCount = 10;

    // Create the default message factory
    pduFactory = new SnmpPduFactoryBER() ;

    port = p ;
    ipacl = acl ;
    address = a ;

    if ((ipacl == null) && (useAcl == true))
        throw new IllegalArgumentException("ACL object cannot be null") ;

    threadService = new ThreadService(threadNumber);
}
项目:infobip-open-jdk-8    文件:SnmpRequestHandler.java   
/**
 * Full constructor
 */
public SnmpRequestHandler(SnmpAdaptorServer server, int id,
                          DatagramSocket s, DatagramPacket p,
                          SnmpMibTree tree, Vector<SnmpMibAgent> m,
                          InetAddressAcl a,
                          SnmpPduFactory factory,
                          SnmpUserDataFactory dataFactory,
                          MBeanServer f, ObjectName n)
{
    super(server, id, f, n);

    // Need a reference on SnmpAdaptorServer for getNext & getBulk,
    // in case of oid equality (mib overlapping).
    //
    adaptor = server;
    socket = s;
    packet = p;
    root= tree;
    mibs = new Vector<>(m);
    subs= new Hashtable<>(mibs.size());
    ipacl = a;
    pduFactory = factory ;
    userDataFactory = dataFactory ;
    //thread.start();
}
项目:jdk8u-dev-jdk    文件:SnmpAdaptorServer.java   
private void createSnmpRequestHandler(SnmpAdaptorServer server,
                                      int id,
                                      DatagramSocket s,
                                      DatagramPacket p,
                                      SnmpMibTree tree,
                                      Vector<SnmpMibAgent> m,
                                      InetAddressAcl a,
                                      SnmpPduFactory factory,
                                      SnmpUserDataFactory dataFactory,
                                      MBeanServer f,
                                      ObjectName n) {
    final SnmpRequestHandler handler =
        new SnmpRequestHandler(this, id, s, p, tree, m, a, factory,
                               dataFactory, f, n);
    threadService.submitTask(handler);
}
项目:jdk8u-dev-jdk    文件:SnmpAdaptorServer.java   
/**
 * Common initializations.
 */
private void init(InetAddressAcl acl, int p, InetAddress a) {

    root= new SnmpMibTree();

    // The default Agent is initialized with a SnmpErrorHandlerAgent agent.
    root.setDefaultAgent(new SnmpErrorHandlerAgent());

    // For the trap time, use the time the agent started ...
    //
    startUpTime= java.lang.System.currentTimeMillis();
    maxActiveClientCount = 10;

    // Create the default message factory
    pduFactory = new SnmpPduFactoryBER() ;

    port = p ;
    ipacl = acl ;
    address = a ;

    if ((ipacl == null) && (useAcl == true))
        throw new IllegalArgumentException("ACL object cannot be null") ;

    threadService = new ThreadService(threadNumber);
}
项目:jdk8u-dev-jdk    文件:SnmpRequestHandler.java   
/**
 * Full constructor
 */
public SnmpRequestHandler(SnmpAdaptorServer server, int id,
                          DatagramSocket s, DatagramPacket p,
                          SnmpMibTree tree, Vector<SnmpMibAgent> m,
                          InetAddressAcl a,
                          SnmpPduFactory factory,
                          SnmpUserDataFactory dataFactory,
                          MBeanServer f, ObjectName n)
{
    super(server, id, f, n);

    // Need a reference on SnmpAdaptorServer for getNext & getBulk,
    // in case of oid equality (mib overlapping).
    //
    adaptor = server;
    socket = s;
    packet = p;
    root= tree;
    mibs = new Vector<>(m);
    subs= new Hashtable<>(mibs.size());
    ipacl = a;
    pduFactory = factory ;
    userDataFactory = dataFactory ;
    //thread.start();
}
项目:OLD-OpenJDK8    文件:SnmpAdaptorServer.java   
private void createSnmpRequestHandler(SnmpAdaptorServer server,
                                      int id,
                                      DatagramSocket s,
                                      DatagramPacket p,
                                      SnmpMibTree tree,
                                      Vector<SnmpMibAgent> m,
                                      InetAddressAcl a,
                                      SnmpPduFactory factory,
                                      SnmpUserDataFactory dataFactory,
                                      MBeanServer f,
                                      ObjectName n) {
    final SnmpRequestHandler handler =
        new SnmpRequestHandler(this, id, s, p, tree, m, a, factory,
                               dataFactory, f, n);
    threadService.submitTask(handler);
}
项目:OLD-OpenJDK8    文件:SnmpAdaptorServer.java   
/**
 * Common initializations.
 */
private void init(InetAddressAcl acl, int p, InetAddress a) {

    root= new SnmpMibTree();

    // The default Agent is initialized with a SnmpErrorHandlerAgent agent.
    root.setDefaultAgent(new SnmpErrorHandlerAgent());

    // For the trap time, use the time the agent started ...
    //
    startUpTime= java.lang.System.currentTimeMillis();
    maxActiveClientCount = 10;

    // Create the default message factory
    pduFactory = new SnmpPduFactoryBER() ;

    port = p ;
    ipacl = acl ;
    address = a ;

    if ((ipacl == null) && (useAcl == true))
        throw new IllegalArgumentException("ACL object cannot be null") ;

    threadService = new ThreadService(threadNumber);
}
项目:OLD-OpenJDK8    文件:SnmpRequestHandler.java   
/**
 * Full constructor
 */
public SnmpRequestHandler(SnmpAdaptorServer server, int id,
                          DatagramSocket s, DatagramPacket p,
                          SnmpMibTree tree, Vector<SnmpMibAgent> m,
                          InetAddressAcl a,
                          SnmpPduFactory factory,
                          SnmpUserDataFactory dataFactory,
                          MBeanServer f, ObjectName n)
{
    super(server, id, f, n);

    // Need a reference on SnmpAdaptorServer for getNext & getBulk,
    // in case of oid equality (mib overlapping).
    //
    adaptor = server;
    socket = s;
    packet = p;
    root= tree;
    mibs = new Vector<>(m);
    subs= new Hashtable<>(mibs.size());
    ipacl = a;
    pduFactory = factory ;
    userDataFactory = dataFactory ;
    //thread.start();
}
项目:OpenJSharp    文件:AdaptorBootstrap.java   
/**
 * Retrieve the Trap Target List from the ACL file.
 **/
@SuppressWarnings("unchecked")
private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
                                                      int defaultTrapPort) {
    final ArrayList<NotificationTarget> result =
            new ArrayList<>();
    if (acl != null) {
        if (log.isDebugOn())
            log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));

        final Enumeration<InetAddress> td = acl.getTrapDestinations();
        for (; td.hasMoreElements() ;) {
            final InetAddress targetAddr = td.nextElement();
            final Enumeration<String> tc =
                acl.getTrapCommunities(targetAddr);
            for (;tc.hasMoreElements() ;) {
                final String community = tc.nextElement();
                final NotificationTarget target =
                    new NotificationTargetImpl(targetAddr,
                                               defaultTrapPort,
                                               community);
                if (log.isDebugOn())
                    log.debug("getTargetList",
                              Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.adding",
                                            target.toString()));
                result.add(target);
            }
        }
    }
    return result;
}
项目:jdk8u-jdk    文件:AdaptorBootstrap.java   
/**
 * Retrieve the Trap Target List from the ACL file.
 **/
@SuppressWarnings("unchecked")
private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
                                                      int defaultTrapPort) {
    final ArrayList<NotificationTarget> result =
            new ArrayList<>();
    if (acl != null) {
        if (log.isDebugOn())
            log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));

        final Enumeration<InetAddress> td = acl.getTrapDestinations();
        for (; td.hasMoreElements() ;) {
            final InetAddress targetAddr = td.nextElement();
            final Enumeration<String> tc =
                acl.getTrapCommunities(targetAddr);
            for (;tc.hasMoreElements() ;) {
                final String community = tc.nextElement();
                final NotificationTarget target =
                    new NotificationTargetImpl(targetAddr,
                                               defaultTrapPort,
                                               community);
                if (log.isDebugOn())
                    log.debug("getTargetList",
                              Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.adding",
                                            target.toString()));
                result.add(target);
            }
        }
    }
    return result;
}
项目:jdk8u_jdk    文件:AdaptorBootstrap.java   
/**
 * Retrieve the Trap Target List from the ACL file.
 **/
@SuppressWarnings("unchecked")
private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
                                                      int defaultTrapPort) {
    final ArrayList<NotificationTarget> result =
            new ArrayList<>();
    if (acl != null) {
        if (log.isDebugOn())
            log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));

        final Enumeration<InetAddress> td = acl.getTrapDestinations();
        for (; td.hasMoreElements() ;) {
            final InetAddress targetAddr = td.nextElement();
            final Enumeration<String> tc =
                acl.getTrapCommunities(targetAddr);
            for (;tc.hasMoreElements() ;) {
                final String community = tc.nextElement();
                final NotificationTarget target =
                    new NotificationTargetImpl(targetAddr,
                                               defaultTrapPort,
                                               community);
                if (log.isDebugOn())
                    log.debug("getTargetList",
                              Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.adding",
                                            target.toString()));
                result.add(target);
            }
        }
    }
    return result;
}
项目:lookaside_java-1.8.0-openjdk    文件:AdaptorBootstrap.java   
/**
 * Retrieve the Trap Target List from the ACL file.
 **/
@SuppressWarnings("unchecked")
private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
                                                      int defaultTrapPort) {
    final ArrayList<NotificationTarget> result =
            new ArrayList<>();
    if (acl != null) {
        if (log.isDebugOn())
            log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));

        final Enumeration<InetAddress> td = acl.getTrapDestinations();
        for (; td.hasMoreElements() ;) {
            final InetAddress targetAddr = td.nextElement();
            final Enumeration<String> tc =
                acl.getTrapCommunities(targetAddr);
            for (;tc.hasMoreElements() ;) {
                final String community = tc.nextElement();
                final NotificationTarget target =
                    new NotificationTargetImpl(targetAddr,
                                               defaultTrapPort,
                                               community);
                if (log.isDebugOn())
                    log.debug("getTargetList",
                              Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.adding",
                                            target.toString()));
                result.add(target);
            }
        }
    }
    return result;
}
项目:infobip-open-jdk-8    文件:AdaptorBootstrap.java   
/**
 * Retrieve the Trap Target List from the ACL file.
 **/
@SuppressWarnings("unchecked")
private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
                                                      int defaultTrapPort) {
    final ArrayList<NotificationTarget> result =
            new ArrayList<>();
    if (acl != null) {
        if (log.isDebugOn())
            log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));

        final Enumeration<InetAddress> td = acl.getTrapDestinations();
        for (; td.hasMoreElements() ;) {
            final InetAddress targetAddr = td.nextElement();
            final Enumeration<String> tc =
                acl.getTrapCommunities(targetAddr);
            for (;tc.hasMoreElements() ;) {
                final String community = tc.nextElement();
                final NotificationTarget target =
                    new NotificationTargetImpl(targetAddr,
                                               defaultTrapPort,
                                               community);
                if (log.isDebugOn())
                    log.debug("getTargetList",
                              Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.adding",
                                            target.toString()));
                result.add(target);
            }
        }
    }
    return result;
}
项目:jdk8u-dev-jdk    文件:AdaptorBootstrap.java   
/**
 * Retrieve the Trap Target List from the ACL file.
 **/
@SuppressWarnings("unchecked")
private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
                                                      int defaultTrapPort) {
    final ArrayList<NotificationTarget> result =
            new ArrayList<>();
    if (acl != null) {
        if (log.isDebugOn())
            log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));

        final Enumeration<InetAddress> td = acl.getTrapDestinations();
        for (; td.hasMoreElements() ;) {
            final InetAddress targetAddr = td.nextElement();
            final Enumeration<String> tc =
                acl.getTrapCommunities(targetAddr);
            for (;tc.hasMoreElements() ;) {
                final String community = tc.nextElement();
                final NotificationTarget target =
                    new NotificationTargetImpl(targetAddr,
                                               defaultTrapPort,
                                               community);
                if (log.isDebugOn())
                    log.debug("getTargetList",
                              Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.adding",
                                            target.toString()));
                result.add(target);
            }
        }
    }
    return result;
}
项目:jdk7-jdk    文件:AdaptorBootstrap.java   
/**
 * Retrieve the Trap Target List from the ACL file.
 **/
private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
                                                      int defaultTrapPort) {
    final ArrayList<NotificationTarget> result =
            new ArrayList<NotificationTarget>();
    if (acl != null) {
        if (log.isDebugOn())
            log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));

        final Enumeration td=acl.getTrapDestinations();
        for (; td.hasMoreElements() ;) {
            final InetAddress targetAddr = (InetAddress)td.nextElement();
            final Enumeration tc =
                acl.getTrapCommunities(targetAddr);
            for (;tc.hasMoreElements() ;) {
                final String community = (String) tc.nextElement();
                final NotificationTarget target =
                    new NotificationTargetImpl(targetAddr,
                                               defaultTrapPort,
                                               community);
                if (log.isDebugOn())
                    log.debug("getTargetList",
                              Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.adding",
                                            target.toString()));
                result.add(target);
            }
        }
    }
    return result;
}
项目:openjdk-source-code-learn    文件:AdaptorBootstrap.java   
/**
 * Retrieve the Trap Target List from the ACL file.
 **/
private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
                                                      int defaultTrapPort) {
    final ArrayList<NotificationTarget> result =
            new ArrayList<NotificationTarget>();
    if (acl != null) {
        if (log.isDebugOn())
            log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));

        final Enumeration td=acl.getTrapDestinations();
        for (; td.hasMoreElements() ;) {
            final InetAddress targetAddr = (InetAddress)td.nextElement();
            final Enumeration tc =
                acl.getTrapCommunities(targetAddr);
            for (;tc.hasMoreElements() ;) {
                final String community = (String) tc.nextElement();
                final NotificationTarget target =
                    new NotificationTargetImpl(targetAddr,
                                               defaultTrapPort,
                                               community);
                if (log.isDebugOn())
                    log.debug("getTargetList",
                              Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.adding",
                                            target.toString()));
                result.add(target);
            }
        }
    }
    return result;
}
项目:OLD-OpenJDK8    文件:AdaptorBootstrap.java   
/**
 * Retrieve the Trap Target List from the ACL file.
 **/
@SuppressWarnings("unchecked")
private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
                                                      int defaultTrapPort) {
    final ArrayList<NotificationTarget> result =
            new ArrayList<>();
    if (acl != null) {
        if (log.isDebugOn())
            log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));

        final Enumeration<InetAddress> td = acl.getTrapDestinations();
        for (; td.hasMoreElements() ;) {
            final InetAddress targetAddr = td.nextElement();
            final Enumeration<String> tc =
                acl.getTrapCommunities(targetAddr);
            for (;tc.hasMoreElements() ;) {
                final String community = tc.nextElement();
                final NotificationTarget target =
                    new NotificationTargetImpl(targetAddr,
                                               defaultTrapPort,
                                               community);
                if (log.isDebugOn())
                    log.debug("getTargetList",
                              Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.adding",
                                            target.toString()));
                result.add(target);
            }
        }
    }
    return result;
}
项目:openjdk-jdk7u-jdk    文件:AdaptorBootstrap.java   
/**
 * Retrieve the Trap Target List from the ACL file.
 **/
private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
                                                      int defaultTrapPort) {
    final ArrayList<NotificationTarget> result =
            new ArrayList<NotificationTarget>();
    if (acl != null) {
        if (log.isDebugOn())
            log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));

        final Enumeration td=acl.getTrapDestinations();
        for (; td.hasMoreElements() ;) {
            final InetAddress targetAddr = (InetAddress)td.nextElement();
            final Enumeration tc =
                acl.getTrapCommunities(targetAddr);
            for (;tc.hasMoreElements() ;) {
                final String community = (String) tc.nextElement();
                final NotificationTarget target =
                    new NotificationTargetImpl(targetAddr,
                                               defaultTrapPort,
                                               community);
                if (log.isDebugOn())
                    log.debug("getTargetList",
                              Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.adding",
                                            target.toString()));
                result.add(target);
            }
        }
    }
    return result;
}
项目:OpenJSharp    文件:SnmpAdaptorServer.java   
/**
 * Initializes this SNMP protocol adaptor using the default port (161)
 * and the specified IP address based ACL implementation.
 *
 * @param acl The <CODE>InetAddressAcl</CODE> implementation.
 *        <code>null</code> means no ACL - everybody is authorized.
 *
 * @since 1.5
 */
public SnmpAdaptorServer(InetAddressAcl acl) {
    this(false, acl, com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_PORT,
         null) ;
}
项目:OpenJSharp    文件:SnmpAdaptorServer.java   
/**
 * Initializes this SNMP protocol adaptor using the specified port and the
 * specified IP address based ACL implementation.
 *
 * @param acl The <CODE>InetAddressAcl</CODE> implementation.
 *        <code>null</code> means no ACL - everybody is authorized.
 * @param port The port number for sending SNMP responses.
 *
 * @since 1.5
 */
public SnmpAdaptorServer(InetAddressAcl acl, int port) {
    this(false, acl, port, null) ;
}
项目:OpenJSharp    文件:SnmpAdaptorServer.java   
/**
 * Initializes this SNMP protocol adaptor using the specified IP
 * address based ACL implementation and the specified
 * <CODE>InetAddress</CODE>.
 *
 * @param acl The <CODE>InetAddressAcl</CODE> implementation.
 * @param addr The IP address to bind.
 *
 * @since 1.5
 */
public SnmpAdaptorServer(InetAddressAcl acl, InetAddress addr) {
    this(false, acl, com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_PORT,
         addr) ;
}
项目:OpenJSharp    文件:SnmpAdaptorServer.java   
/**
 * Initializes this SNMP protocol adaptor using the specified port, the
 * specified  address based ACL implementation and the specified
 * <CODE>InetAddress</CODE>.
 *
 * @param acl The <CODE>InetAddressAcl</CODE> implementation.
 * @param port The port number for sending SNMP responses.
 * @param addr The IP address to bind.
 *
 * @since 1.5
 */
public SnmpAdaptorServer(InetAddressAcl acl, int port, InetAddress addr) {
    this(false, acl, port, addr);
}
项目:OpenJSharp    文件:SnmpAdaptorServer.java   
/**
 * Returns the Ip address based ACL used by this SNMP protocol adaptor.
 * @return The <CODE>InetAddressAcl</CODE> implementation.
 *
 * @since 1.5
 */
@Override
public InetAddressAcl getInetAddressAcl() {
    return ipacl;
}
项目:OpenJSharp    文件:SnmpAdaptorServerMBean.java   
/**
 * Returns the Ip address based ACL used by this SNMP protocol adaptor.
 * @return The <CODE>InetAddressAcl</CODE> implementation.
 *
 * @since 1.5
 */
public InetAddressAcl getInetAddressAcl();
项目:jdk8u-jdk    文件:SnmpAdaptorServer.java   
/**
 * Initializes this SNMP protocol adaptor using the default port (161)
 * and the specified IP address based ACL implementation.
 *
 * @param acl The <CODE>InetAddressAcl</CODE> implementation.
 *        <code>null</code> means no ACL - everybody is authorized.
 *
 * @since 1.5
 */
public SnmpAdaptorServer(InetAddressAcl acl) {
    this(false, acl, com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_PORT,
         null) ;
}
项目:jdk8u-jdk    文件:SnmpAdaptorServer.java   
/**
 * Initializes this SNMP protocol adaptor using the specified port and the
 * specified IP address based ACL implementation.
 *
 * @param acl The <CODE>InetAddressAcl</CODE> implementation.
 *        <code>null</code> means no ACL - everybody is authorized.
 * @param port The port number for sending SNMP responses.
 *
 * @since 1.5
 */
public SnmpAdaptorServer(InetAddressAcl acl, int port) {
    this(false, acl, port, null) ;
}
项目:jdk8u-jdk    文件:SnmpAdaptorServer.java   
/**
 * Initializes this SNMP protocol adaptor using the specified IP
 * address based ACL implementation and the specified
 * <CODE>InetAddress</CODE>.
 *
 * @param acl The <CODE>InetAddressAcl</CODE> implementation.
 * @param addr The IP address to bind.
 *
 * @since 1.5
 */
public SnmpAdaptorServer(InetAddressAcl acl, InetAddress addr) {
    this(false, acl, com.sun.jmx.snmp.ServiceName.SNMP_ADAPTOR_PORT,
         addr) ;
}