⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 snmprequestlistener.html

📁 snmp inquistor Pour la communication avec les agents SNMP on utilise un package Java open source
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_12) on Wed Mar 04 17:00:07 CET 2009 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
SNMPRequestListener
</TITLE>

<META NAME="keywords" CONTENT="snmp.SNMPRequestListener interface">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="SNMPRequestListener";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SNMPRequestListener.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../snmp/SNMPRequestException.html" title="class in snmp"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../snmp/SNMPSequence.html" title="class in snmp"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../index.html?snmp/SNMPRequestListener.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SNMPRequestListener.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
snmp</FONT>
<BR>
Interface SNMPRequestListener</H2>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../SNMPAgentTest.html" title="class in &lt;Unnamed&gt;">SNMPAgentTest</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>SNMPRequestListener</B></DL>
</PRE>

<P>
SNMPRequestListener is an interface that must be implemented by any class which wishes    to act as a handler for request messages sent from remote SNMP management entities.    The SNMPv1AgentInterface class listens for request messages, and passes any it receives on to    SNMPRequestListener subclasses that have registered with it through its addRequestListener() method.
<P>

<P>
<HR>

<P>

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../snmp/SNMPSequence.html" title="class in snmp">SNMPSequence</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../snmp/SNMPRequestListener.html#processGetNextRequest(snmp.SNMPPDU, java.lang.String)">processGetNextRequest</A></B>(<A HREF="../snmp/SNMPPDU.html" title="class in snmp">SNMPPDU</A>&nbsp;requestPDU,
                      java.lang.String&nbsp;communityName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Handles Get-Next- request messages.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../snmp/SNMPSequence.html" title="class in snmp">SNMPSequence</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../snmp/SNMPRequestListener.html#processRequest(snmp.SNMPPDU, java.lang.String)">processRequest</A></B>(<A HREF="../snmp/SNMPPDU.html" title="class in snmp">SNMPPDU</A>&nbsp;requestPDU,
               java.lang.String&nbsp;communityName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Handles Get- or Set- request messages.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="processRequest(snmp.SNMPPDU, java.lang.String)"><!-- --></A><H3>
processRequest</H3>
<PRE>
<A HREF="../snmp/SNMPSequence.html" title="class in snmp">SNMPSequence</A> <B>processRequest</B>(<A HREF="../snmp/SNMPPDU.html" title="class in snmp">SNMPPDU</A>&nbsp;requestPDU,
                            java.lang.String&nbsp;communityName)
                            throws <A HREF="../snmp/SNMPGetException.html" title="class in snmp">SNMPGetException</A>,
                                   <A HREF="../snmp/SNMPSetException.html" title="class in snmp">SNMPSetException</A></PRE>
<DL>
<DD>Handles Get- or Set- request messages. The supplied request PDU may contain multiple OIDs; this   method should process those OIDs it understands, and return an SNMPVarBindList containing those OIDs   which it has handled and their corresponding values. The order of returned OID-value pairs is not   important, as the SNMPv1AgentInterface will order the information appropriately. Each implementer of   SNMPRequestListener will likely handle only a subset of the list of supplied OIDs; those OIDs which   are not relevant to a particular listener should be ignored, to be handled by another SNMPRequestListener.    If any OIDs remain unhandled after all listeners' processRequest() methods have been called, the    SNMPv1AgentInterface will return an appropriate error indication to the management entity.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>SNMPGetException,</CODE> - SNMPSetException   If a listener receives a request for an OID which it is intended to handle, but there is a problem with   the request - e.g., a set-request for a value which is read-only, or an incorrect value type for a set - the    listener should throw an SNMPGetException or SNMPSetException to indicate the error. The exception should    include both the index of the OID in the list of supplied OIDs, as well as an error status code (status values    are provided as constants in the SNMPRequestException class definition). The SNMPRequestException class and     subclasses provide constructors allowing the specification of the error index and status code. Note that the    error index follows the SNMP convention of starting at 1, not 0: thus if there is a problem with the first OID,    the error index should be 1. The SNMPAgentInterface will use the information in the exception to communicate    the error to the requesting management entity. The community name should also be used to determine if a request   is valid for the supplied community name.
<DD><CODE><A HREF="../snmp/SNMPGetException.html" title="class in snmp">SNMPGetException</A></CODE>
<DD><CODE><A HREF="../snmp/SNMPSetException.html" title="class in snmp">SNMPSetException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="processGetNextRequest(snmp.SNMPPDU, java.lang.String)"><!-- --></A><H3>
processGetNextRequest</H3>
<PRE>
<A HREF="../snmp/SNMPSequence.html" title="class in snmp">SNMPSequence</A> <B>processGetNextRequest</B>(<A HREF="../snmp/SNMPPDU.html" title="class in snmp">SNMPPDU</A>&nbsp;requestPDU,
                                   java.lang.String&nbsp;communityName)
                                   throws <A HREF="../snmp/SNMPGetException.html" title="class in snmp">SNMPGetException</A></PRE>
<DL>
<DD>Handles Get-Next- request messages. The supplied request PDU may contain multiple OIDs; this   method should process those OIDs it understands, and return an SNMPVarBindList containing special   variable pairs indicating those supplied OIDs which it has handled, i.e., it must indicate a   supplied OID, the "next" OID, and the value of this next OID. To do this, the return value is a   sequence of SNMPVariablePairs, in which the first component - the OID - is one of the supplied OIDs,   and the second component - the value - is itself an SNMPVariablePair containing the "next" OID and   its value:       return value = sequence of SNMPVariablePair(original OID, SNMPVariablePair(following OID, value))    In this way the SNMPv1AgentInterface which calls this method will be able to determine which of the    supplied OIDs each "next" OID corresponds to.   The order of returned "double" OID-(OID-value) pairs is not important, as the SNMPv1AgentInterface    will order the information appropriately in the response. Each implementer of   SNMPRequestListener will likely handle only a subset of the list of supplied OIDs; those OIDs which   are not relevant to a particular listener should be ignored, to be handled by another SNMPRequestListener.    If any OIDs remain unhandled after all listeners' processRequest() methods have been called, the    SNMPv1AgentInterface will return an appropriate error indication to the management entity.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../snmp/SNMPGetException.html" title="class in snmp">SNMPGetException</A></CODE> - If a listener receives a request for an OID which it is intended to handle, but there is a problem with   the request - e.g., a get-next request for a value which is not readable for the supplied community name -    the listener should throw an SNMPGetException to indicate the error. The exception should    include both the index of the OID in the list of supplied OIDs, as well as an error status code (status values    are provided as constants in the SNMPRequestException class definition). The SNMPRequestException class and     subclasses provide constructors allowing the specification of the error index and status code. Note that the    error index follows the SNMP convention of starting at 1, not 0: thus if there is a problem with the first OID,    the error index should be 1. The SNMPAgentInterface will use the information in the exception to communicate    the error to the requesting management entity. The community name should also be used to determine if a request   is valid for the supplied community name.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SNMPRequestListener.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../snmp/SNMPRequestException.html" title="class in snmp"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../snmp/SNMPSequence.html" title="class in snmp"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../index.html?snmp/SNMPRequestListener.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SNMPRequestListener.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -