Java Doc for ServerLog.java in  » 6.0-JDK-Modules » j2me » gov » nist » siplite » stack » 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 » 6.0 JDK Modules » j2me » gov.nist.siplite.stack 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gov.nist.siplite.stack.ServerLog

ServerLog
public class ServerLog (Code)
Log file wrapper class. Log messages into the message trace file and also write the log into the debug file if needed. This class keeps an XML formatted trace around for later access via RMI. The trace can be viewed with a trace viewer (see tools.traceviewerapp).
version:
   JAIN-SIP-1.1
version:
   This code is in the public domain.


Field Summary
public static  intTRACE_DEBUG
     Debug trace level (all tracing enabled).
public static  intTRACE_EXCEPTION
     Trace exception processing.
public static  intTRACE_MESSAGES
     Trace messages.
public static  intTRACE_NONE
    
protected static  StringauxInfo
     Auxililary information to log with this trace.
protected static  Stringdescription
     Desription for mesasge.
protected static  PrintStreamprintWriter
     Print stream for writing out debug messages.
protected static  StringstackIpAddress
     Stack pointer for mesasge.
protected static  inttraceLevel
     Default trace level.
protected static  PrintStreamtraceWriter
     Print stream for writing out tracing messages.


Method Summary
public static  voidcheckLogFile()
     Checks for valid logging output destination.
public static  intgetTraceLevel()
     Gets the trace level for the stack.
public static  voidlogException(Exception ex)
     Logs an exception stack trace.
public static  voidlogMessage(String message)
     Logs a message into the log file.
public static synchronized  voidlogMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid, String time)
     Logs a message into the log directory.
public static synchronized  voidlogMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid, long time)
     Logs a message into the log directory.
public static  voidlogMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid)
     Logs a message into the log directory.
public static  voidlogMessage(Message message, String from, String to, boolean sender, String time)
     Logs a message into the log directory.
public static  voidlogMessage(Message message, String from, String to, boolean sender, long time)
     Logs a message into the log directory.
public static  voidlogMessage(Message message, String from, String to, boolean sender)
     Logs a message into the log directory.
public static  voidlogMessage(Message message, String from, String to, String status, boolean sender, String time)
     Logs a message into the log directory.
Parameters:
  message - a Message to log
Parameters:
  from - from header of the message to log into the log directory
Parameters:
  to - to header of the message to log into the log directory
Parameters:
  status - the status to log.
public static  voidlogMessage(Message message, String from, String to, String status, boolean sender, long time)
     Logs a message into the log directory.
Parameters:
  message - a Message to log
Parameters:
  from - from header of the message to log into the log directory
Parameters:
  to - to header of the message to log into the log directory
Parameters:
  status - the status to log.
public static  voidlogMessage(Message message, String from, String to, String status, boolean sender)
     Logs a message into the log directory.
public static  booleanneedsLogging(int logLevel)
     Checks to see if logging is enabled at a level (avoids unecessary message formatting.
Parameters:
  logLevel - level at which to check.
public static  booleanneedsLogging()
     Global check for whether to log or not.
public static  voidsetAuxInfo(String auxInfo)
     Sets aux information.
public static  voidsetDescription(String desc)
     Sets the descriptive String for the log.
public static  voidsetLogFileName(String loggerURL)
     Sets the log file name.
public static  voidsetTraceLevel(int level)
     Sets the trace level for the stack.
Parameters:
  level - -- the trace level to set.

Field Detail
TRACE_DEBUG
public static int TRACE_DEBUG(Code)
Debug trace level (all tracing enabled).



TRACE_EXCEPTION
public static int TRACE_EXCEPTION(Code)
Trace exception processing.



TRACE_MESSAGES
public static int TRACE_MESSAGES(Code)
Trace messages.



TRACE_NONE
public static int TRACE_NONE(Code)
Dont trace



auxInfo
protected static String auxInfo(Code)
Auxililary information to log with this trace.



description
protected static String description(Code)
Desription for mesasge.



printWriter
protected static PrintStream printWriter(Code)
Print stream for writing out debug messages.



stackIpAddress
protected static String stackIpAddress(Code)
Stack pointer for mesasge.



traceLevel
protected static int traceLevel(Code)
Default trace level.



traceWriter
protected static PrintStream traceWriter(Code)
Print stream for writing out tracing messages.





Method Detail
checkLogFile
public static void checkLogFile()(Code)
Checks for valid logging output destination.



getTraceLevel
public static int getTraceLevel()(Code)
Gets the trace level for the stack. the trace level



logException
public static void logException(Exception ex)(Code)
Logs an exception stack trace.
Parameters:
  ex - Exception to log into the log file



logMessage
public static void logMessage(String message)(Code)
Logs a message into the log file.
Parameters:
  message - message to log into the log file.



logMessage
public static synchronized void logMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid, String time)(Code)
Logs a message into the log directory.
Parameters:
  message - a Message to log
Parameters:
  from - from header of the message to log into the log directory
Parameters:
  to - to header of the message to log into the log directory
Parameters:
  sender - is the server the sender (true if I am the sender).
Parameters:
  callId - CallId of the message to log into the log directory.
Parameters:
  firstLine - First line of the message to display
Parameters:
  status - Status information (generated while processing message).
Parameters:
  tid - is the transaction id for the message.
Parameters:
  time - the reception time (or date).



logMessage
public static synchronized void logMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid, long time)(Code)
Logs a message into the log directory.
Parameters:
  message - a Message to log
Parameters:
  from - from header of the message to log into the log directory
Parameters:
  to - to header of the message to log into the log directory
Parameters:
  sender - is the server the sender (true if I am the sender).
Parameters:
  callId - CallId of the message to log into the log directory.
Parameters:
  firstLine - First line of the message to display
Parameters:
  status - Status information (generated while processing message).
Parameters:
  tid - is the transaction id for the message.
Parameters:
  time - the reception time (or date).



logMessage
public static void logMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid)(Code)
Logs a message into the log directory.
Parameters:
  message - a Message to log
Parameters:
  from - from header of the message to log into the log directory
Parameters:
  to - to header of the message to log into the log directory
Parameters:
  sender - is the server the sender
Parameters:
  callId - CallId of the message to log into the log directory.
Parameters:
  firstLine - First line of the message to display
Parameters:
  status - Status information (generated while processing message).
Parameters:
  tid - is the transaction id for the message.



logMessage
public static void logMessage(Message message, String from, String to, boolean sender, String time)(Code)
Logs a message into the log directory. Status information is extracted from the NISTExtension Header.
Parameters:
  message - a Message to log
Parameters:
  from - from header of the message to log into the log directory
Parameters:
  to - to header of the message to log into the log directory
Parameters:
  sender - is the server the sender
Parameters:
  time - is the time to associate with the message.



logMessage
public static void logMessage(Message message, String from, String to, boolean sender, long time)(Code)
Logs a message into the log directory. Status information is extracted from the NISTExtension Header.
Parameters:
  message - a Message to log
Parameters:
  from - from header of the message to log into the log directory
Parameters:
  to - to header of the message to log into the log directory
Parameters:
  sender - is the server the sender
Parameters:
  time - is the time to associate with the message.



logMessage
public static void logMessage(Message message, String from, String to, boolean sender)(Code)
Logs a message into the log directory. Status information is extracted from SIPExtension header. The time associated with the message is the current time.
Parameters:
  message - a Message to log
Parameters:
  from - from header of the message to log into the log directory
Parameters:
  to - to header of the message to log into the log directory
Parameters:
  sender - is the server the sender



logMessage
public static void logMessage(Message message, String from, String to, String status, boolean sender, String time)(Code)
Logs a message into the log directory.
Parameters:
  message - a Message to log
Parameters:
  from - from header of the message to log into the log directory
Parameters:
  to - to header of the message to log into the log directory
Parameters:
  status - the status to log. This is appended to any NISTExtensionheader present in the message.
Parameters:
  sender - is the server the sender or receiver (true if sender).
Parameters:
  time - is the reception time.



logMessage
public static void logMessage(Message message, String from, String to, String status, boolean sender, long time)(Code)
Logs a message into the log directory.
Parameters:
  message - a Message to log
Parameters:
  from - from header of the message to log into the log directory
Parameters:
  to - to header of the message to log into the log directory
Parameters:
  status - the status to log. This is appended to any NISTExtensionheader present in the message.
Parameters:
  sender - is the server the sender or receiver (true if sender).
Parameters:
  time - is the reception time.



logMessage
public static void logMessage(Message message, String from, String to, String status, boolean sender)(Code)
Logs a message into the log directory. Time stamp associated with the message is the current time.
Parameters:
  message - a Message to log
Parameters:
  from - from header of the message to log into the log directory
Parameters:
  to - to header of the message to log into the log directory
Parameters:
  status - the status to log.
Parameters:
  sender - is the server the sender or receiver (true if sender).



needsLogging
public static boolean needsLogging(int logLevel)(Code)
Checks to see if logging is enabled at a level (avoids unecessary message formatting.
Parameters:
  logLevel - level at which to check. true if tracing the requested logging level



needsLogging
public static boolean needsLogging()(Code)
Global check for whether to log or not. ToHeader minimize the time return false here. true -- if logging is globally enabled and false otherwise.



setAuxInfo
public static void setAuxInfo(String auxInfo)(Code)
Sets aux information. Auxiliary information may be associated with the log file. This is useful for remote logs.
Parameters:
  auxInfo - -- auxiliary information.



setDescription
public static void setDescription(String desc)(Code)
Sets the descriptive String for the log.
Parameters:
  desc - is the descriptive string.



setLogFileName
public static void setLogFileName(String loggerURL)(Code)
Sets the log file name. (need revisit)
Parameters:
  loggerURL - is the name of the log file to set.



setTraceLevel
public static void setTraceLevel(int level)(Code)
Sets the trace level for the stack.
Parameters:
  level - -- the trace level to set. The following trace levels aresupported:
  • 0 -- no tracing
  • 16 -- trace messages only
  • 32 Full tracing including debug messages.



Methods inherited from java.lang.Object
public boolean equals(Object obj)(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.