Java Doc for NegotiableCapabilitySet.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » remote » 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 » Java Advanced Imaging » javax.media.jai.remote 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.jai.remote.NegotiableCapabilitySet

NegotiableCapabilitySet
public class NegotiableCapabilitySet implements Serializable(Code)
This class is an aggregation of NegotiableCapability objects. This class can be used to represent all the capabilities of a machine.

This class can be classified as either a preference or a non-preference. For an explanation of the concept of preference, refer to the class comments on javax.media.jai.remote.NegotiableCapability.

If multiple NegotiableCapability objects with the same category and capability name are added to this class, the NegotiableCapability added earliest has the highest preference.

All names are treated in a case-retentive and case-insensitive manner.
since:
   JAI 1.1


Inner Class :class SequentialMap implements Serializable


Constructor Summary
public  NegotiableCapabilitySet(boolean isPreference)
     Creates a NegotiableCapabilitySet.

Method Summary
public  voidadd(NegotiableCapability capability)
     Adds a new NegotiableCapability to this NegotiableCapabilitySet.
public  Listget(String category, String capabilityName)
     Returns all the NegotiableCapabilitys with the given category and capability name added previously, as a List.
public  Listget(String category)
     Returns all the NegotiableCapabilitys with the given category as a List.
public  ListgetCapabilityNames(String category)
     Returns the capability names of all the NegotiableCapability objects that have been added previously, as a List.
public  ListgetCategories()
     Returns the category of all the NegotiableCapability objects that have been added previously, as a List. Returns an empty List, if no NegotiableCapability objects have been added.

The returned List does not contain any duplicates.

public  NegotiableCapabilitygetNegotiatedValue(String category)
     Returns the single NegotiableCapability that is the negotiated result for the given category from the current class.
public  NegotiableCapabilitygetNegotiatedValue(NegotiableCapabilitySet other, String category)
     Performs negotiation with the given NegotiableCapabilitySet for the specified category and returns the single NegotiableCapability that is the negotiated result for the given category, if the negotiation succeeds, null otherwise.

Negotiation is only performed for the specified category.

public  booleanisEmpty()
     Returns true if no NegotiableCapability objects have been added.
public  booleanisPreference()
     Returns true if this NegotiableCapabilitySet is an aggregation of preference NegotiableCapability's, false otherwise.
public  NegotiableCapabilitySetnegotiate(NegotiableCapabilitySet other)
     Returns the common subset supported by this NegotiableCapabilitySet and the given NegotiableCapabilitySet, if the negotiation succeeds. This method returns null if negotiation fails for all categories.

For those categories that are common to both the NegotiableCapabilitySet objects, negotiation is performed on a per category basis.

public  voidremove(NegotiableCapability capability)
     Removes the specified NegotiableCapability from this NegotiableCapabilitySet.


Constructor Detail
NegotiableCapabilitySet
public NegotiableCapabilitySet(boolean isPreference)(Code)
Creates a NegotiableCapabilitySet. The isPreference argument specifies whether this NegotiableCapabilitySet should be treated as a preference or non-preference. If this NegotiableCapabilitySet is specified to be a non-preference, only non-preference NegotiableCapability's will be allowed to be added to it, otherwise an IllegalArgumentException will be thrown at the time of addition. Similarly only preference NegotiableCapability objects can be added to this NegotiableCapabilitySet if isPreference is true.
Parameters:
  isPreference - a boolean that specifies whether the componentNegotiableCapability's are preferences.




Method Detail
add
public void add(NegotiableCapability capability)(Code)
Adds a new NegotiableCapability to this NegotiableCapabilitySet. If a NegotiableCapability with the same category and same capability name as the one currently being added has been added previously, the previous one will have a higher preference.
Parameters:
  capability - The NegotiableCapability to be added.
throws:
  IllegalArgumentException - if capability is null.
throws:
  IllegalArgumentException - if isPreference()returns false, and capability is a preferenceNegotiableCapability.
throws:
  IllegalArgumentException - if isPreference()returns true, and capability is a non-preferenceNegotiableCapability.



get
public List get(String category, String capabilityName)(Code)
Returns all the NegotiableCapabilitys with the given category and capability name added previously, as a List. If none were added, returns an empty List.
Parameters:
  category - The category of the NegotiableCapability.
Parameters:
  capabilityName - The name of the NegotiableCapability.
throws:
  IllegalArgumentException - if category is null.
throws:
  IllegalArgumentException - if capabilityName is null.



get
public List get(String category)(Code)
Returns all the NegotiableCapabilitys with the given category as a List. Returns an empty List if no such NegotiableCapabilitys were added.
Parameters:
  category - The category of the NegotiableCapabilitysto return.
throws:
  IllegalArgumentException - if category is null.



getCapabilityNames
public List getCapabilityNames(String category)(Code)
Returns the capability names of all the NegotiableCapability objects that have been added previously, as a List. Returns an empty List if no such NegotiableCapability objects have been added.

The returned List does not contain any duplicates.
Parameters:
  category - The category of the NegotiableCapability.
throws:
  IllegalArgumentException - if category is null.




getCategories
public List getCategories()(Code)
Returns the category of all the NegotiableCapability objects that have been added previously, as a List. Returns an empty List, if no NegotiableCapability objects have been added.

The returned List does not contain any duplicates.




getNegotiatedValue
public NegotiableCapability getNegotiatedValue(String category)(Code)
Returns the single NegotiableCapability that is the negotiated result for the given category from the current class. Returns null if negotiation for this category failed. If the negotiation is successful, then this method will return the most prefered (the one that was added first i.e. the one that is first in the list) NegotiableCapability from the list of NegotiableCapability that are valid for this category.
Parameters:
  category - The category to find the negotiated result for.
throws:
  IllegalArgumentException - if category is null.



getNegotiatedValue
public NegotiableCapability getNegotiatedValue(NegotiableCapabilitySet other, String category)(Code)
Performs negotiation with the given NegotiableCapabilitySet for the specified category and returns the single NegotiableCapability that is the negotiated result for the given category, if the negotiation succeeds, null otherwise.

Negotiation is only performed for the specified category. For the specified category, if there are 'm' NegotiableCapability objects for which the NegotiableCapabilitySet being negotiated with contains 'n' NegotiableCapability objects, then the negotiation for this category may require m x n number of negotiations at a maximum and one negotiation at a minimum as the negotiation process stops as soon as a negotiation is successful. The results of this successful negotiation are then returned. If all the m x n negotiations fail, null is returned.

If the supplied NegotiableCapabilitySet is null, then the negotiation will fail and null will be returned.
Parameters:
  other - The NegotiableCapabilitySet to negotiate with.
Parameters:
  category - The category to negotiate for.
throws:
  IllegalArgumentException - if category is null.




isEmpty
public boolean isEmpty()(Code)
Returns true if no NegotiableCapability objects have been added.



isPreference
public boolean isPreference()(Code)
Returns true if this NegotiableCapabilitySet is an aggregation of preference NegotiableCapability's, false otherwise.



negotiate
public NegotiableCapabilitySet negotiate(NegotiableCapabilitySet other)(Code)
Returns the common subset supported by this NegotiableCapabilitySet and the given NegotiableCapabilitySet, if the negotiation succeeds. This method returns null if negotiation fails for all categories.

For those categories that are common to both the NegotiableCapabilitySet objects, negotiation is performed on a per category basis. Within each category, negotiation is performed on a per capabilityName basis. The categories which exist only in one or the other NegotiableCapabilitySet are not negotiated upon and do not show up in the resultant NegotiableCapabilitySet, if the negotiation is successful. If this class contains 'm' NegotiableCapability objects for the same category and capabilityName for which the NegotiableCapabilitySet being negotiated with contains 'n' NegotiableCapability objects, then the negotiation for this category and capabilityName will require m x n number of negotiations between two NegotiableCapability objects. The ones that succeed will produce new NegotiableCapability objects which will be added to the returned NegotiableCapabilitySet.

If the supplied NegotiableCapabilitySet is null, then the negotiation will fail, and null will be returned.
Parameters:
  other - The NegotiableCapabilitySet to negotiate with.




remove
public void remove(NegotiableCapability capability)(Code)
Removes the specified NegotiableCapability from this NegotiableCapabilitySet. If the specified NegotiableCapability was not added previously, an IllegalArgumentException will be thrown.
Parameters:
  capability - The NegotiableCapability to be removed.
throws:
  IllegalArgumentException - if capability is null.
throws:
  IllegalArgumentException - if the specifiedNegotiableCapabilitySet was not added previously.



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.