All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.network.snmp.protocol.Protocol

java.lang.Object
   |
   +----com.ibm.network.snmp.protocol.Protocol

public class Protocol
extends Object
implements Serializable, MessageListener
A class implementing the SNMP protocol Version1 For example:
      Protocol prot = new Protocol();
 


Constructor Index

 o Protocol()
Constructor for Protocol

Method Index

 o addResponseListener(ResponseListener)
Add a Listener for Response Event
 o addStatusListener(StatusListener)
Add a Listener for Status Event
 o addTrapListener(TrapListener)
Add a Listener for Trap Event
 o getAgentAddress()
The Agent IP Address
 o getAllTypes()
Returns all the Object Types supported
 o getCommunityName()
The community Name.
 o getEnterpriseOID()
The Enterprise Object Identifier in case of Trap Response
 o getGenericTrap()
The Generic Trap value in case of Trap Response
 o getInformationOID()
The Information object Identifier in case of Trap Response
 o getInformationOIDValue()
The value of Information Object Identifier in case of Trap Response
 o getObjectIdentifier()
The Object Identifier
 o getObjectValue()
The value of Object Identifier
 o getPort()
The port on which Sender/Receiver are operating
 o getRequestID()
The Request Identifier
 o getResponseObject()
The Response Object
 o getSendingAgent()
The IP Address of Agent Sending Trap
 o getSpecificTrap()
The Specific Trap Value in case of Trap Message
 o getStatus()
The Status Message
 o getTimeStamp()
The value of TimeStamp for Trap Response.
 o getTrapObject()
The Trap Object.
 o handleRequest(MessageObject)
This method is used in Visual linking of Protocol Bean and User Interface Bean
 o handleRequest(String, byte, byte, String, long, String, String, byte)
This method is used in Visual Linking of Protocol Bean and UserInterface Bean
 o isTrapEnabled()
Returns the Status whether Receiving Trap Messages is enabled or not.
 o processMessageEvent(MessageEvent)
This method takes in a Message Event and processes it
 o removeResponseListener(ResponseListener)
Remove a Listener for Response Event
 o removeStatusListener(StatusListener)
Remove a Listener for Status Event
 o removeTrapListener(TrapListener)
Remove a Listener for Trap Event
 o setPort(long)
This method sets the Port No to the specified Port
 o setTrapEnabled(boolean)
This starts/stops the Trap Receiver thread based on the Trap Status Set.
 o snmpGetNextRequest(String, String, String, String, byte)
Issues a GetNextRequest
 o snmpGetRequest(String, String, String, String, byte)
Issues a GetRequest
 o snmpSetRequest(String, String, String, long, String, String, byte)
Issues a SetRequest

Constructors

 o Protocol
 public Protocol()
Constructor for Protocol

Methods

 o addResponseListener
 public void addResponseListener(ResponseListener rl)
Add a Listener for Response Event

Parameters:
rl - com.ibm.network.snmp.protocol.ResponseListener
See Also:
ResponseEvent
 o addStatusListener
 public void addStatusListener(StatusListener sl)
Add a Listener for Status Event

Parameters:
sl - com.ibm.network.snmp.protocol.StatusListener
See Also:
StatusEvent
 o addTrapListener
 public void addTrapListener(TrapListener rl)
Add a Listener for Trap Event

Parameters:
rl - com.ibm.network.snmp.protocol.TrapListener
See Also:
TrapEvent
 o getAgentAddress
 public String getAgentAddress()
The Agent IP Address

Returns:
Agent IP Address
 o getAllTypes
 public String[] getAllTypes()
Returns all the Object Types supported

Returns:
All supported Object Types
 o getCommunityName
 public String getCommunityName()
The community Name.

Returns:
The Community Name
 o getEnterpriseOID
 public String getEnterpriseOID()
The Enterprise Object Identifier in case of Trap Response

Returns:
The Enterprise Object Identifier
 o getGenericTrap
 public String getGenericTrap()
The Generic Trap value in case of Trap Response

Returns:
The Generic Trap Value
 o getInformationOID
 public String getInformationOID()
The Information object Identifier in case of Trap Response

Returns:
The Information Object Identifier
 o getInformationOIDValue
 public String getInformationOIDValue()
The value of Information Object Identifier in case of Trap Response

Returns:
The value of Information Object Identifier
 o getObjectIdentifier
 public String getObjectIdentifier()
The Object Identifier

Returns:
The Object Identifier
 o getObjectValue
 public String getObjectValue()
The value of Object Identifier

Returns:
The Object Identifier Value
 o getPort
 public long getPort()
The port on which Sender/Receiver are operating

Returns:
The Port No
 o getRequestID
 public long getRequestID()
The Request Identifier

Returns:
The assigned Request ID
 o getResponseObject
 public ResponseObject getResponseObject()
The Response Object

Returns:
ResponseObject
 o getSendingAgent
 public String getSendingAgent()
The IP Address of Agent Sending Trap

Returns:
IPAddress of Sending Agent
 o getSpecificTrap
 public String getSpecificTrap()
The Specific Trap Value in case of Trap Message

Returns:
The value of Specific Trap
 o getStatus
 public String getStatus()
The Status Message

Returns:
Status Message
 o getTimeStamp
 public String getTimeStamp()
The value of TimeStamp for Trap Response.

Returns:
The TimeStamp
 o getTrapObject
 public TrapObject getTrapObject()
The Trap Object.

Returns:
TrapObject
 o handleRequest
 public void handleRequest(MessageObject messageObject)
This method is used in Visual linking of Protocol Bean and User Interface Bean

Parameters:
message - com.ibm.network.snmp.ui.MessageObject
 o handleRequest
 public void handleRequest(String objectIdentifier,
                           byte requestType,
                           byte objectType,
                           String agentAddress,
                           long longValue,
                           String stringValue,
                           String communityName,
                           byte requestID)
This method is used in Visual Linking of Protocol Bean and UserInterface Bean

Parameters:
objectIdentifier - java.lang.String
requestType - java.lang.String
objectType - byte
agentAddress - java.lang.String
longValue - long
stringValue - java.lang.String
communityName - java.lang.String
requestID - byte
 o isTrapEnabled
 public boolean isTrapEnabled()
Returns the Status whether Receiving Trap Messages is enabled or not.

Returns:
Trap Enabled Status
 o processMessageEvent
 public void processMessageEvent(MessageEvent evt)
This method takes in a Message Event and processes it

Parameters:
evt - com.ibm.network.snmp.ui.MessageEvent
 o removeResponseListener
 public void removeResponseListener(ResponseListener rl)
Remove a Listener for Response Event

Parameters:
rl - com.ibm.network.snmp.protocol.ResponseListener
See Also:
ResponseEvent
 o removeStatusListener
 public void removeStatusListener(StatusListener sl)
Remove a Listener for Status Event

Parameters:
sl - com.ibm.network.snmp.protocol.StatusListener
See Also:
StatusEvent
 o removeTrapListener
 public void removeTrapListener(TrapListener rl)
Remove a Listener for Trap Event

Parameters:
rl - com.ibm.network.snmp.protocol.TrapListener
See Also:
TrapEvent
 o setPort
 public void setPort(long portNo)
This method sets the Port No to the specified Port

Parameters:
portNo - long
Throws: IllegalArgumentException
if the port number is less than 1.
 o setTrapEnabled
 public void setTrapEnabled(boolean trap)
This starts/stops the Trap Receiver thread based on the Trap Status Set.

Parameters:
trap - boolean Trap Status
Throws: IllegalArgumentException
if Trap was not started due to some problem
 o snmpGetNextRequest
 public void snmpGetNextRequest(String objectIdentifier,
                                String objectType,
                                String agentAddress,
                                String communityName,
                                byte requestID) throws SNMPProtocolBeanException
Issues a GetNextRequest

Parameters:
objectIdentifier - java.lang.String The Object Identifier for the request
objectType - java.lang.String The Object Type. The List of Object Types is available from method getAllTypes()
agentAddress - java.lang.String The Agent Entity
communityName - java.lang.String The Community Name
requestID - byte The Request ID
Throws: SNMPProtocolBeanException
if there is an error in one of the parameters passed
 o snmpGetRequest
 public void snmpGetRequest(String objectIdentifier,
                            String objectType,
                            String agentAddress,
                            String communityName,
                            byte requestID) throws SNMPProtocolBeanException
Issues a GetRequest

Parameters:
objectIdentifier - java.lang.String The Object Identifier for the request
objectType - java.lang.String The Object Type. The List of Object Types is available from method getAllTypes()
agentAddress - java.lang.String The Agent Entity
communityName - java.lang.String The Community Name
requestID - byte The Request ID
Throws: SNMPProtocolBeanException
if there is an error in one of the parameters passed
 o snmpSetRequest
 public void snmpSetRequest(String objectIdentifier,
                            String objectType,
                            String agentAddress,
                            long longValue,
                            String stringValue,
                            String communityName,
                            byte requestID) throws SNMPProtocolBeanException
Issues a SetRequest

Parameters:
objectIdentifier - java.lang.String The Object Identifier for the request
objectType - java.lang.String The Object Type. The List of Object Types is available from method getAllTypes()
agentAddress - java.lang.String The Agent Entity
longValue - long The value of Object Identifier in case its a long else this will be ignored
stringValue - java.lang.String The value of Object Identifier in case its a String else set this value to null
communityName - java.lang.String The Community Name
requestID - byte The Request ID
Throws: SNMPProtocolBeanException
if there is an error in one of the parameters passed

All Packages  Class Hierarchy  This Package  Previous  Next  Index