net.sf.snmpadaptor4j.core.accessor
Class CompositeDataAttributeAccessor

java.lang.Object
  extended by net.sf.snmpadaptor4j.core.accessor.CompositeDataAttributeAccessor
All Implemented Interfaces:
AttributeAccessor

public final class CompositeDataAttributeAccessor
extends Object
implements AttributeAccessor

Object representing an accessor to an attribute for CompositeData.

Author:
Jean-Philippe MINETTI

Constructor Summary
CompositeDataAttributeAccessor(SnmpOid oid, MBeanServer server, ObjectName mBeanName, String attributeName, String attributeKey, SnmpDataType snmpDataType, Class<?> jmxDataType)
          Constructor.
 
Method Summary
 Class<?> getJmxDataType()
          Returns the data type of JMX attribute.
 SnmpOid getOid()
          Returns the Object IDentifier (OID) to locate the attribute in the MIB.
 SnmpDataType getSnmpDataType()
          Returns the SNMP data type of attribute.
 Object getValue()
          Returns the value of attribute.
 boolean isReadable()
          Returns TRUE if the attribute can be read (for SNMP write and read community), FALSE otherwise.
 boolean isWritable()
          Returns TRUE if the attribute can be write (for SNMP write community), FALSE otherwise.
 void setValue(Object value)
          Sets the value of attribute.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeDataAttributeAccessor

public CompositeDataAttributeAccessor(SnmpOid oid,
                                      MBeanServer server,
                                      ObjectName mBeanName,
                                      String attributeName,
                                      String attributeKey,
                                      SnmpDataType snmpDataType,
                                      Class<?> jmxDataType)
Constructor.

Parameters:
oid - Object IDentifier (OID) to locate the attribute in the MIB.
server - JMX agent where the MBean was registered.
mBeanName - MBean name.
attributeName - Attribute name of CompositeData.
attributeKey - Attribute key of value.
snmpDataType - SNMP data type of attribute.
jmxDataType - Data type of JMX attribute.
Method Detail

getOid

public SnmpOid getOid()
Description copied from interface: AttributeAccessor
Returns the Object IDentifier (OID) to locate the attribute in the MIB.

Specified by:
getOid in interface AttributeAccessor
Returns:
Object Identifier to locate the attribute in the MIB.

getSnmpDataType

public SnmpDataType getSnmpDataType()
Description copied from interface: AttributeAccessor
Returns the SNMP data type of attribute.

Specified by:
getSnmpDataType in interface AttributeAccessor
Returns:
SNMP data type of attribute.

getJmxDataType

public Class<?> getJmxDataType()
Description copied from interface: AttributeAccessor
Returns the data type of JMX attribute.

Specified by:
getJmxDataType in interface AttributeAccessor
Returns:
Data type of JMX attribute.

getValue

public Object getValue()
                throws Exception
Description copied from interface: AttributeAccessor
Returns the value of attribute.

Specified by:
getValue in interface AttributeAccessor
Returns:
Value of attribute.
Throws:
Exception - Exception if an error occurred.

setValue

public void setValue(Object value)
Description copied from interface: AttributeAccessor
Sets the value of attribute.

Specified by:
setValue in interface AttributeAccessor
Parameters:
value - New value of attribute.

isReadable

public boolean isReadable()
Description copied from interface: AttributeAccessor
Returns TRUE if the attribute can be read (for SNMP write and read community), FALSE otherwise.

Specified by:
isReadable in interface AttributeAccessor
Returns:
TRUE if the attribute can be read.

isWritable

public boolean isWritable()
Description copied from interface: AttributeAccessor
Returns TRUE if the attribute can be write (for SNMP write community), FALSE otherwise.

Specified by:
isWritable in interface AttributeAccessor
Returns:
TRUE if the attribute can be write.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012-2013 snmpAdaptor4j. All Rights Reserved.