Java Doc for AgentXSubagent.java in  » Net » snmp4j » org » snmp4j » agent » agentx » subagent » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » snmp4j » org.snmp4j.agent.agentx.subagent 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.snmp4j.agent.agentx.subagent.AgentXSubagent

AgentXSubagent
public class AgentXSubagent implements AgentXCommandListener,NotificationOriginator(Code)
The AgentXSubagent class implements the AgentX communication for an AgentX subagent implementation.
author:
   Frank Fock
version:
   1.0

Inner Class :static class GetRequestHandler implements RequestHandler
Inner Class :class GetNextHandler implements RequestHandler
Inner Class :class GetBulkHandler implements RequestHandler
Inner Class :static class TestSetHandler implements RequestHandler
Inner Class :class UndoSetHandler implements RequestHandler
Inner Class :class CommitSetHandler implements RequestHandler
Inner Class :class CleanupSetHandler implements RequestHandler
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

Field Summary
protected  intnextTransactionID
    
protected  Mappeers
    
protected  RequestHandlerrequestHandlerCleanupSet
    
protected  RequestHandlerrequestHandlerCommitSet
    
protected  RequestHandlerrequestHandlerGet
    
protected  RequestHandlerrequestHandlerGetBulk
    
protected  RequestHandlerrequestHandlerGetNext
    
protected  RequestHandlerrequestHandlerTestSet
    
protected  RequestHandlerrequestHandlerUndoSet
    
protected  MaprequestList
    
protected  Mapsessions
    

Constructor Summary
public  AgentXSubagent(AgentX agentX, OID subagentID, OctetString subagentDescr)
    

Method Summary
public  intaddAgentCaps(AgentXSession session, OctetString context, OID id, OctetString descr)
    
public synchronized  voidaddMOServer(MOServer server)
    
protected  TransportMappingaddMaster(Address localAddress)
    
public  voidaddPingListener(PingListener l)
    
public  intclose(AgentXSession session, byte reason)
    
protected synchronized  intcloseSession(int sessionID, byte reason)
    
public  intconnect(Address masterAddress, Address localAddress, AgentXSession session)
    
public  voiddisconnect(Address masterAddress)
    
public  voiddispatchCommand(AgentXCommandEvent cmd)
    
protected  voidfirePinged(PingEvent event)
    
final public synchronized  AgentXSessionfirstSession()
     Returns the first session that have been opened by this subagent and is still open.
public synchronized  CollectiongetContexts()
    
public  bytegetDefaultPriority()
    
protected synchronized  intgetNextTransactionID()
    
protected  bytegetPriority(ManagedObject mo, AgentXRegion region)
     Gets the priority with which the supplied managed object and region should be registered at the master agent.
public synchronized  MOServergetServer(OctetString context)
    
public  ThreadPoolgetThreadPool()
    
public  Objectnotify(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  Objectnotify(OctetString context, OID notificationID, TimeTicks sysUpTime, VariableBinding[] vbs)
    
public  AgentXResponseEventnotify(AgentXSession session, OctetString context, OID notificationID, TimeTicks sysUpTime, VariableBinding[] vbs)
    
protected  intopenSession(TransportMapping transport, Address masterAddress, AgentXSession session)
    
public  voidprocessCommand(AgentXCommandEvent event)
    
protected  voidprocessNextSubRequest(Request request, MOServer server, OctetString context, SubRequest sreq)
    
protected  voidprocessResponse(AgentXCommandEvent cmd)
    
protected  intregisterRegion(AgentXSession session, OctetString context, AgentXRegion region, byte priority, TimeTicks sysUpTime)
    
public  ListregisterRegions(AgentXSession session, OctetString context)
     Registers the subagent regions at the master agent.
public  ListregisterRegions(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  ListregisterSharedTableRows(AgentXSession session, OctetString context, AgentXSharedMOTable mo)
     Registers the indexes and (row) regions of a shared table.
protected  voidrelease(MOServer server, Request req)
    
public  intremoveAgentCaps(AgentXSession session, OctetString context, OID id)
    
public synchronized  voidremoveMOServer(MOServer server)
    
protected  voidremoveMaster(TransportMapping transport)
    
public  voidremovePingListener(PingListener l)
    
protected  voidsendResponse(AgentXCommandEvent cmd, AgentXRequest request)
    
public  voidsetDefaultPriority(byte priority)
    
public  voidsetPingDelay(int seconds)
     Sets the ping delay in seconds.
public  voidsetThreadPool(ThreadPool threadPool)
    
protected  intunregisterRegion(AgentXSession session, OctetString context, AgentXRegion region, byte timeout)
    

Field Detail
nextTransactionID
protected int nextTransactionID(Code)



peers
protected Map peers(Code)



requestHandlerCleanupSet
protected RequestHandler requestHandlerCleanupSet(Code)



requestHandlerCommitSet
protected RequestHandler requestHandlerCommitSet(Code)



requestHandlerGet
protected RequestHandler requestHandlerGet(Code)



requestHandlerGetBulk
protected RequestHandler requestHandlerGetBulk(Code)



requestHandlerGetNext
protected RequestHandler requestHandlerGetNext(Code)



requestHandlerTestSet
protected RequestHandler requestHandlerTestSet(Code)



requestHandlerUndoSet
protected RequestHandler requestHandlerUndoSet(Code)



requestList
protected Map requestList(Code)



sessions
protected Map sessions(Code)




Constructor Detail
AgentXSubagent
public AgentXSubagent(AgentX agentX, OID subagentID, OctetString subagentDescr)(Code)




Method Detail
addAgentCaps
public int addAgentCaps(AgentXSession session, OctetString context, OID id, OctetString descr)(Code)



addMOServer
public synchronized void addMOServer(MOServer server)(Code)



addMaster
protected TransportMapping addMaster(Address localAddress) throws IOException(Code)



addPingListener
public void addPingListener(PingListener l)(Code)



close
public int close(AgentXSession session, byte reason) throws IOException(Code)



closeSession
protected synchronized int closeSession(int sessionID, byte reason) throws IOException(Code)



connect
public int connect(Address masterAddress, Address localAddress, AgentXSession session) throws IOException(Code)



disconnect
public void disconnect(Address masterAddress) throws IOException(Code)



dispatchCommand
public void dispatchCommand(AgentXCommandEvent cmd)(Code)



firePinged
protected void firePinged(PingEvent event)(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.



getContexts
public synchronized Collection getContexts()(Code)



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).



getServer
public synchronized MOServer getServer(OctetString context)(Code)



getThreadPool
public ThreadPool getThreadPool()(Code)



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.



notify
public Object notify(OctetString context, OID notificationID, TimeTicks sysUpTime, VariableBinding[] vbs)(Code)



notify
public AgentXResponseEvent notify(AgentXSession session, OctetString context, OID notificationID, TimeTicks sysUpTime, VariableBinding[] vbs) throws IOException(Code)



openSession
protected int openSession(TransportMapping transport, Address masterAddress, AgentXSession session) throws IOException(Code)



processCommand
public void processCommand(AgentXCommandEvent event)(Code)



processNextSubRequest
protected void processNextSubRequest(Request request, MOServer server, OctetString context, SubRequest sreq) throws NoSuchElementException(Code)



processResponse
protected void processResponse(AgentXCommandEvent cmd)(Code)



registerRegion
protected int registerRegion(AgentXSession session, OctetString context, AgentXRegion region, byte priority, TimeTicks sysUpTime) throws IOException(Code)



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.



registerSharedTableRows
public List registerSharedTableRows(AgentXSession session, OctetString context, AgentXSharedMOTable mo)(Code)
Registers the indexes and (row) regions of a shared table. This method is called on behalf of AgentXSubagent.registerRegions(AgentXSession session,OctetString context,TimeTicks sysUpTime) and AgentXSubagent.registerRegions(AgentXSession session,OctetString context) .
Parameters:
  session - the session on whose behalf regions are registered.
Parameters:
  context - the context to use for registration.
Parameters:
  mo - the AgentXSharedMOTable instance to register. Lista list of failed MOTableRow instances.



release
protected void release(MOServer server, Request req)(Code)



removeAgentCaps
public int removeAgentCaps(AgentXSession session, OctetString context, OID id)(Code)



removeMOServer
public synchronized void removeMOServer(MOServer server)(Code)



removeMaster
protected void removeMaster(TransportMapping transport)(Code)



removePingListener
public void removePingListener(PingListener l)(Code)



sendResponse
protected void sendResponse(AgentXCommandEvent cmd, AgentXRequest request)(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



setThreadPool
public void setThreadPool(ThreadPool threadPool)(Code)



unregisterRegion
protected int unregisterRegion(AgentXSession session, OctetString context, AgentXRegion region, byte timeout) throws IOException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.