| java.lang.Object org.snmp4j.agent.agentx.subagent.AgentXSubagent
Inner Class :static class DefaultAgentXRequestFactory implements RequestFactory | |
Inner Class :class Command implements Runnable | |
Inner Class :static class RequestID implements Comparable | |
Inner Class :class PingTask extends TimerTask | |
Method Summary | |
public int | addAgentCaps(AgentXSession session, OctetString context, OID id, OctetString descr) | public synchronized void | addMOServer(MOServer server) | protected TransportMapping | addMaster(Address localAddress) | public void | addPingListener(PingListener l) | public int | close(AgentXSession session, byte reason) | protected synchronized int | closeSession(int sessionID, byte reason) | public int | connect(Address masterAddress, Address localAddress, AgentXSession session) | public void | disconnect(Address masterAddress) | public void | dispatchCommand(AgentXCommandEvent cmd) | protected void | firePinged(PingEvent event) | final public synchronized AgentXSession | firstSession() Returns the first session that have been opened by this subagent and is
still open. | public synchronized Collection | getContexts() | public byte | getDefaultPriority() | protected synchronized int | getNextTransactionID() | protected byte | getPriority(ManagedObject mo, AgentXRegion region) Gets the priority with which the supplied managed object and
region should be registered at the master agent. | public synchronized MOServer | getServer(OctetString context) | public ThreadPool | getThreadPool() | public Object | notify(OctetString context, OID notificationID, VariableBinding[] vbs) Sends notifications (traps) to all appropriate notification targets
through the master agent.
Parameters: context - the context name of the context on whose behalf thisnotification has been generated. Parameters: notificationID - the object ID that uniquely identifies thisnotification. | public Object | notify(OctetString context, OID notificationID, TimeTicks sysUpTime, VariableBinding[] vbs) | public AgentXResponseEvent | notify(AgentXSession session, OctetString context, OID notificationID, TimeTicks sysUpTime, VariableBinding[] vbs) | protected int | openSession(TransportMapping transport, Address masterAddress, AgentXSession session) | public void | processCommand(AgentXCommandEvent event) | protected void | processNextSubRequest(Request request, MOServer server, OctetString context, SubRequest sreq) | protected void | processResponse(AgentXCommandEvent cmd) | protected int | registerRegion(AgentXSession session, OctetString context, AgentXRegion region, byte priority, TimeTicks sysUpTime) | public List | registerRegions(AgentXSession session, OctetString context) Registers the subagent regions at the master agent. | public List | registerRegions(AgentXSession session, OctetString context, TimeTicks sysUpTime) Registers the subagent regions at the master agent.
Parameters: session - the session on whose behalf regions are registered. Parameters: context - the context to use for registration. Parameters: sysUpTime - if not null , the master agent's notion of the sysUpTimefor the registered context is returned. | public List | registerSharedTableRows(AgentXSession session, OctetString context, AgentXSharedMOTable mo) Registers the indexes and (row) regions of a shared table. | protected void | release(MOServer server, Request req) | public int | removeAgentCaps(AgentXSession session, OctetString context, OID id) | public synchronized void | removeMOServer(MOServer server) | protected void | removeMaster(TransportMapping transport) | public void | removePingListener(PingListener l) | protected void | sendResponse(AgentXCommandEvent cmd, AgentXRequest request) | public void | setDefaultPriority(byte priority) | public void | setPingDelay(int seconds) Sets the ping delay in seconds. | public void | setThreadPool(ThreadPool threadPool) | protected int | unregisterRegion(AgentXSession session, OctetString context, AgentXRegion region, byte timeout) |
nextTransactionID | protected int nextTransactionID(Code) | | |
addMOServer | public synchronized void addMOServer(MOServer server)(Code) | | |
closeSession | protected synchronized int closeSession(int sessionID, byte reason) throws IOException(Code) | | |
firstSession | final public synchronized AgentXSession firstSession()(Code) | | Returns the first session that have been opened by this subagent and is
still open. If no open session exists, null is returned.
an AgentXSession . |
getDefaultPriority | public byte getDefaultPriority()(Code) | | |
getNextTransactionID | protected synchronized int getNextTransactionID()(Code) | | |
getPriority | protected byte getPriority(ManagedObject mo, AgentXRegion region)(Code) | | Gets the priority with which the supplied managed object and
region should be registered at the master agent. Overwrite
this method to use individual priorites depending on the registered
region/managed object. The default implementation returns
AgentXSubagent.getDefaultPriority() .
Parameters: mo - ManagedObjecta managed object instance that manages region . Parameters: region - the region to be registered.the priority between 0 and 255 (lower value results in higher priority). |
notify | public Object notify(OctetString context, OID notificationID, VariableBinding[] vbs)(Code) | | Sends notifications (traps) to all appropriate notification targets
through the master agent.
Parameters: context - the context name of the context on whose behalf thisnotification has been generated. Parameters: notificationID - the object ID that uniquely identifies thisnotification. For SNMPv1 traps, the notification ID has to be buildusing the rules provided by RFC 2576. Parameters: vbs - an array of VariableBinding instancesrepresenting the payload of the notification.an AgentXResponseEvent instance or null if thenotification request timed out. |
registerRegions | public List registerRegions(AgentXSession session, OctetString context)(Code) | | Registers the subagent regions at the master agent.
Parameters: session - the session on whose behalf regions are registered. Parameters: context - the context to use for registration.a List of the managed objects which failed to register. |
registerRegions | public List registerRegions(AgentXSession session, OctetString context, TimeTicks sysUpTime)(Code) | | Registers the subagent regions at the master agent.
Parameters: session - the session on whose behalf regions are registered. Parameters: context - the context to use for registration. Parameters: sysUpTime - if not null , the master agent's notion of the sysUpTimefor the registered context is returned. The input value is alwaysignored!a List of the managed objects which failed to register. |
removeMOServer | public synchronized void removeMOServer(MOServer server)(Code) | | |
setDefaultPriority | public void setDefaultPriority(byte priority)(Code) | | |
setPingDelay | public void setPingDelay(int seconds)(Code) | | Sets the ping delay in seconds. If greater than zero, for each session
a ping PDU is sent to the master to validate the session regularly with
the specified delay. To monitor the ping requests, it is necessary to
add a
PingListener with
AgentXSubagent.addPingListener .
Parameters: seconds - the delay. If zero or a negative value is supplied, no pings are sent |
|
|