Java Doc for AntSession.java in  » IDE-Netbeans » library » org » apache » tools » ant » module » spi » 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 » IDE Netbeans » library » org.apache.tools.ant.module.spi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tools.ant.module.spi.AntSession

AntSession
final public class AntSession (Code)
Represents one Ant build session, possibly consisting of multiple targets, subprojects, and so on. A session may be shared by several AntLogger s.
author:
   Jesse Glick
since:
   org.apache.tools.ant.module/3 3.12




Method Summary
public  voidconsumeException(Throwable t)
     Marks an exception as having been processed by a logger.

A single build-halting exception can traverse any number of Ant events as it progresses outwards, typically from the failing task to the failing target (possibly several times due to subprojects) and finally to the build failure.

Consuming the exception permits a logger to indicate to other loggers that it has already handled the problem in an appropriate manner.

public  OutputListenercreateStandardHyperlink(URL file, String message, int line1, int column1, int line2, int column2)
     Convenience method to create a standard hyperlink implementation. The GUI of the hyperlink will be oriented toward error messages and may involve editor annotations. Line and column numbers start at 1.
Parameters:
  file - a file to link to (may or may not exist, but hyperlink will not work if it does not)
Parameters:
  message - a message to use e.g.
public  voiddeliverMessageLogged(AntEvent originalEvent, String message, int level)
     Deliver a message logged event to all matching loggers.

Loggers will receive AntLogger.messageLogged with an event similar to the original event except for the message and log level; also the exception will always be null and the event will initially be unconsumed.

This call blocks until all loggers have processed the nested event. Note that this logger may also receive the event so it must be reentrant.

Loggers are discouraged from using this facility merely to create hyperlinks for which the target is known.

public  ObjectgetCustomData(AntLogger logger)
     Get optional data stored by the logger in this session.
public  StringgetDisplayName()
     Get a display name used for the session as a whole.
public  FilegetOriginatingScript()
     Get the Ant script originally invoked.
public  String[]getOriginatingTargets()
     Get the Ant targets originally run.
public  intgetVerbosity()
     Get the (user-requested) verbosity level for this session. Generally only messages logged at this or lesser level (higher priority) should be displayed. the verbosity, e.g.
public  booleanisExceptionConsumed(Throwable t)
     Tests whether a given exception has already been consumed by some logger.

Note that if an exception is consumed, any exception with that exception as its Throwable.getCause (possibly recursively) is also considered consumed.

public  voidprintln(String message, boolean err, OutputListener listener)
     Print a line of text to the Ant output.
public  voidputCustomData(AntLogger logger, Object data)
     Store custom data associated with this session.
public  StringtoString()
    



Method Detail
consumeException
public void consumeException(Throwable t) throws IllegalStateException(Code)
Marks an exception as having been processed by a logger.

A single build-halting exception can traverse any number of Ant events as it progresses outwards, typically from the failing task to the failing target (possibly several times due to subprojects) and finally to the build failure.

Consuming the exception permits a logger to indicate to other loggers that it has already handled the problem in an appropriate manner. Since the standard logger may print an exception (possibly with stack trace) that is part of a AntLogger.buildFinished event, loggers which deal with the exception in some other way should consume it before returning from the callback.


Parameters:
  t - an exception to mark as consumed
throws:
  IllegalStateException - if it was already consumed



createStandardHyperlink
public OutputListener createStandardHyperlink(URL file, String message, int line1, int column1, int line2, int column2)(Code)
Convenience method to create a standard hyperlink implementation. The GUI of the hyperlink will be oriented toward error messages and may involve editor annotations. Line and column numbers start at 1.
Parameters:
  file - a file to link to (may or may not exist, but hyperlink will not work if it does not)
Parameters:
  message - a message to use e.g. for the status bar when clicking on the hyperlink,or for annotation tool tips
Parameters:
  line1 - the starting line number, or -1 if there is no associated line number
Parameters:
  column1 - the starting column number, or -1 if there is no associated column number(must be -1 if line1 is -1)
Parameters:
  line2 - the ending line number, or -1 for a single-line link(must be -1 if line1 is -1)
Parameters:
  column2 - the ending column number, or -1 if not applicable(must be -1 if either line2 or column1 is -1) a standard hyperlink suitable for AntSession.println



deliverMessageLogged
public void deliverMessageLogged(AntEvent originalEvent, String message, int level)(Code)
Deliver a message logged event to all matching loggers.

Loggers will receive AntLogger.messageLogged with an event similar to the original event except for the message and log level; also the exception will always be null and the event will initially be unconsumed.

This call blocks until all loggers have processed the nested event. Note that this logger may also receive the event so it must be reentrant.

Loggers are discouraged from using this facility merely to create hyperlinks for which the target is known. Use AntSession.println instead. This method is primarily intended for use from the standard logger to deliver stack trace lines to other loggers which may be able to hyperlink them.


Parameters:
  originalEvent - the original event received by the calling logger
Parameters:
  message - a message to log (see AntEvent.getMessage)
Parameters:
  level - the level to log it at (see AntEvent.getLogLevel)



getCustomData
public Object getCustomData(AntLogger logger)(Code)
Get optional data stored by the logger in this session.
Parameters:
  logger - the logger which wishes to retrieve data any optional data, or null initially



getDisplayName
public String getDisplayName()(Code)
Get a display name used for the session as a whole. a user-presentable display name appropriate for session-scope messaging



getOriginatingScript
public File getOriginatingScript()(Code)
Get the Ant script originally invoked. Note that due to subproject support some events may come from other scripts. the Ant script which was run to start with



getOriginatingTargets
public String[] getOriginatingTargets()(Code)
Get the Ant targets originally run. a list of one or more targets (but may be empty during AntLogger.buildInitializationFailed)



getVerbosity
public int getVerbosity()(Code)
Get the (user-requested) verbosity level for this session. Generally only messages logged at this or lesser level (higher priority) should be displayed. the verbosity, e.g. AntEvent.LOG_INFO



isExceptionConsumed
public boolean isExceptionConsumed(Throwable t)(Code)
Tests whether a given exception has already been consumed by some logger.

Note that if an exception is consumed, any exception with that exception as its Throwable.getCause (possibly recursively) is also considered consumed. This is useful because Ant's ProjectHelper.addLocationToBuildException will annotate BuildExceptions with location information by constructing wrapper exceptions.


Parameters:
  t - an exception true if it (or a nested exception) has already been consumed by AntSession.consumeException



println
public void println(String message, boolean err, OutputListener listener)(Code)
Print a line of text to the Ant output.
Parameters:
  message - a message to print (newline will be appended automatically)
Parameters:
  err - true to send to the error stream, false for regular output
Parameters:
  listener - an output listener suitable for hyperlinks, or null for a plain print
See Also:   AntSession.createStandardHyperlink



putCustomData
public void putCustomData(AntLogger logger, Object data)(Code)
Store custom data associated with this session. May be used by the logger to keep some information that will persist for the lifetime of the session.
Parameters:
  logger - the logger which wishes to store data
Parameters:
  data - some custom data to retain



toString
public String toString()(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.