#
Completed a new feature:add or delete a monitor.
It seems very easy,however it could not be implemented without a good system architecture.
Enlighten by EventLogAnalyzer, I acquired a perfect solution for alarm subscrible.
Users can subscrible alarm from devices which belong to many categories,
or even a single device.
Completed four messagers,which are used to send alarm message.
POPMessager,popping a window in the right bottom.
SMSMessager,sending alarm message with sms.
EmailMessager,sending alarm message with email.
ItsmMessager,sending alarm message to ITSM service.
Today is my birthday.
In the aspects of Syslog and SNMP Trap,SourceView1.0 is immature.
I improved the two parts in SourceView2.0.
For Syslog,Priority is got first,then we compute Facility and
Severity according to Priority,rather than on the contrary.
Priority = Facility * 8 + Severity
As for SNMPTrap,I have new cognition too.The default trap processors
such as cold start,warm start,link down and link up etc,would give
their corresponding trap message when they receive SNMP trap.
Whenas,if the trap's generic is 6 (EnterpriseSpecific),we should develop
a new processor to translate its trap message.
Modified HtmlUtil to adapt the new scenario,the source data from Iterator.
Reconstructed event module,I considered it as the most important in 2.0.
Completed LinkReport.There are two questions should be improved in the
next version.
The first,the relevant DAO classes filled with repetitious code.I consider to
reconstruct these DAOs.
The second,suddenly I am aware that Builder Pattern is the best way to
solve the complex problem of creating a report.
The code likely be following:
ReportBuilder builder = new ReportBuilder();
Director director = new Director( builder );
director.construct();
Report report = builder.createReport();
-----------------Builder Pattern------------
The Builder pattern allows a client object to construct a complex object by specifying only its
type and content.The client is shielded from the details of the object's construction.
It is a pattern for step-by-step creation of a complex object so that the same construction process
can create different representations is the routine in the builder pattern that also makes for finer
control over the construction process. All the different builders generally inherit from an abstract
builder class that declares the general functions to be used by the director to let the builder create
the product in parts.
Builder has a similar motivation to the abstract factory but, whereas in that pattern, the client uses
the abstract factory class methods to create its own object, in Builder the client instructs the builder
class on how to create the object and then asks it for the result. How the class is put together is up
to the Builder class. It's a subtle difference.
The Builder pattern is applicable when the algorithm for creating a complex object should be
independent of the parts that make up the object and how they are assembled and the construction
process must allow different representations for the object that is constructed.
I revised my afu-framework,giving it to a colleague,then he can develop
SourceFlow based my framework.
Hopefully,the two sections including JDBC and Report could be used
in SourceFlow.
In addition,I wrote code about drawing a horizontal bar chart through
JFreeChart.
DAO design was revised repeatedly recent days,I am glad of getting a perfect DAO solution
finally.
The sticking point in DAO design is where a DB connection is opened and when
to close it. Sometimes,one action executes only one DAO method,the connection
should be closed immediately follow the method. Sometimes, However, one action
may contain many DAOs or a series of methods in a DAO, (in other words, called transaction).
A same connection is used in DAOs,so closing connection after method execution is incorrect.
Therefore,I wrote two DAO's constructors for above two scenarios.For the first scenario,
opening a connection inside DAO,and close it at once after a method is invoked.For the second
scenario,a connection is created outside DAO, when instantiating a new DAO class,the connection
is passed from outside.We cope with this case (a transaction) in a service,the service invokes more
than one DAOs.DB connection is opened when service starting,and closed at the end of service.
A reflection on my SourceView’s architecture from Li showing it is awkward to add a
new node in TopoResource.I accepted it with an open mind(modestly).
I modified the base class NodeLoader.class,defines three abstract methods:
addNode(DtoInterface dto):adds the node’s information into DB table,at the same time,
add this node into topo map(a xml file).This method is used during polling period.
loadAll():loads all table records onto memory,in other words,transforms persistence
data to memory objectsThis methods is invoked while starting Tomcat.
loadOne(DtoInterface dto): transforms a table record to a memory object. This method
is used during polling period too.
今天到南方电视介绍我们的产品,跟中山电台类似,我们又碰壁了。
人家要的是供电系统的监控软件,而不是网络监控软件。对网络的监控,
他们早有相应的软件了。
搞得我们扫兴而归。
前段时间,用snmp4j取cdpCacheAddress时,发现snmp4j有问题,取出的值是乱码。
所以下载的最新的版本,问题解决。
可今天发现新的snmp4j也有问题,就是取windows interface时,ifDescr是乱码,
把旧的snmp4j替换新的,问题解决,晕倒。
因为cdpCacheAddress用得少,所以还是用旧版的snmp4j吧。
Li到政法网办最后一次更新程序。
解决atm snmp trap接收和翻译的问题。
因为用户没有了提什么要求,所以我们没有再去政法网。
这个项目做得不算好,因为对于ATM,我们能取到的数据实在有限。