SNMP Stack 5_1

uk.co.westhawk.snmp.beans
Class UsmBeingDiscoveredBean

java.lang.Object
  |
  +--uk.co.westhawk.snmp.beans.UsmBeingDiscoveredBean
All Implemented Interfaces:
java.util.EventListener, RequestPduListener

public class UsmBeingDiscoveredBean
extends java.lang.Object
implements RequestPduListener

This bean handles being discovered as an authoritative engine by an non-authoritative engine (SNMPv3 only).

The discovery process consists of two steps: 1. first the SNMP engine ID has to be discovered, second the timeline details of the SNMP engine ID have to be discovered.
2. For the last step the username of the principal is needed.
All these parameters should be provided by (your own) UsmAgent.

This class is not very efficient. The private context discEngineIdContextIn will be the same for every SnmpContextv3 that creates this bean.

See SNMP-USER-BASED-SM-MIB.

Since:
4_14
Version:
$Revision: 1.7 $ $Date: 2006/03/23 14:54:09 $
Author:
Birgit Arkesteijn
See Also:
SnmpContextv3.addRequestPduListener(uk.co.westhawk.snmp.event.RequestPduListener, uk.co.westhawk.snmp.stack.ListeningContextPool)

Field Summary
 
Fields inherited from interface uk.co.westhawk.snmp.event.RequestPduListener
version_id
 
Constructor Summary
UsmBeingDiscoveredBean(SnmpContextv3 myContext, UsmAgent myUsmAgent)
          Constructor.
 
Method Summary
 void addRequestPduListener(ListeningContextPool lcontext)
           
 void freeResources()
          Destroys all the contexts in use.
 void removeRequestPduListener(ListeningContextPool lcontext)
           
 void requestPduReceived(RequestPduEvent evt)
          Receiving an incoming (discovery) PDU request.
protected  void sendEngineIdReport(Pdu orgPdu, int port)
          Send back the snmp engine ID.
protected  void sendTimeLineReport(Pdu orgPdu, int port)
          Send back the time lininess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsmBeingDiscoveredBean

public UsmBeingDiscoveredBean(SnmpContextv3 myContext,
                              UsmAgent myUsmAgent)
                       throws java.io.IOException
Constructor.

Parameters:
myUsmAgent - The usmAgent that will provide all the authoritative engine parameters
myContext - The context
See Also:
SnmpContextv3.addRequestPduListener(uk.co.westhawk.snmp.event.RequestPduListener, uk.co.westhawk.snmp.stack.ListeningContextPool)
Method Detail

addRequestPduListener

public void addRequestPduListener(ListeningContextPool lcontext)
                           throws java.io.IOException
Parameters:
lcontext - The listening context for incoming (discovery) requests
java.io.IOException
See Also:
SnmpContextv3.addRequestPduListener(uk.co.westhawk.snmp.event.RequestPduListener, uk.co.westhawk.snmp.stack.ListeningContextPool)

removeRequestPduListener

public void removeRequestPduListener(ListeningContextPool lcontext)
                              throws java.io.IOException
Parameters:
lcontext - Stop listening on this listening context for incoming (discovery) requests
java.io.IOException
See Also:
SnmpContextv3.removeRequestPduListener(uk.co.westhawk.snmp.event.RequestPduListener, uk.co.westhawk.snmp.stack.ListeningContextPool)

requestPduReceived

public void requestPduReceived(RequestPduEvent evt)
Receiving an incoming (discovery) PDU request.

Specified by:
requestPduReceived in interface RequestPduListener

sendEngineIdReport

protected void sendEngineIdReport(Pdu orgPdu,
                                  int port)
Send back the snmp engine ID.


sendTimeLineReport

protected void sendTimeLineReport(Pdu orgPdu,
                                  int port)
Send back the time lininess


freeResources

public void freeResources()
Destroys all the contexts in use.


SNMP Stack 5_1