xmlBlaster 2.1.0 API

org.xmlBlaster.engine.admin.extern
Class SnmpGateway

java.lang.Object
  extended by org.xmlBlaster.engine.admin.extern.SnmpGateway
All Implemented Interfaces:
I_ExternGateway

public final class SnmpGateway
extends java.lang.Object
implements I_ExternGateway

The gateway from outside SNMP connections to inside CommandManager.

Since:
0.79f
Author:
xmlBlaster@marcelruff.info
See Also:
admin.snmp requirement, admin.commands requirement

Field Summary
private  jax.AgentXConnection connection
           
private  ServerScope glob
           
private  java.lang.String hostname
           
private static java.util.logging.Logger log
           
private  CommandManager manager
           
private  java.lang.String ME
           
private  int port
          port for agentX connection, where SNMP-agent listens for our sub agent
private  jax.AgentXRegistration registration
           
private  jax.AgentXSession session
           
private  java.lang.String sessionId
           
 
Constructor Summary
SnmpGateway()
           
 
Method Summary
 java.lang.String getCommand(java.lang.String cmd)
           
private  java.lang.String getErrorText(java.lang.String error)
           
 java.lang.String getName()
          Get a human readable name of this filter implementation
 java.lang.String help()
           
 java.lang.String help(java.lang.String cmd)
           
 boolean initialize(ServerScope glob, CommandManager commandManager)
          This is called after creation of the plugin.
private  void initMib()
           
private  boolean initSubagent()
          Creates a server which is accessible with SNMP.
 void shutdown()
           
 java.lang.String toXml()
          Dump state of this object into a XML ASCII string.
 java.lang.String toXml(java.lang.String extraOffset)
          Dump state of this object into a XML ASCII string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

private java.lang.String ME

glob

private ServerScope glob

log

private static java.util.logging.Logger log

manager

private CommandManager manager

sessionId

private java.lang.String sessionId

port

private int port
port for agentX connection, where SNMP-agent listens for our sub agent


hostname

private java.lang.String hostname

connection

private jax.AgentXConnection connection

session

private jax.AgentXSession session

registration

private jax.AgentXRegistration registration
Constructor Detail

SnmpGateway

public SnmpGateway()
Method Detail

initialize

public boolean initialize(ServerScope glob,
                          CommandManager commandManager)
                   throws XmlBlasterException
This is called after creation of the plugin.

You should register yourself with commandManager.register() during initialization.

Specified by:
initialize in interface I_ExternGateway
Parameters:
glob - The Global handle of this xmlBlaster server instance.
commandManager - My manager
Returns:
false Ignore this implementation (gateway is switched off)
Throws:
XmlBlasterException

initSubagent

private boolean initSubagent()
                      throws XmlBlasterException
Creates a server which is accessible with SNMP. This allows you to access xmlBlaster and query for example the free memory:
  SNMP 192.168.1.2 2702
  mem
 
Enter 'help' for all available commands.

Returns:
true if subagent is configured and active
Throws:
XmlBlasterException

initMib

private void initMib()

getCommand

public java.lang.String getCommand(java.lang.String cmd)
Parameters:
cmd - The snmp command

getErrorText

private final java.lang.String getErrorText(java.lang.String error)

help

public java.lang.String help()

help

public java.lang.String help(java.lang.String cmd)

getName

public java.lang.String getName()
Description copied from interface: I_ExternGateway
Get a human readable name of this filter implementation

Specified by:
getName in interface I_ExternGateway

shutdown

public void shutdown()
Specified by:
shutdown in interface I_ExternGateway

toXml

public final java.lang.String toXml()
Dump state of this object into a XML ASCII string.


toXml

public final java.lang.String toXml(java.lang.String extraOffset)
Dump state of this object into a XML ASCII string.

Parameters:
extraOffset - indenting of tags for nice output

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.