本文整理汇总了Java中com.sun.jmx.snmp.InetAddressAcl类的典型用法代码示例。如果您正苦于以下问题:Java InetAddressAcl类的具体用法?Java InetAddressAcl怎么用?Java InetAddressAcl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InetAddressAcl类属于com.sun.jmx.snmp包,在下文中一共展示了InetAddressAcl类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createSnmpRequestHandler
import com.sun.jmx.snmp.InetAddressAcl; //导入依赖的package包/类
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);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:SnmpAdaptorServer.java
示例2: init
import com.sun.jmx.snmp.InetAddressAcl; //导入依赖的package包/类
/**
* 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);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:SnmpAdaptorServer.java
示例3: SnmpRequestHandler
import com.sun.jmx.snmp.InetAddressAcl; //导入依赖的package包/类
/**
* 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();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:SnmpRequestHandler.java
示例4: getTargetList
import com.sun.jmx.snmp.InetAddressAcl; //导入依赖的package包/类
/**
* 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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:AdaptorBootstrap.java
示例5: getTargetList
import com.sun.jmx.snmp.InetAddressAcl; //导入依赖的package包/类
/**
* 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;
}
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:33,代码来源:AdaptorBootstrap.java
示例6: SnmpAdaptorServer
import com.sun.jmx.snmp.InetAddressAcl; //导入依赖的package包/类
/**
* 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) ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:SnmpAdaptorServer.java
示例7: getInetAddressAcl
import com.sun.jmx.snmp.InetAddressAcl; //导入依赖的package包/类
/**
* 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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:SnmpAdaptorServer.java
示例8: getInetAddressAcl
import com.sun.jmx.snmp.InetAddressAcl; //导入依赖的package包/类
/**
* Returns the Ip address based ACL used by this SNMP protocol adaptor.
* @return The <CODE>InetAddressAcl</CODE> implementation.
*
* @since 1.5
*/
public InetAddressAcl getInetAddressAcl();
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:SnmpAdaptorServerMBean.java
注:本文中的com.sun.jmx.snmp.InetAddressAcl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论