Java Doc for IvyContext.java in  » Code-Analyzer » apache-ivy » org » apache » ivy » core » 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 » Code Analyzer » apache ivy » org.apache.ivy.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.ivy.core.IvyContext

IvyContext
public class IvyContext (Code)
This class represents an execution context of an Ivy action. It contains several getters to retrieve information, like the used Ivy instance, the cache location...
See Also:   IvyThread



Constructor Summary
public  IvyContext()
    
public  IvyContext(IvyContext ctx)
    

Method Summary
public  voidcheckInterrupted()
    
public  Objectget(String key)
    
public  CircularDependencyStrategygetCircularDependencyStrategy()
    
public static  IvyContextgetContext()
    
public  DependencyDescriptorgetDependencyDescriptor()
    
public  EventManagergetEventManager()
    
public  IvygetIvy()
     Returns the current ivy instance.
public  MessageLoggergetMessageLogger()
    
public  ThreadgetOperatingThread()
    
public  ResolveDatagetResolveData()
    
public  IvySettingsgetSettings()
    
public  Objectpeek(String key)
     Reads the first object from the list saved under given key in the context.
public static  ObjectpeekInContextStack(String key)
     Reads the first object from the list saved under given key in the first context from the context stack in which this key is defined.
public  IvypeekIvy()
     Returns the Ivy instance associated with this context, or null if no such instance is currently associated with this context.
public  Objectpop(String key)
     Removes and returns first object from the list saved under given key in the context.
public  booleanpop(String key, Object expectedValue)
     Removes and returns first object from the list saved under given key in the context but only if it equals the given expectedValue - if not a false value is returned.
public static  IvyContextpopContext()
     Pops one context used with this thread.
public  voidpush(String key, Object value)
     Puts a new object at the start of the list saved under given key in the context.
public static  IvyContextpushContext(IvyContext context)
     Changes the context associated with this thread.
public static  IvyContextpushNewContext()
     Creates a new IvyContext and pushes it as the current context in the current thread.
public static  IvyContextpushNewCopyContext()
     Creates a new IvyContext as a copy of the current one and pushes it as the current context in the current thread.
public  voidset(String key, Object value)
    
public  voidsetDependencyDescriptor(DependencyDescriptor dd)
    
public  voidsetIvy(Ivy ivy)
    
public  voidsetResolveData(ResolveData data)
    


Constructor Detail
IvyContext
public IvyContext()(Code)



IvyContext
public IvyContext(IvyContext ctx)(Code)




Method Detail
checkInterrupted
public void checkInterrupted()(Code)



get
public Object get(String key)(Code)



getCircularDependencyStrategy
public CircularDependencyStrategy getCircularDependencyStrategy()(Code)



getContext
public static IvyContext getContext()(Code)



getDependencyDescriptor
public DependencyDescriptor getDependencyDescriptor()(Code)



getEventManager
public EventManager getEventManager()(Code)



getIvy
public Ivy getIvy()(Code)
Returns the current ivy instance.

When calling any public ivy method on an ivy instance, a reference to this instance is put in this context, and thus accessible using this method, until no code reference this instance and the garbage collector collects it.

Then, or if no ivy method has been called, a default ivy instance is returned by this method, so that it never returns null.

the current ivy instance



getMessageLogger
public MessageLogger getMessageLogger()(Code)



getOperatingThread
public Thread getOperatingThread()(Code)



getResolveData
public ResolveData getResolveData()(Code)



getSettings
public IvySettings getSettings()(Code)



peek
public Object peek(String key)(Code)
Reads the first object from the list saved under given key in the context. If value under key represents non List object then a RuntimeException is thrown.
Parameters:
  key - context key for the string top object from the list (index 0) or null if no key or list empty



peekInContextStack
public static Object peekInContextStack(String key)(Code)
Reads the first object from the list saved under given key in the first context from the context stack in which this key is defined. If value under key in any of the contexts form the stack represents non List object then a RuntimeException is thrown.

This methods does a similar job to IvyContext.peek(String) , except that it considers the whole context stack and not only one instance.


Parameters:
  key - context key for the string top object from the list (index 0) of the first context in the stack containing thiskey or null if no key or list empty in all contexts from the context stack
See Also:   IvyContext.peek(String)



peekIvy
public Ivy peekIvy()(Code)
Returns the Ivy instance associated with this context, or null if no such instance is currently associated with this context.

If you want get a default Ivy instance in case no instance if currently associated, use IvyContext.getIvy() .

the current ivy instance, or null if there is no current ivy instance.



pop
public Object pop(String key)(Code)
Removes and returns first object from the list saved under given key in the context. If value under key represents non List object then a RuntimeException is thrown.
Parameters:
  key - context key for the string top object from the list (index 0) or null if no key or list empty



pop
public boolean pop(String key, Object expectedValue)(Code)
Removes and returns first object from the list saved under given key in the context but only if it equals the given expectedValue - if not a false value is returned. If value under key represents non List object then a RuntimeException is thrown.
Parameters:
  key - context key for the string true if the r



popContext
public static IvyContext popContext()(Code)
Pops one context used with this thread. This is usually called after having finished a task for which a call to IvyContext.pushNewContext() or IvyContext.pushContext(IvyContext) was done prior to beginning the task. the popped context



push
public void push(String key, Object value)(Code)
Puts a new object at the start of the list saved under given key in the context. If value under key represents non List object then a RuntimeException is thrown. If no list exists under given key a new LinkedList is created. This is kept without WeakReference in opposite to the put() results.
Parameters:
  key - key context key for the string
Parameters:
  value - value to be saved under the key



pushContext
public static IvyContext pushContext(IvyContext context)(Code)
Changes the context associated with this thread. This is especially useful when launching a new thread, to associate it with the same context as the initial one. Do not forget to call IvyContext.popContext() when done.
Parameters:
  context - the new context to use in this thread. the pushed context



pushNewContext
public static IvyContext pushNewContext()(Code)
Creates a new IvyContext and pushes it as the current context in the current thread.

IvyContext.popContext() should usually be called when the job for which this context has been pushed is finished.

the newly pushed context



pushNewCopyContext
public static IvyContext pushNewCopyContext()(Code)
Creates a new IvyContext as a copy of the current one and pushes it as the current context in the current thread.

IvyContext.popContext() should usually be called when the job for which this context has been pushed is finished.

the newly pushed context



set
public void set(String key, Object value)(Code)



setDependencyDescriptor
public void setDependencyDescriptor(DependencyDescriptor dd)(Code)



setIvy
public void setIvy(Ivy ivy)(Code)



setResolveData
public void setResolveData(ResolveData data)(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.