|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface contains the SNMP listening context methods.
Field Summary | |
static int |
DEFAULT_TRAP_PORT
The default port number where we listen for traps (162). |
static java.lang.String |
version_id
|
Method Summary | |
void |
addRawPduListener(RawPduListener l)
Adds the specified PDU listener to receive the undecoded PDUs. |
void |
addUnhandledRawPduListener(RawPduListener listener)
Adds the specified PDU listener to receive the undecoded PDUs when it was not handled (i.e. not consumed) by any of the PDU listeners in addRawPduListener(). |
void |
destroy()
Removes the resouces held by this context. |
java.lang.String |
getBindAddress()
Returns the local address the server will bind to When the address is null, the socket accepts connections on any/all local addresses. |
int |
getMaxRecvSize()
Returns the maximum number of bytes this context will read from the socket. |
int |
getPort()
Returns the port number. |
java.lang.String |
getTypeSocket()
Returns the type of socket. |
void |
removeRawPduListener(RawPduListener l)
Removes the specified PDU listener. |
void |
removeUnhandledRawPduListener(RawPduListener listener)
Removes the specified unhandled PDU listener. |
void |
setMaxRecvSize(int no)
Sets the maximum number of bytes this context will read from the socket. |
Field Detail |
public static final java.lang.String version_id
public static final int DEFAULT_TRAP_PORT
Method Detail |
public int getPort()
public java.lang.String getBindAddress()
public java.lang.String getTypeSocket()
SnmpContextBasisFace.STANDARD_SOCKET
,
SnmpContextBasisFace.TCP_SOCKET
,
SnmpContextBasisFace.NETSCAPE_SOCKET
,
SnmpContextBasisFace.KVM_SOCKET
public int getMaxRecvSize()
MSS
(i.e. 1300).
SnmpContextBasisFace.MSS
,
setMaxRecvSize(int)
,
AbstractSnmpContext.setMaxRecvSize(int)
public void setMaxRecvSize(int no)
MSS
(i.e. 1300).
no
- The new sizeSnmpContextBasisFace.MSS
,
AbstractSnmpContext.getMaxRecvSize()
public void destroy()
public void addRawPduListener(RawPduListener l) throws java.io.IOException
All the SnmpContext objects use this method to listen for PDUs. When a SnmpContext object decodes the PDU succesfully, it will consume it.
Only when a listener is added will this context create a listening socket.
l
- The listener object
java.io.IOException
- Thrown when creating a listening
socket failsRawPduReceivedSupport.fireRawPduReceived(int, java.lang.String, int, byte[])
,
AbstractSnmpContext.addTrapListener(uk.co.westhawk.snmp.event.TrapListener)
,
AbstractSnmpContext.addRequestPduListener(uk.co.westhawk.snmp.event.RequestPduListener)
,
addUnhandledRawPduListener(RawPduListener)
public void removeRawPduListener(RawPduListener l)
l
- The listener objectpublic void addUnhandledRawPduListener(RawPduListener listener) throws java.io.IOException
Only when a listener is added will this context create a listening socket.
java.io.IOException
- Thrown when creating a listening
socket failsaddRawPduListener(RawPduListener)
public void removeUnhandledRawPduListener(RawPduListener listener)
|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |