org.snmp4j.agent.mo.jmx
Class JMXDefaultMOFactory

java.lang.Object
  extended by org.snmp4j.agent.mo.DefaultMOFactory
      extended by org.snmp4j.agent.mo.jmx.JMXDefaultMOFactory
All Implemented Interfaces:
org.snmp4j.agent.mo.LinkedMOFactory, org.snmp4j.agent.mo.MOFactory, org.snmp4j.agent.mo.MOTableRowFactory

public class JMXDefaultMOFactory
extends org.snmp4j.agent.mo.DefaultMOFactory

The JMXDefaultMOFactory extends the default SNMP4J-Agent ManagedObject factory to create MOScalarJMX and MOTableJMX instances instead of MOScalar and DefaultMOTable instances respectively.

Scalars are created ready-to-use with the supplied or a default JMXScalarSupport instance. For tables, a DefaultMOMutableTableModel is created at initialization that need to be replaced externally by a JMXTableModel to instrument a table with JMX.

Version:
1.0
Author:
Frank Fock

Constructor Summary
JMXDefaultMOFactory(javax.management.MBeanServerConnection server)
          Creates a JMXDefaultMOFactory instance backed by the specified MBean server.
JMXDefaultMOFactory(javax.management.MBeanServerConnection server, JMXScalarSupport scalarSupport)
          Creates a JMXDefaultMOFactory instance backed by the specified MBean server and using the supplied JMXScalarSupport instance to create scalars.
 
Method Summary
 org.snmp4j.agent.mo.MOScalar createScalar(org.snmp4j.smi.OID id, org.snmp4j.agent.MOAccess access, org.snmp4j.smi.Variable value)
           
 org.snmp4j.agent.mo.MOScalar createScalar(org.snmp4j.smi.OID id, org.snmp4j.agent.MOAccess access, org.snmp4j.smi.Variable value, java.lang.String tcModuleName, java.lang.String textualConvention)
           
 org.snmp4j.agent.mo.MOTable createTable(org.snmp4j.smi.OID oid, org.snmp4j.agent.mo.MOTableIndex indexDef, org.snmp4j.agent.mo.MOColumn[] columns)
           
 org.snmp4j.agent.mo.MOTable createTable(org.snmp4j.smi.OID oid, org.snmp4j.agent.mo.MOTableIndex indexDef, org.snmp4j.agent.mo.MOColumn[] columns, org.snmp4j.agent.mo.MOTableModel model)
           
 JMXScalarSupport getScalarSupport()
           
 javax.management.MBeanServerConnection getServer()
           
 void setScalarSupport(JMXScalarSupport scalarSupport)
           
 
Methods inherited from class org.snmp4j.agent.mo.DefaultMOFactory
addSNMPv2TCs, addTextualConvention, createAccess, createColumn, createColumn, createColumn, createColumn, createIndex, createIndex, createRow, createSubIndex, createSubIndex, createSubIndex, createSubIndex, createTableModel, createTableRelation, freeRow, getInstance, getLink, getTextualConvention, getTextualConventions, initLinkMap, removeTextualConvention, setInstance, setLink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMXDefaultMOFactory

public JMXDefaultMOFactory(javax.management.MBeanServerConnection server)
Creates a JMXDefaultMOFactory instance backed by the specified MBean server. If the JMXScalarSupport member is not set before the factory is used, a default MBeanAttributeMOScalarSupport is used.

Parameters:
server - the MBeanServerConnection to be used by this JMXDefaultMOFactory.

JMXDefaultMOFactory

public JMXDefaultMOFactory(javax.management.MBeanServerConnection server,
                           JMXScalarSupport scalarSupport)
Creates a JMXDefaultMOFactory instance backed by the specified MBean server and using the supplied JMXScalarSupport instance to create scalars.

Parameters:
server - MBeanServerConnection
scalarSupport - JMXScalarSupport
Method Detail

getScalarSupport

public JMXScalarSupport getScalarSupport()

getServer

public javax.management.MBeanServerConnection getServer()

setScalarSupport

public void setScalarSupport(JMXScalarSupport scalarSupport)

createScalar

public org.snmp4j.agent.mo.MOScalar createScalar(org.snmp4j.smi.OID id,
                                                 org.snmp4j.agent.MOAccess access,
                                                 org.snmp4j.smi.Variable value)
Specified by:
createScalar in interface org.snmp4j.agent.mo.MOFactory
Overrides:
createScalar in class org.snmp4j.agent.mo.DefaultMOFactory

createScalar

public org.snmp4j.agent.mo.MOScalar createScalar(org.snmp4j.smi.OID id,
                                                 org.snmp4j.agent.MOAccess access,
                                                 org.snmp4j.smi.Variable value,
                                                 java.lang.String tcModuleName,
                                                 java.lang.String textualConvention)
Specified by:
createScalar in interface org.snmp4j.agent.mo.MOFactory
Overrides:
createScalar in class org.snmp4j.agent.mo.DefaultMOFactory

createTable

public org.snmp4j.agent.mo.MOTable createTable(org.snmp4j.smi.OID oid,
                                               org.snmp4j.agent.mo.MOTableIndex indexDef,
                                               org.snmp4j.agent.mo.MOColumn[] columns,
                                               org.snmp4j.agent.mo.MOTableModel model)
Specified by:
createTable in interface org.snmp4j.agent.mo.MOFactory
Overrides:
createTable in class org.snmp4j.agent.mo.DefaultMOFactory

createTable

public org.snmp4j.agent.mo.MOTable createTable(org.snmp4j.smi.OID oid,
                                               org.snmp4j.agent.mo.MOTableIndex indexDef,
                                               org.snmp4j.agent.mo.MOColumn[] columns)
Specified by:
createTable in interface org.snmp4j.agent.mo.MOFactory
Overrides:
createTable in class org.snmp4j.agent.mo.DefaultMOFactory

Copyright 2006-2007 Frank Fock (SNMP4J.org)