Java Doc for SerializerFactory.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.SerializerFactory

SerializerFactory
final public class SerializerFactory (Code)
A utility class which provides factory methods for obtaining Serializer instances.

The Serializers are maintained in a centralized repository which is organized based on the classes supported by the Serializers and the order in which the Serializers were registered. Convenience methods similar to those defined in the Serializer class are also provided. These enable functionality equivalent to a single Serializer which supports all the classes supported by the aggregate of all Serializers resident in the repository.

By default Serializers for the following classes are registered by JAI:

  • java.awt.RenderingHints
    (entries which are neither Serializable nor supported by SerializerFactory are omitted; support for specific RenderingHints.Key subclasses may be added by new Serializers);
  • java.awt.RenderingHints.Key
    (limited to RenderingHints.Keys defined in java.awt.RenderingHints and javax.media.jai.JAI);
  • java.awt.Shape;
  • java.awt.image.DataBufferByte;
  • java.awt.image.DataBufferShort;
  • java.awt.image.DataBufferUShort;
  • java.awt.image.DataBufferInt;
  • javax.media.jai.DataBufferFloat;
  • javax.media.jai.DataBufferDouble;
  • java.awt.image.ComponentSampleModel;
  • java.awt.image.BandedSampleModel;
  • java.awt.image.PixelInterleavedSampleModel;
  • java.awt.image.SinglePixelPackedSampleModel;
  • java.awt.image.MultiPixelPackedSampleModel;
  • javax.media.jai.ComponentSampleModelJAI;
  • java.awt.image.Raster
    (limited to Rasters which have a DataBuffer and SampleModel supported by a Serializer);
  • java.awt.image.WritableRaster
    (limited to WritableRasters which have a DataBuffer and SampleModel supported by a Serializer);
  • java.awt.image.ComponentColorModel;
  • java.awt.image.IndexColorModel;
  • java.awt.image.DirectColorModel;
  • javax.media.jai.FloatColorModel;
  • java.awt.image.renderable.RenderContext;

  • (constrained by the aforementioned limitations of the RenderingHints Serializer);
  • java.awt.image.RenderedImage
    (limited to RenderedImages which have Rasters and a ColorModel supported by a Serializer);
  • java.awt.image.WritableRenderedImage
    (limited to WritableRenderedImages which have Rasters and a ColorModel supported by a Serializer);
  • java.io.Serializable;
  • java.util.HashSet
    (elements which are neither Serializable nor supported by SerializerFactory are omitted);
  • java.util.Hashtable
    (entries which are neither Serializable nor supported by SerializerFactory are omitted);
  • java.util.Vector
    (elements which are neither Serializable nor supported by SerializerFactory are omitted);

See Also:   SerializableState
See Also:   Serializer
See Also:   java.io.Serializable
since:
   JAI 1.1


Field Summary
final static  SerializableStateNULL_STATE
    

Constructor Summary
protected  SerializerFactory()
    

Method Summary
public static  ClassgetDeserializedClass(Class c)
     Determines the Class of which the deserialized form of the supplied Class will be an instance.
public static synchronized  SerializergetSerializer(Class c)
     Retrieves a Serializer for a given class c. If more than one Serializer is available for the class then the most recently registered Serializer will be returned.
public static synchronized  Serializer[]getSerializers(Class c)
     Retrieves an array of all Serializers currently resident in the repository which directly support the specified Class.
public static  SerializableStategetState(Object o, RenderingHints h)
     Converts an object into a state-preserving object which may be serialized.
final public static  SerializableStategetState(Object o)
     A convenience wrapper around getState(Object o, RenderingHints h) with the RenderingHints parameter h set to null.
public static  Class[]getSupportedClasses()
     Returns an array listing all classes and interfaces on which the isSupportedClass() method of this class may be invoked and return true.
public static  booleanisSupportedClass(Class c)
     Whether there is currently resident in the repository a Serializer the getSupportedClass() method of which returns a value equal to the parameter supplied to this method according to equals().
Parameters:
  c - The class to be tested for compatibility.
public static synchronized  voidregisterSerializer(Serializer s)
     Adds a Serializer to the repository.
public static synchronized  voidunregisterSerializer(Serializer s)
     Removes a Serializer from the repository.

Field Detail
NULL_STATE
final static SerializableState NULL_STATE(Code)




Constructor Detail
SerializerFactory
protected SerializerFactory()(Code)




Method Detail
getDeserializedClass
public static Class getDeserializedClass(Class c)(Code)
Determines the Class of which the deserialized form of the supplied Class will be an instance. Specifically, this method returns the Class of the Object returned by invoking getObject() on the SerializableState returned by getState() after the state object has been serialized and deserialized. The returned value will equal the supplied argument unless there is no Serializer explicitly registered for this class but there is a Serializer registered for a superclass with a permitsSubclasses() method that returns true.
Parameters:
  The - Class for which the deserialized class type isrequested. The deserialized Class or null.
exception:
  IllegalArgumentException - if c isnull



getSerializer
public static synchronized Serializer getSerializer(Class c)(Code)
Retrieves a Serializer for a given class c. If more than one Serializer is available for the class then the most recently registered Serializer will be returned. If no registered Serializer exists which directly supports the specified class, i.e., one for which the getSupportedClass() returns a value equal to the specified class, then a Serializer may be returned which is actually registered against a superclass but permits subclass serialization.
Parameters:
  c - The class for which Serializers will beretrieved. A Serializer which supports the specified class.or null if none is available.
exception:
  IllegalArgumentException - if c isnull.
See Also:   java.awt.image.BandedSampleModel
See Also:   java.awt.image.ComponentSampleModel



getSerializers
public static synchronized Serializer[] getSerializers(Class c)(Code)
Retrieves an array of all Serializers currently resident in the repository which directly support the specified Class. Serializers which support a superclass of the specified class and permit subclass serialization will not be included.
Parameters:
  c - The class for which Serializers will beretrieved.
exception:
  IllegalArgumentException - if c isnull.



getState
public static SerializableState getState(Object o, RenderingHints h)(Code)
Converts an object into a state-preserving object which may be serialized. If the class of the object parameter is supported explicitly, i.e., isSupportedClass(o.getClass()) returns true, then the object will be converted into a form which may be deserialized into an instance of the same class. If the class is not supported explicitly but implements one or more supported interfaces, then it will be converted into a form which may be deserialized into an instance of an unspecified class which implements all interfaces which are both implemented by the class of the object and supported by some Serializer currently resident in the repository. If the object is null, the returned SerializableState will return null from its getObject() method and java.lang.Object.class from its getObjectClass() method.
Parameters:
  o - The object to be converted into a serializable form.
Parameters:
  h - Configuration parameters the exact nature of which isSerializer-dependent. If null,reasonable default settings should be used. A serializable form of the supplied object.
exception:
  IllegalArgumentException - if o isnon-null and eitherisSupportedClass(o.getClass()) returnsfalse, or ois not an instance of a class supported by aSerializer in the repository or whichimplements at least one interface supported by someSerializers in the repository.



getState
final public static SerializableState getState(Object o)(Code)
A convenience wrapper around getState(Object o, RenderingHints h) with the RenderingHints parameter h set to null.



getSupportedClasses
public static Class[] getSupportedClasses()(Code)
Returns an array listing all classes and interfaces on which the isSupportedClass() method of this class may be invoked and return true. An array of all supported classes and interfaces.



isSupportedClass
public static boolean isSupportedClass(Class c)(Code)
Whether there is currently resident in the repository a Serializer the getSupportedClass() method of which returns a value equal to the parameter supplied to this method according to equals().
Parameters:
  c - The class to be tested for compatibility. Whether the specified class is directly supported.
exception:
  IllegalArgumentException - if c isnull



registerSerializer
public static synchronized void registerSerializer(Serializer s)(Code)
Adds a Serializer to the repository.
Parameters:
  s - The Serializers to be added to the repository.
exception:
  IllegalArgumentException - if s isnull



unregisterSerializer
public static synchronized void unregisterSerializer(Serializer s)(Code)
Removes a Serializer from the repository.
Parameters:
  s - The Serializers to be removed from the repository.
exception:
  IllegalArgumentException - if s isnull



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.