Java Doc for ComponentLogger.java in  » ESB » open-esb » com » sun » jbi » framework » 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 » ESB » open esb » com.sun.jbi.framework 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.jbi.framework.ComponentLogger

ComponentLogger
public class ComponentLogger implements ComponentLoggerMBean(Code)
This class implements the ComponentLoggerMBean for a Component (BC or SE). This MBean acts as an agent between the JMX management service and the UI runtime to provide operations for displaying and modifying the logger levels for a component.
author:
   Sun Microsystems, Inc.


Field Summary
final static  StringCONFIG_DIRECTORY
     The name of the directory where the component logger level properties file is written.
final static  StringDISPLAY_NAME
     The suffix for the logger display name property stored in the logger properties file.
final static  StringLOGGER_DEFAULT
     The value for a component logger level property for inheriting from the parent logger.
final static  StringLOGGER_SETTINGS
     The name of the file containing the component logger level properties.

Constructor Summary
 ComponentLogger(Component component)
     Constructor.

Method Summary
 booleanaddLogger(Logger logger, String displayName)
     Add an entry to the logger info table.
 voidaddLoggerInfo(String loggerName, String displayName, boolean addPrefix)
     Add predefined logger information to the logger info table.
public  StringgetDisplayName(String logName)
     Get the localized display name of the specified logger.
public  StringgetLevel(String logName)
     Get the log level of the specified logger.
 StringgetLoggerNamePrefix()
     Get the logger name prefix for this component.
public  String[]getLoggerNames()
     Get the names of all loggers controlled by this MBean.
 LevelgetSavedLevel(String loggerName)
     Get the saved logger level for a logger.
 booleanisLoggerRegistered(String name)
     Return an indication of whether or not a logger is registered.
 voidloadLoggerSettings()
     Load logger level setting properties from the persisted file.
synchronized  voidsaveLoggerSettings()
     Save logger level setting properties to a persisted file.
public  intsetAll(String logName)
     Set the log level of the specified logger to ALL.
Parameters:
  logName - the logger name.
public  intsetConfig(String logName)
     Set the log level of the specified logger to CONFIG.
Parameters:
  logName - the logger name.
public  intsetDefault(String logName)
     Set the log level of the specified logger to the default, which is null to inherit the parent logger's level.
Parameters:
  logName - the logger name.
public  intsetFine(String logName)
     Set the log level of the specified logger to FINE.
Parameters:
  logName - the logger name.
public  intsetFiner(String logName)
     Set the log level of the specified logger to FINER.
Parameters:
  logName - the logger name.
public  intsetFinest(String logName)
     Set the log level of the specified logger to FINEST.
Parameters:
  logName - the logger name.
public  intsetInfo(String logName)
     Set the log level of the specified logger to INFO.
Parameters:
  logName - the logger name.
 intsetLevel(String logName, Level logLevel)
     Set the log level of the specified logger to the specified level.
 voidsetLoggerNamePrefix(String prefix)
     Set the logger name prefix for this component.
public  intsetOff(String logName)
     Set the log level of the specified logger to OFF.
Parameters:
  logName - the logger name.
public  intsetSevere(String logName)
     Set the log level of the specified logger to SEVERE.
Parameters:
  logName - the logger name.
public  intsetWarning(String logName)
     Set the log level of the specified logger to WARNING.
Parameters:
  logName - the logger name.

Field Detail
CONFIG_DIRECTORY
final static String CONFIG_DIRECTORY(Code)
The name of the directory where the component logger level properties file is written. NOTE: This package-accessible to allow the unit test to use it.



DISPLAY_NAME
final static String DISPLAY_NAME(Code)
The suffix for the logger display name property stored in the logger properties file. NOTE: This package-accessible to allow the unit test to use it.



LOGGER_DEFAULT
final static String LOGGER_DEFAULT(Code)
The value for a component logger level property for inheriting from the parent logger. NOTE: This package-accessible to allow the unit test to use it.



LOGGER_SETTINGS
final static String LOGGER_SETTINGS(Code)
The name of the file containing the component logger level properties. NOTE: This package-accessible to allow the unit test to use it.




Constructor Detail
ComponentLogger
ComponentLogger(Component component)(Code)
Constructor. This loads any logger levels that were previously persisted, and creates the top-level logger for the component, setting its parent to the top-level JBI logger and its level to the persisted level if found.
Parameters:
  component - is the Component instance for this component.




Method Detail
addLogger
boolean addLogger(Logger logger, String displayName)(Code)
Add an entry to the logger info table. Each entry contains the logger name as the key and the LoggerInfo instance as the value. If an entry already exists for this logger name, but its logger reference has not been set, set it now. Do the same for the display name.
Parameters:
  logger - The Logger instance.
Parameters:
  displayName - The logger's display name. true if either the logger instance was not alreadyset in the existing LoggerInfo, or there was no existing LoggerInfo forthis logger. Returns false if there was an existingLoggerInfo and its logger instance was already set. Note that the returnvalue is used only for unit testing.



addLoggerInfo
void addLoggerInfo(String loggerName, String displayName, boolean addPrefix)(Code)
Add predefined logger information to the logger info table. This creates a new LoggerInfo object using the provided values, and adds it to the logger info table. It also adds a property for the logger to the logger settings, with the value set to the default logger level. The logger reference is not set, as the logger has not yet been created. Note that this method is called only during installation or upgrade of a component.
Parameters:
  loggerName - the name of the logger to be added.
Parameters:
  displayName - the display name of the logger to be added; if thisis null the last level of the logger name is used.
Parameters:
  addPrefix - set to true if the prefix should be addedto this logger name, or false if the logger name shouldbe kept as is.



getDisplayName
public String getDisplayName(String logName)(Code)
Get the localized display name of the specified logger. If none is available, return a default name set to the last level of the logger name.
Parameters:
  logName - the name of the logger. String representing the localized display name.



getLevel
public String getLevel(String logName) throws javax.jbi.JBIException(Code)
Get the log level of the specified logger. If the level is not set, search the parent logger chain until a logger is found with a level set. In the case where this method is called before the component has been started, the logger may not exist. In this case, retrieve the logger level property and use its value, or if there is no logger level property set, use the top-level component logger's level. The top-level component logger always exists because it is created by the constructor of this class.
Parameters:
  logName - the name of the logger. String representing log level or null if no level is available.
throws:
  javax.jbi.JBIException - if the logger is not known.



getLoggerNamePrefix
String getLoggerNamePrefix()(Code)
Get the logger name prefix for this component. the logger name prefix.



getLoggerNames
public String[] getLoggerNames()(Code)
Get the names of all loggers controlled by this MBean. an array of logger names as String objects.



getSavedLevel
Level getSavedLevel(String loggerName)(Code)
Get the saved logger level for a logger. This is used for restoring persisted logger levels that were set explicitly.
Parameters:
  loggerName - The logger name. The logger level, or null if none was persisted.



isLoggerRegistered
boolean isLoggerRegistered(String name)(Code)
Return an indication of whether or not a logger is registered. true if the logger is registered, orfalse if not.



loadLoggerSettings
void loadLoggerSettings()(Code)
Load logger level setting properties from the persisted file.



saveLoggerSettings
synchronized void saveLoggerSettings()(Code)
Save logger level setting properties to a persisted file.



setAll
public int setAll(String logName) throws javax.jbi.JBIException(Code)
Set the log level of the specified logger to ALL.
Parameters:
  logName - the logger name. 0 if operation is successful.
throws:
  javax.jbi.JBIException - if the logger is not found.



setConfig
public int setConfig(String logName) throws javax.jbi.JBIException(Code)
Set the log level of the specified logger to CONFIG.
Parameters:
  logName - the logger name. 0 if operation is successful.
throws:
  javax.jbi.JBIException - if the logger is not found.



setDefault
public int setDefault(String logName) throws javax.jbi.JBIException(Code)
Set the log level of the specified logger to the default, which is null to inherit the parent logger's level.
Parameters:
  logName - the logger name. 0 if operation is successful.
throws:
  javax.jbi.JBIException - if the logger is not found.



setFine
public int setFine(String logName) throws javax.jbi.JBIException(Code)
Set the log level of the specified logger to FINE.
Parameters:
  logName - the logger name. 0 if operation is successful.
throws:
  javax.jbi.JBIException - if the logger is not found.



setFiner
public int setFiner(String logName) throws javax.jbi.JBIException(Code)
Set the log level of the specified logger to FINER.
Parameters:
  logName - the logger name. 0 if operation is successful.
throws:
  javax.jbi.JBIException - if the logger is not found.



setFinest
public int setFinest(String logName) throws javax.jbi.JBIException(Code)
Set the log level of the specified logger to FINEST.
Parameters:
  logName - the logger name. 0 if operation is successful.
throws:
  javax.jbi.JBIException - if the logger is not found.



setInfo
public int setInfo(String logName) throws javax.jbi.JBIException(Code)
Set the log level of the specified logger to INFO.
Parameters:
  logName - the logger name. 0 if operation is successful.
throws:
  javax.jbi.JBIException - if the logger is not found.



setLevel
int setLevel(String logName, Level logLevel) throws javax.jbi.JBIException(Code)
Set the log level of the specified logger to the specified level. This also persists the logger settings for the component so that if a restart occurs, the logger settings are retained.
Parameters:
  logName - the logger name.
Parameters:
  logLevel - the log level. 0 if operation is successful.
throws:
  javax.jbi.JBIException - if the logger is not found.



setLoggerNamePrefix
void setLoggerNamePrefix(String prefix)(Code)
Set the logger name prefix for this component.
Parameters:
  prefix - the logger name prefix to be set.



setOff
public int setOff(String logName) throws javax.jbi.JBIException(Code)
Set the log level of the specified logger to OFF.
Parameters:
  logName - the logger name. 0 if operation is successful.
throws:
  javax.jbi.JBIException - if the logger is not found.



setSevere
public int setSevere(String logName) throws javax.jbi.JBIException(Code)
Set the log level of the specified logger to SEVERE.
Parameters:
  logName - the logger name. 0 if operation is successful.
throws:
  javax.jbi.JBIException - if the logger is not found.



setWarning
public int setWarning(String logName) throws javax.jbi.JBIException(Code)
Set the log level of the specified logger to WARNING.
Parameters:
  logName - the logger name. 0 if operation is successful.
throws:
  javax.jbi.JBIException - if the logger is not found.



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.