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();
-
Protocol()
- Constructor for Protocol
-
addResponseListener(ResponseListener)
- Add a Listener for Response Event
-
addStatusListener(StatusListener)
- Add a Listener for Status Event
-
addTrapListener(TrapListener)
- Add a Listener for Trap Event
-
getAgentAddress()
- The Agent IP Address
-
getAllTypes()
- Returns all the Object Types supported
-
getCommunityName()
- The community Name.
-
getEnterpriseOID()
- The Enterprise Object Identifier in case of Trap Response
-
getGenericTrap()
- The Generic Trap value in case of Trap Response
-
getInformationOID()
- The Information object Identifier in case of Trap Response
-
getInformationOIDValue()
- The value of Information Object Identifier in case of Trap Response
-
getObjectIdentifier()
- The Object Identifier
-
getObjectValue()
- The value of Object Identifier
-
getPort()
- The port on which Sender/Receiver are operating
-
getRequestID()
- The Request Identifier
-
getResponseObject()
- The Response Object
-
getSendingAgent()
- The IP Address of Agent Sending Trap
-
getSpecificTrap()
- The Specific Trap Value in case of Trap Message
-
getStatus()
- The Status Message
-
getTimeStamp()
- The value of TimeStamp for Trap Response.
-
getTrapObject()
- The Trap Object.
-
handleRequest(MessageObject)
- This method is used in Visual linking of Protocol Bean and User Interface Bean
-
handleRequest(String, byte, byte, String, long, String, String, byte)
- This method is used in Visual Linking of Protocol Bean and UserInterface Bean
-
isTrapEnabled()
- Returns the Status whether Receiving Trap Messages is
enabled or not.
-
processMessageEvent(MessageEvent)
- This method takes in a Message Event and processes it
-
removeResponseListener(ResponseListener)
- Remove a Listener for Response Event
-
removeStatusListener(StatusListener)
- Remove a Listener for Status Event
-
removeTrapListener(TrapListener)
- Remove a Listener for Trap Event
-
setPort(long)
- This method sets the Port No to the specified Port
-
setTrapEnabled(boolean)
- This starts/stops the Trap Receiver thread based
on the Trap Status Set.
-
snmpGetNextRequest(String, String, String, String, byte)
- Issues a GetNextRequest
-
snmpGetRequest(String, String, String, String, byte)
- Issues a GetRequest
-
snmpSetRequest(String, String, String, long, String, String, byte)
- Issues a SetRequest
Protocol
public Protocol()
- Constructor for Protocol
addResponseListener
public void addResponseListener(ResponseListener rl)
- Add a Listener for Response Event
- Parameters:
- rl - com.ibm.network.snmp.protocol.ResponseListener
- See Also:
- ResponseEvent
addStatusListener
public void addStatusListener(StatusListener sl)
- Add a Listener for Status Event
- Parameters:
- sl - com.ibm.network.snmp.protocol.StatusListener
- See Also:
- StatusEvent
addTrapListener
public void addTrapListener(TrapListener rl)
- Add a Listener for Trap Event
- Parameters:
- rl - com.ibm.network.snmp.protocol.TrapListener
- See Also:
- TrapEvent
getAgentAddress
public String getAgentAddress()
- The Agent IP Address
- Returns:
- Agent IP Address
getAllTypes
public String[] getAllTypes()
- Returns all the Object Types supported
- Returns:
- All supported Object Types
getCommunityName
public String getCommunityName()
- The community Name.
- Returns:
- The Community Name
getEnterpriseOID
public String getEnterpriseOID()
- The Enterprise Object Identifier in case of Trap Response
- Returns:
- The Enterprise Object Identifier
getGenericTrap
public String getGenericTrap()
- The Generic Trap value in case of Trap Response
- Returns:
- The Generic Trap Value
getInformationOID
public String getInformationOID()
- The Information object Identifier in case of Trap Response
- Returns:
- The Information Object Identifier
getInformationOIDValue
public String getInformationOIDValue()
- The value of Information Object Identifier in case of Trap Response
- Returns:
- The value of Information Object Identifier
getObjectIdentifier
public String getObjectIdentifier()
- The Object Identifier
- Returns:
- The Object Identifier
getObjectValue
public String getObjectValue()
- The value of Object Identifier
- Returns:
- The Object Identifier Value
getPort
public long getPort()
- The port on which Sender/Receiver are operating
- Returns:
- The Port No
getRequestID
public long getRequestID()
- The Request Identifier
- Returns:
- The assigned Request ID
getResponseObject
public ResponseObject getResponseObject()
- The Response Object
- Returns:
- ResponseObject
getSendingAgent
public String getSendingAgent()
- The IP Address of Agent Sending Trap
- Returns:
- IPAddress of Sending Agent
getSpecificTrap
public String getSpecificTrap()
- The Specific Trap Value in case of Trap Message
- Returns:
- The value of Specific Trap
getStatus
public String getStatus()
- The Status Message
- Returns:
- Status Message
getTimeStamp
public String getTimeStamp()
- The value of TimeStamp for Trap Response.
- Returns:
- The TimeStamp
getTrapObject
public TrapObject getTrapObject()
- The Trap Object.
- Returns:
- TrapObject
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
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
isTrapEnabled
public boolean isTrapEnabled()
- Returns the Status whether Receiving Trap Messages is
enabled or not.
- Returns:
- Trap Enabled Status
processMessageEvent
public void processMessageEvent(MessageEvent evt)
- This method takes in a Message Event and processes it
- Parameters:
- evt - com.ibm.network.snmp.ui.MessageEvent
removeResponseListener
public void removeResponseListener(ResponseListener rl)
- Remove a Listener for Response Event
- Parameters:
- rl - com.ibm.network.snmp.protocol.ResponseListener
- See Also:
- ResponseEvent
removeStatusListener
public void removeStatusListener(StatusListener sl)
- Remove a Listener for Status Event
- Parameters:
- sl - com.ibm.network.snmp.protocol.StatusListener
- See Also:
- StatusEvent
removeTrapListener
public void removeTrapListener(TrapListener rl)
- Remove a Listener for Trap Event
- Parameters:
- rl - com.ibm.network.snmp.protocol.TrapListener
- See Also:
- TrapEvent
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.
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
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
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
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