Java Code Examples for com.sun.jmx.snmp.SnmpPeer#getParams()
The following examples show how to use
com.sun.jmx.snmp.SnmpPeer#getParams() .
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 hottub with GNU General Public License v2.0 | 6 votes |
/** * Sends a trap using SNMP V1 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param agentAddr The agent address to be used for the trap. * @param enterpOid The enterprise OID to be used for the trap. * @param generic The generic number of the trap. * @param specific The specific number of the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV1Trap(SnmpPeer peer, SnmpIpAddress agentAddr, SnmpOid enterpOid, int generic, int specific, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV1Trap(peer.getDestAddr(), peer.getDestPort(), agentAddr, p.getRdCommunity(), enterpOid, generic, specific, varBindList, time); }
Example 2
Source File: SnmpAdaptorServer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Sends a trap using SNMP V1 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param agentAddr The agent address to be used for the trap. * @param enterpOid The enterprise OID to be used for the trap. * @param generic The generic number of the trap. * @param specific The specific number of the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV1Trap(SnmpPeer peer, SnmpIpAddress agentAddr, SnmpOid enterpOid, int generic, int specific, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV1Trap(peer.getDestAddr(), peer.getDestPort(), agentAddr, p.getRdCommunity(), enterpOid, generic, specific, varBindList, time); }
Example 3
Source File: SnmpAdaptorServer.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Sends a trap using SNMP V1 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param agentAddr The agent address to be used for the trap. * @param enterpOid The enterprise OID to be used for the trap. * @param generic The generic number of the trap. * @param specific The specific number of the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV1Trap(SnmpPeer peer, SnmpIpAddress agentAddr, SnmpOid enterpOid, int generic, int specific, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV1Trap(peer.getDestAddr(), peer.getDestPort(), agentAddr, p.getRdCommunity(), enterpOid, generic, specific, varBindList, time); }
Example 4
Source File: SnmpAdaptorServer.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Sends a trap using SNMP V1 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param agentAddr The agent address to be used for the trap. * @param enterpOid The enterprise OID to be used for the trap. * @param generic The generic number of the trap. * @param specific The specific number of the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV1Trap(SnmpPeer peer, SnmpIpAddress agentAddr, SnmpOid enterpOid, int generic, int specific, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV1Trap(peer.getDestAddr(), peer.getDestPort(), agentAddr, p.getRdCommunity(), enterpOid, generic, specific, varBindList, time); }
Example 5
Source File: SnmpAdaptorServer.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Sends a trap using SNMP V1 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param agentAddr The agent address to be used for the trap. * @param enterpOid The enterprise OID to be used for the trap. * @param generic The generic number of the trap. * @param specific The specific number of the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV1Trap(SnmpPeer peer, SnmpIpAddress agentAddr, SnmpOid enterpOid, int generic, int specific, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV1Trap(peer.getDestAddr(), peer.getDestPort(), agentAddr, p.getRdCommunity(), enterpOid, generic, specific, varBindList, time); }
Example 6
Source File: SnmpAdaptorServer.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * Sends a trap using SNMP V1 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param agentAddr The agent address to be used for the trap. * @param enterpOid The enterprise OID to be used for the trap. * @param generic The generic number of the trap. * @param specific The specific number of the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV1Trap(SnmpPeer peer, SnmpIpAddress agentAddr, SnmpOid enterpOid, int generic, int specific, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV1Trap(peer.getDestAddr(), peer.getDestPort(), agentAddr, p.getRdCommunity(), enterpOid, generic, specific, varBindList, time); }
Example 7
Source File: SnmpAdaptorServer.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Sends an inform using SNMP V2 inform request format. * <BR>The inform is sent to the specified <CODE>SnmpPeer</CODE> * destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getInformCommunity() </CODE>). * <BR>The variable list included in the outgoing inform is composed * of the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with its current value</LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * To send an inform request, the SNMP adaptor server must be active. * * @param peer The <CODE>SnmpPeer</CODE> destination for this inform * request. * @param cb The callback that is invoked when a request is complete. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * * @return The inform request object. * * @exception IllegalStateException This method has been invoked while * the SNMP adaptor server was not active. * @exception IOException An I/O error occurred while sending the * inform request. * @exception SnmpStatusException If the inform request exceeds the * limit defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public SnmpInformRequest snmpInformRequest(SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); return snmpInformRequest(peer.getDestAddr(), peer.getDestPort(), p.getInformCommunity(), cb, trapOid, varBindList); }
Example 8
Source File: SnmpAdaptorServer.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Sends an inform using SNMP V2 inform request format. * <BR>The inform is sent to the specified <CODE>SnmpPeer</CODE> * destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getInformCommunity() </CODE>). * <BR>The variable list included in the outgoing inform is composed * of the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with its current value</LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * To send an inform request, the SNMP adaptor server must be active. * * @param peer The <CODE>SnmpPeer</CODE> destination for this inform * request. * @param cb The callback that is invoked when a request is complete. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * * @return The inform request object. * * @exception IllegalStateException This method has been invoked while * the SNMP adaptor server was not active. * @exception IOException An I/O error occurred while sending the * inform request. * @exception SnmpStatusException If the inform request exceeds the * limit defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public SnmpInformRequest snmpInformRequest(SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); return snmpInformRequest(peer.getDestAddr(), peer.getDestPort(), p.getInformCommunity(), cb, trapOid, varBindList); }
Example 9
Source File: SnmpAdaptorServer.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
/** * Sends a trap using SNMP V2 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * <BR>The variable list included in the outgoing trap is composed of * the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with the value specified by * <CODE>time</CODE></LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV2Trap(SnmpPeer peer, SnmpOid trapOid, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV2Trap(peer.getDestAddr(), peer.getDestPort(), p.getRdCommunity(), trapOid, varBindList, time); }
Example 10
Source File: SnmpAdaptorServer.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
/** * Sends a trap using SNMP V2 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * <BR>The variable list included in the outgoing trap is composed of * the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with the value specified by * <CODE>time</CODE></LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV2Trap(SnmpPeer peer, SnmpOid trapOid, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV2Trap(peer.getDestAddr(), peer.getDestPort(), p.getRdCommunity(), trapOid, varBindList, time); }
Example 11
Source File: SnmpAdaptorServer.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * Sends a trap using SNMP V2 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * <BR>The variable list included in the outgoing trap is composed of * the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with the value specified by * <CODE>time</CODE></LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV2Trap(SnmpPeer peer, SnmpOid trapOid, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV2Trap(peer.getDestAddr(), peer.getDestPort(), p.getRdCommunity(), trapOid, varBindList, time); }
Example 12
Source File: SnmpAdaptorServer.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
/** * Sends a trap using SNMP V2 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * <BR>The variable list included in the outgoing trap is composed of * the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with the value specified by * <CODE>time</CODE></LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV2Trap(SnmpPeer peer, SnmpOid trapOid, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV2Trap(peer.getDestAddr(), peer.getDestPort(), p.getRdCommunity(), trapOid, varBindList, time); }
Example 13
Source File: SnmpAdaptorServer.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Sends an inform using SNMP V2 inform request format. * <BR>The inform is sent to the specified <CODE>SnmpPeer</CODE> * destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getInformCommunity() </CODE>). * <BR>The variable list included in the outgoing inform is composed * of the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with its current value</LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * To send an inform request, the SNMP adaptor server must be active. * * @param peer The <CODE>SnmpPeer</CODE> destination for this inform * request. * @param cb The callback that is invoked when a request is complete. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * * @return The inform request object. * * @exception IllegalStateException This method has been invoked while * the SNMP adaptor server was not active. * @exception IOException An I/O error occurred while sending the * inform request. * @exception SnmpStatusException If the inform request exceeds the * limit defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public SnmpInformRequest snmpInformRequest(SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); return snmpInformRequest(peer.getDestAddr(), peer.getDestPort(), p.getInformCommunity(), cb, trapOid, varBindList); }
Example 14
Source File: SnmpAdaptorServer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Sends an inform using SNMP V2 inform request format. * <BR>The inform is sent to the specified <CODE>SnmpPeer</CODE> * destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getInformCommunity() </CODE>). * <BR>The variable list included in the outgoing inform is composed * of the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with its current value</LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * To send an inform request, the SNMP adaptor server must be active. * * @param peer The <CODE>SnmpPeer</CODE> destination for this inform * request. * @param cb The callback that is invoked when a request is complete. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * * @return The inform request object. * * @exception IllegalStateException This method has been invoked while * the SNMP adaptor server was not active. * @exception IOException An I/O error occurred while sending the * inform request. * @exception SnmpStatusException If the inform request exceeds the * limit defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public SnmpInformRequest snmpInformRequest(SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); return snmpInformRequest(peer.getDestAddr(), peer.getDestPort(), p.getInformCommunity(), cb, trapOid, varBindList); }
Example 15
Source File: SnmpAdaptorServer.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Sends a trap using SNMP V2 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * <BR>The variable list included in the outgoing trap is composed of * the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with the value specified by * <CODE>time</CODE></LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV2Trap(SnmpPeer peer, SnmpOid trapOid, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV2Trap(peer.getDestAddr(), peer.getDestPort(), p.getRdCommunity(), trapOid, varBindList, time); }
Example 16
Source File: SnmpAdaptorServer.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
/** * Sends an inform using SNMP V2 inform request format. * <BR>The inform is sent to the specified <CODE>SnmpPeer</CODE> * destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getInformCommunity() </CODE>). * <BR>The variable list included in the outgoing inform is composed * of the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with its current value</LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * To send an inform request, the SNMP adaptor server must be active. * * @param peer The <CODE>SnmpPeer</CODE> destination for this inform * request. * @param cb The callback that is invoked when a request is complete. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * * @return The inform request object. * * @exception IllegalStateException This method has been invoked while * the SNMP adaptor server was not active. * @exception IOException An I/O error occurred while sending the * inform request. * @exception SnmpStatusException If the inform request exceeds the * limit defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public SnmpInformRequest snmpInformRequest(SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); return snmpInformRequest(peer.getDestAddr(), peer.getDestPort(), p.getInformCommunity(), cb, trapOid, varBindList); }
Example 17
Source File: SnmpAdaptorServer.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
/** * Sends a trap using SNMP V2 trap format. * <BR>The trap is sent to the specified <CODE>SnmpPeer</CODE> destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getRdCommunity() </CODE>). * <BR>The variable list included in the outgoing trap is composed of * the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with the value specified by * <CODE>time</CODE></LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * * @param peer The <CODE>SnmpPeer</CODE> destination of the trap. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * @param time The time stamp (overwrite the current time). * * @exception IOException An I/O error occurred while sending the trap. * @exception SnmpStatusException If the trap exceeds the limit * defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public void snmpV2Trap(SnmpPeer peer, SnmpOid trapOid, SnmpVarBindList varBindList, SnmpTimeticks time) throws IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); snmpV2Trap(peer.getDestAddr(), peer.getDestPort(), p.getRdCommunity(), trapOid, varBindList, time); }
Example 18
Source File: SnmpAdaptorServer.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
/** * Sends an inform using SNMP V2 inform request format. * <BR>The inform is sent to the specified <CODE>SnmpPeer</CODE> * destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getInformCommunity() </CODE>). * <BR>The variable list included in the outgoing inform is composed * of the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with its current value</LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * To send an inform request, the SNMP adaptor server must be active. * * @param peer The <CODE>SnmpPeer</CODE> destination for this inform * request. * @param cb The callback that is invoked when a request is complete. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * * @return The inform request object. * * @exception IllegalStateException This method has been invoked while * the SNMP adaptor server was not active. * @exception IOException An I/O error occurred while sending the * inform request. * @exception SnmpStatusException If the inform request exceeds the * limit defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public SnmpInformRequest snmpInformRequest(SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); return snmpInformRequest(peer.getDestAddr(), peer.getDestPort(), p.getInformCommunity(), cb, trapOid, varBindList); }
Example 19
Source File: SnmpAdaptorServer.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * Sends an inform using SNMP V2 inform request format. * <BR>The inform is sent to the specified <CODE>SnmpPeer</CODE> * destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getInformCommunity() </CODE>). * <BR>The variable list included in the outgoing inform is composed * of the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with its current value</LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * To send an inform request, the SNMP adaptor server must be active. * * @param peer The <CODE>SnmpPeer</CODE> destination for this inform * request. * @param cb The callback that is invoked when a request is complete. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * * @return The inform request object. * * @exception IllegalStateException This method has been invoked while * the SNMP adaptor server was not active. * @exception IOException An I/O error occurred while sending the * inform request. * @exception SnmpStatusException If the inform request exceeds the * limit defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public SnmpInformRequest snmpInformRequest(SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); return snmpInformRequest(peer.getDestAddr(), peer.getDestPort(), p.getInformCommunity(), cb, trapOid, varBindList); }
Example 20
Source File: SnmpAdaptorServer.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
/** * Sends an inform using SNMP V2 inform request format. * <BR>The inform is sent to the specified <CODE>SnmpPeer</CODE> * destination. * <BR>The community string used is the one located in the * <CODE>SnmpPeer</CODE> parameters * (<CODE>SnmpParameters.getInformCommunity() </CODE>). * <BR>The variable list included in the outgoing inform is composed * of the following items: * <UL> * <LI><CODE>sysUpTime.0</CODE> with its current value</LI> * <LI><CODE>snmpTrapOid.0</CODE> with the value specified by * <CODE>trapOid</CODE></LI> * <LI><CODE>all the (oid,values)</CODE> from the specified * <CODE>varBindList</CODE></LI> * </UL> * To send an inform request, the SNMP adaptor server must be active. * * @param peer The <CODE>SnmpPeer</CODE> destination for this inform * request. * @param cb The callback that is invoked when a request is complete. * @param trapOid The OID identifying the trap. * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null. * * @return The inform request object. * * @exception IllegalStateException This method has been invoked while * the SNMP adaptor server was not active. * @exception IOException An I/O error occurred while sending the * inform request. * @exception SnmpStatusException If the inform request exceeds the * limit defined by <CODE>bufferSize</CODE>. * * @since 1.5 */ @Override public SnmpInformRequest snmpInformRequest(SnmpPeer peer, SnmpInformHandler cb, SnmpOid trapOid, SnmpVarBindList varBindList) throws IllegalStateException, IOException, SnmpStatusException { SnmpParameters p = (SnmpParameters) peer.getParams(); return snmpInformRequest(peer.getDestAddr(), peer.getDestPort(), p.getInformCommunity(), cb, trapOid, varBindList); }