Java Doc for ComponentDescription.java in  » Science » Cougaar12_4 » org » cougaar » core » component » 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 » Science » Cougaar12_4 » org.cougaar.core.component 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.cougaar.core.component.ComponentDescription

ComponentDescription
final public class ComponentDescription implements Serializable(Code)
An immutable description of a loadable component (for example, a plugin, servlet, etc).

We may want several levels of description and protection, starting here and ending up at an uninitialized instance. This could be done either as a sequence of classes or as a single class with instantiation state (e.g. Description, Classloaded, Instantiated, Loaded (into a component), Active).

The Description is interpreted and evaluated to varying degrees as it is passed through the hierarchy until the insertion point is found. In particular, the description will be evaluated for trust attributes at each level before instantiation or pass-through.



Field Summary
final public static  intPRIORITY_BINDER
    
final public static  intPRIORITY_COMPONENT
    
final public static  ComparatorPRIORITY_Comparator
    
final public static  intPRIORITY_HIGH
     Higher priority than internal components.
final public static  intPRIORITY_INTERNAL
     Same priority as internal subcomponents.
final public static  intPRIORITY_LOW
    
final public static  intPRIORITY_STANDARD
    

Constructor Summary
public  ComponentDescription(String name, String insertionPoint, String classname, URL codebase, Object parameter, Object certificate, Object lease, Object policy)
     A ComponentDescription must have a non-null name, insertionPoint, and classname.
public  ComponentDescription(String name, String insertionPoint, String classname, URL codebase, Object parameter, Object certificate, Object lease, Object policy, int priority)
     A ComponentDescription must have a non-null name, insertionPoint, and classname.

Method Summary
public  booleanequals(Object o)
     Equality tests all publicly visibile fields.
public  ObjectgetCertificate()
     Assurance that the Plugin is trustworth enough to instantiate.
public  StringgetClassname()
     The name of the class to instantiate, relative to the codebase url.
public  URLgetCodebase()
     Where the code for classname should be loaded from.
public  StringgetInsertionPoint()
     The point in the component hierarchy where the component should be inserted.
public  ObjectgetLeaseRequested()
     Lease information - how long should the plugin live in the agent? We need some input on what this should look like.
public  StringgetName()
     The name of a particular component, used both as the displayable identifier of the Component and to disambiguate between multiple similar components which might otherwise appear equal.
public  ObjectgetParameter()
     A parameter supplied to the component immediately after construction by calling
instance.setParameter(param);
using reflection.

setParameter will be called IFF the parameter is non-null.

public  ObjectgetPolicy()
     High-level Policy information.
public  intgetPriority()
     Load Priority of the component in it's Container relative to other child components loaded at the same time at the same Containment point. Two components loaded at the same point and time with the same priority will be loaded in the order they are specified in.

However, it is up to the Container how to interpret priority.

public  inthashCode()
    
final public static  intparsePriority(String s)
     return a priority value, given a priority string which is one of HIGH, INTERNAL, BINDER, COMPONENT, LOW, or STANDARD.
final public static  StringpriorityToString(int p)
    
public  StringtoString()
    

Field Detail
PRIORITY_BINDER
final public static int PRIORITY_BINDER(Code)
Binders are typically loaded before subcomponents *



PRIORITY_COMPONENT
final public static int PRIORITY_COMPONENT(Code)
Standard subcomponent (including plugin) priority *



PRIORITY_Comparator
final public static Comparator PRIORITY_Comparator(Code)
A comparator which may be used for sorting ComponentDescriptions by priority *



PRIORITY_HIGH
final public static int PRIORITY_HIGH(Code)
Higher priority than internal components. Containers are less likely to accomodate this level than the others



PRIORITY_INTERNAL
final public static int PRIORITY_INTERNAL(Code)
Same priority as internal subcomponents. E.g. loaded before binders.



PRIORITY_LOW
final public static int PRIORITY_LOW(Code)
Load after standard subcomponents *



PRIORITY_STANDARD
final public static int PRIORITY_STANDARD(Code)
Default priority for ComponentDescription objects *




Constructor Detail
ComponentDescription
public ComponentDescription(String name, String insertionPoint, String classname, URL codebase, Object parameter, Object certificate, Object lease, Object policy)(Code)
A ComponentDescription must have a non-null name, insertionPoint, and classname.
throws:
  IllegalArgumentException - if name is null,insertionPoint is null, or classname is null.



ComponentDescription
public ComponentDescription(String name, String insertionPoint, String classname, URL codebase, Object parameter, Object certificate, Object lease, Object policy, int priority)(Code)
A ComponentDescription must have a non-null name, insertionPoint, and classname.
throws:
  IllegalArgumentException - if name is null,insertionPoint is null, classname is null, or priority is illegal.




Method Detail
equals
public boolean equals(Object o)(Code)
Equality tests all publicly visibile fields.

In the future this may be modified to ignore the certificate, lease, and/or policy.




getCertificate
public Object getCertificate()(Code)
Assurance that the Plugin is trustworth enough to instantiate. The type is specified as Object until we decide what really should be here.



getClassname
public String getClassname()(Code)
The name of the class to instantiate, relative to the codebase url. The class will not be loaded or instantiated until the putative parent component has been found and has had the opportunity to verify the plugin's identity and authorization.



getCodebase
public URL getCodebase()(Code)
Where the code for classname should be loaded from. Will be evaulated for trust before any classes are loaded from this location.



getInsertionPoint
public String getInsertionPoint()(Code)
The point in the component hierarchy where the component should be inserted. It is used by the component hierarchy to determine the container component the plugin should be added. This point is interpreted individually by each (parent) component as it propagates through the container hierarchy - it may be interpreted any number of times along the way to the final insertion point.

example: a plugin would have an insertion point of "Node.AgentManager.Agent.PluginManager.Plugin"

Note that data formats (including presentation methods) may abbreviate full insertion paths as relative to some parent in the context. For instance, agent.ini files may refer to plugins as ".PluginManager.Plugin".




getLeaseRequested
public Object getLeaseRequested()(Code)
Lease information - how long should the plugin live in the agent? We need some input on what this should look like. It is possible that this could be merged with Policy.



getName
public String getName()(Code)
The name of a particular component, used both as the displayable identifier of the Component and to disambiguate between multiple similar components which might otherwise appear equal.

It would be consistent to treat the name as a UID/OID for a specific component.




getParameter
public Object getParameter()(Code)
A parameter supplied to the component immediately after construction by calling
instance.setParameter(param);
using reflection.

setParameter will be called IFF the parameter is non-null. It is an error for a ComponentDescription to specify a non-null parameter, but for the actual Component to not define the setParameter method:

 public void setParameter(Object parameter);
 

A parameter is often some sort of structured object (xml document, etc). While is is defined as just an Object, most implementations impose additional restrictions (e.g. Serializable) for safety reasons.




getPolicy
public Object getPolicy()(Code)
High-level Policy information. Allows plugin policy/techspec to contribute to the component hookup process before it is actually instantiated. Perhaps this is overkill, and instance-level policy is sufficient.



getPriority
public int getPriority()(Code)
Load Priority of the component in it's Container relative to other child components loaded at the same time at the same Containment point. Two components loaded at the same point and time with the same priority will be loaded in the order they are specified in.

However, it is up to the Container how to interpret priority. Priority is, in general, only a recommendation, although the standard Containers implement the recommended interpretation.

In particular, Containers may decline to load high-priority subcomponents as early as they might like.

Note that code should always use the priority constants, rather than int values, as the actual values and implementations are subject to change without notice.




hashCode
public int hashCode()(Code)



parsePriority
final public static int parsePriority(String s)(Code)
return a priority value, given a priority string which is one of HIGH, INTERNAL, BINDER, COMPONENT, LOW, or STANDARD.



priorityToString
final public static String priorityToString(int p)(Code)
return a priority string given a legal priority value *



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.