com.adventnet.snmp.ejb
Interface MibOperationsHome


public interface MibOperationsHome

This is the home interface for the MibOperations EJB. Access to this interface is using JNDI and the published name. Use the create method from client code, to instantiate a MibOperations Session bean. *

To use in an application, simply instantiate, load the mibs specify the object IDs and get the node details. For example,

		MibOperationsHome home = (MibOperationsHome) ctx.lookup("MibOperationsEJB"); 
      MibOperations mibops = (MibOperations) home.create();  //where ctx is the naming context. 
		try	{	
			mibops.loadMibModules("RFC1213-MIB");
		}
       catch (Exception e) {
           System.out.println("Exception : "+e);
		 }
		com.adventnet.snmp.snmp2.SnmpOID oid = mibops.getSnmpOID("system.sysDescr.0");
	    com.adventnet.snmp.mibs.MibNode node = mibops.getMibNode(oid);
	    System.out.println("Syntax:"+node.getSyntax()+"\n"+
                  "Access:"+node.printAccess()+"\n"+
                  "Status:"+node.getStatus()+"\n"+
                  "Reference:"+node.getReference()+"\n"+
                  "OID:"+node.getNumberedOIDString()+"\n"+
                  "Node:"+node.getOIDString()+"\n"+
                  "Description:"+node.getDescription()+"\n");
		
      
  

See the ejbmiboperations.java application example in the ejbclient directory for an example.


Method Summary
 MibOperations create()
          Use this method from client code, to instantiate a MibOperations Session bean.
 

Method Detail

create

public MibOperations create()
                     throws CreateException,
                            java.rmi.RemoteException
Use this method from client code, to instantiate a MibOperations Session bean.

Returns:
MibOperations
Throws:
java.rmi.RemoteException - if there is a communications or systems failure
CreateException - if there is a error creating the bean


Copyright (c)2010 ZOHO Corp., All Rights Reserved