com.adventnet.snmp.snmp2.agent
Class RegistrationEvent

java.lang.Object
  extended by com.adventnet.utils.agent.AgentEventObject
      extended by com.adventnet.snmp.snmp2.agent.RegistrationEvent
All Implemented Interfaces:
java.io.Serializable

public class RegistrationEvent
extends AgentEventObject

This event is fired by the source classes which are interested in performing registration with the RegistrationListeners.

For example,

The VarBindRequestListener can fire this event inorder to register with the dispatcher(RegistrationListener) for their interested Oids along with their subidlist.

See Also:
Serialized Form

Field Summary
(package private)  VarBindRequestListener listener
           
(package private)  java.lang.String oid
           
(package private)  java.lang.String status
          This says status of the registering Oid takes values "add","remove","modify"
(package private)  int[] subidList
           
 
Fields inherited from class com.adventnet.utils.agent.AgentEventObject
source
 
Constructor Summary
RegistrationEvent(java.lang.Object source, VarBindRequestListener listener, java.lang.String oid, int[] subidList)
          This contructor when the source is different from the registration.
RegistrationEvent(java.lang.Object source, VarBindRequestListener listener, java.lang.String oid, int[] subidList, java.lang.String status)
          This contructor when the source is different from the registration.
RegistrationEvent(VarBindRequestListener listener, java.lang.String oid, int[] subidList)
          Constructor for the RegistrationEvent
RegistrationEvent(VarBindRequestListener listener, java.lang.String oid, int[] subidList, java.lang.String status)
          Constructor for the RegistrationEvent
 
Method Summary
 VarBindRequestListener getListener()
          Gets the VarBindRequestListener.
 java.lang.String getOid()
          Gets the Oid for which the source of this event is going to register.
 java.lang.String getStatus()
          Gets the status of the RegistrationEvent operation like add/delete /modify.
 int[] getSubidList()
          Gets the subidlist for which the source of this event is going to register along with its OID.
 void setStatus(java.lang.String status)
          Sets the status of the RegistrationEvent operation like add/delete /modify.
 
Methods inherited from class com.adventnet.utils.agent.AgentEventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

oid

java.lang.String oid

subidList

int[] subidList

status

java.lang.String status
This says status of the registering Oid takes values "add","remove","modify"


listener

VarBindRequestListener listener
Constructor Detail

RegistrationEvent

public RegistrationEvent(VarBindRequestListener listener,
                         java.lang.String oid,
                         int[] subidList)
Constructor for the RegistrationEvent

Parameters:
listener - the VarBindRequestListener for a particular OID
oid - the listener's OID
subidList - the subid List of the OID

RegistrationEvent

public RegistrationEvent(VarBindRequestListener listener,
                         java.lang.String oid,
                         int[] subidList,
                         java.lang.String status)
Constructor for the RegistrationEvent

Parameters:
listener - listener of the varbind.
oid - value of the OID
subidList - subId list of the OID
status - status of the operation.

RegistrationEvent

public RegistrationEvent(java.lang.Object source,
                         VarBindRequestListener listener,
                         java.lang.String oid,
                         int[] subidList)
This contructor when the source is different from the registration.

Parameters:
source - source of the listener.
listener - listener of the varbind.
oid - value of the OID
subidList - the subId list of the OID.

RegistrationEvent

public RegistrationEvent(java.lang.Object source,
                         VarBindRequestListener listener,
                         java.lang.String oid,
                         int[] subidList,
                         java.lang.String status)
This contructor when the source is different from the registration.

Parameters:
source - source of the listener.
listener - listener of the varbind.
oid - value of the OID
subidList - the subId list of the OID.
status - status of the operation.
Method Detail

getOid

public java.lang.String getOid()
Gets the Oid for which the source of this event is going to register. This method will be useful for the RegistrationListener for getting the registration Oid.

Returns:
the value of OID

getSubidList

public int[] getSubidList()
Gets the subidlist for which the source of this event is going to register along with its OID.

Returns:
the subidlist as int array.

getStatus

public java.lang.String getStatus()
Gets the status of the RegistrationEvent operation like add/delete /modify.

Returns:
the status of the operation with values "add","delete" or "modify".
See Also:
setStatus(String status)

setStatus

public void setStatus(java.lang.String status)
Sets the status of the RegistrationEvent operation like add/delete /modify.

Parameters:
status - the status of the operation.
See Also:
getStatus()

getListener

public VarBindRequestListener getListener()
Gets the VarBindRequestListener.

This method can be used by the dispatcher inorder to get the VarBindRequestListener to which the pdu will be given when it comes for its registered oid mentioned in this event.

Returns:
the VarBindRequestListener registered for the oid given in this event.