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


com.sun.media.jai.rmi.RMIImage

RMIImage
public interface RMIImage extends Remote(Code)
An interface for server-side imaging. This interface attempts to mimic the RenderedImage interface as much as possible. However, there are several unavoidable differences:
  • Additional setSource() methods are provided to inform the server as to the source of image data for this image. Sources may be set either from a RenderedImage that is copied over to the server, or from a graph of RenderedOp objects indicating an abstract imaging chain to be instantiated using the server's OperationRegistry.
  • All methods throw RemoteException. This is a requirement of any Remote interface.
  • The getTile() method does not return a reference to a `live' tile; instead it returns a client-side copy of the server image's tile. The difference is moot since the server image is immutable.
To instantiate a RMIImage, do the following:
 RMIImage im;
 im = java.rmi.Naming.lookup("//host:1099/javax.media.jai.RemoteImageServer");
 

The hostname and port will of course depend on the local setup. The host must be running an rmiregistry process and have a RemoteImageServer listening at the desired port.

This call will result in the creation of a server-side RMIImageImpl object and a client-side stub object. The client stub serializes its method arguments and transfers them to the server over a socket; the server serializes it return values and returns them in the same manner.

This process implies that all arguments and return values must be serializable. In the case of a RenderedImage source, serializability is not guaranteed and must be considered on a class-by-class basis. For RenderedOps, which are basically simple nodes connected by ParameterBlocks, serializability will be determined by the serializabiility of the ultimate (non-RenderedOp) sources of the DAG and the serializability of any ad-hoc Object parameters held in the ParameterBlocks.

The return values of the getData(), copyData(), and getTile() methods are various kinds of Rasters; at present, Java2D does not define serialization on Rasters. We will either need to add this feature to Java2D or else coerce the server-side Rasters into a serializable subclass form. In any case, we will want to implement lossless (and possibly lossy) compression as part of the serialization process wherever possible.
See Also:   java.rmi.Remote
See Also:   java.rmi.RemoteException
See Also:   java.awt.image.RenderedImage
See Also:   RemoteImage
since:
   EA3



Field Summary
final public static  StringRMI_IMAGE_SERVER_NAME
     The name to which the remote image server should be bound.


Method Summary
 RasterProxycopyData(Long id, Rectangle bounds)
     Returns the same result as getData(Rectangle) would for the same rectangular region.
 voiddispose(Long id)
     Disposes of any resouces allocated to the client object with the specified ID.
 ColorModelProxygetColorModel(Long id)
     Returns the ColorModel associated with this image.
 RasterProxygetData(Long id)
     Returns the entire image as a single Raster.
 RasterProxygetData(Long id, Rectangle bounds)
     Returns an arbitrary rectangular region of the RenderedImage in a Raster.
 intgetHeight(Long id)
     Returns the height of the RMIImage.
 intgetMinTileX(Long id)
     Returns the index of the minimum tile in the X direction of the image.
 intgetMinTileY(Long id)
     Returns the index of the minimum tile in the Y direction of the image.
 intgetMinX(Long id)
     Returns the minimum X coordinate of the RMIImage.
 intgetMinY(Long id)
     Returns the minimum Y coordinate of the RMIImage.
 intgetNumXTiles(Long id)
     Returns the number of tiles across the image.
 intgetNumYTiles(Long id)
     Returns the number of tiles down the image.
 ObjectgetProperty(Long id, String name)
     Gets a property from the property set of this image. If the property name is not recognized, java.awt.Image.UndefinedProperty will be returned.
Parameters:
  id - An ID for the source which must be unique across all clients.
Parameters:
  name - the name of the property to get, as a String.
 String[]getPropertyNames(Long id)
     Returns a list of names recognized by getProperty(String).
 LonggetRemoteID()
     Returns the identifier of the remote image.
 SampleModelProxygetSampleModel(Long id)
     Returns the SampleModel associated with this image.
 VectorgetSources(Long id)
     Returns a vector of RenderedImages that are the sources of image data for this RMIImage.
 RasterProxygetTile(Long id, int x, int y)
     Returns tile (x, y).
 intgetTileGridXOffset(Long id)
     Returns the X offset of the tile grid relative to the origin.
 intgetTileGridYOffset(Long id)
     Returns the Y offset of the tile grid relative to the origin.
 intgetTileHeight(Long id)
     Returns the height of a tile in pixels.
 intgetTileWidth(Long id)
     Returns the width of a tile in pixels.
 intgetWidth(Long id)
     Returns the width of the RMIImage.
 voidsetSource(Long id, RenderedImage source)
     Sets the source of the image on the server side.
 voidsetSource(Long id, RenderedOp source)
     Sets the source to a RenderedOp (i.e., an imaging DAG).
 voidsetSource(Long id, RenderableOp source, RenderContextProxy renderContextProxy)
     Sets the source to a RenderableOp defined by a renderable imaging DAG and a rendering context.

Field Detail
RMI_IMAGE_SERVER_NAME
final public static String RMI_IMAGE_SERVER_NAME(Code)
The name to which the remote image server should be bound.





Method Detail
copyData
RasterProxy copyData(Long id, Rectangle bounds) throws RemoteException(Code)
Returns the same result as getData(Rectangle) would for the same rectangular region.



dispose
void dispose(Long id) throws RemoteException(Code)
Disposes of any resouces allocated to the client object with the specified ID.



getColorModel
ColorModelProxy getColorModel(Long id) throws RemoteException(Code)
Returns the ColorModel associated with this image.



getData
RasterProxy getData(Long id) throws RemoteException(Code)
Returns the entire image as a single Raster. a RasterProxy containing a copy of this image's data.



getData
RasterProxy getData(Long id, Rectangle bounds) throws RemoteException(Code)
Returns an arbitrary rectangular region of the RenderedImage in a Raster. The rectangle of interest will be clipped against the image bounds.
Parameters:
  id - An ID for the source which must be unique across all clients.
Parameters:
  bounds - the region of the RenderedImage to be returned. a RasterProxy containing a copy of the desired data.



getHeight
int getHeight(Long id) throws RemoteException(Code)
Returns the height of the RMIImage.



getMinTileX
int getMinTileX(Long id) throws RemoteException(Code)
Returns the index of the minimum tile in the X direction of the image.



getMinTileY
int getMinTileY(Long id) throws RemoteException(Code)
Returns the index of the minimum tile in the Y direction of the image.



getMinX
int getMinX(Long id) throws RemoteException(Code)
Returns the minimum X coordinate of the RMIImage.



getMinY
int getMinY(Long id) throws RemoteException(Code)
Returns the minimum Y coordinate of the RMIImage.



getNumXTiles
int getNumXTiles(Long id) throws RemoteException(Code)
Returns the number of tiles across the image.



getNumYTiles
int getNumYTiles(Long id) throws RemoteException(Code)
Returns the number of tiles down the image.



getProperty
Object getProperty(Long id, String name) throws RemoteException(Code)
Gets a property from the property set of this image. If the property name is not recognized, java.awt.Image.UndefinedProperty will be returned.
Parameters:
  id - An ID for the source which must be unique across all clients.
Parameters:
  name - the name of the property to get, as a String. a reference to the property Object, or the valuejava.awt.Image.UndefinedProperty.



getPropertyNames
String[] getPropertyNames(Long id) throws RemoteException(Code)
Returns a list of names recognized by getProperty(String). an array of Strings representing proeprty names.



getRemoteID
Long getRemoteID() throws RemoteException(Code)
Returns the identifier of the remote image. This method should be called to return an identifier before any other methods are invoked. The same ID must be used in all subsequent references to the remote image.



getSampleModel
SampleModelProxy getSampleModel(Long id) throws RemoteException(Code)
Returns the SampleModel associated with this image.



getSources
Vector getSources(Long id) throws RemoteException(Code)
Returns a vector of RenderedImages that are the sources of image data for this RMIImage. Note that this method will often return an empty vector.



getTile
RasterProxy getTile(Long id, int x, int y) throws RemoteException(Code)
Returns tile (x, y). Note that x and y are indices into the tile array, not pixel locations. Unlike in the true RenderedImage interface, the Raster that is returned should be considered a copy.
Parameters:
  id - An ID for the source which must be unique across all clients.
Parameters:
  x - the x index of the requested tile in the tile array
Parameters:
  y - the y index of the requested tile in the tile array a copy of the tile as a Raster.



getTileGridXOffset
int getTileGridXOffset(Long id) throws RemoteException(Code)
Returns the X offset of the tile grid relative to the origin.



getTileGridYOffset
int getTileGridYOffset(Long id) throws RemoteException(Code)
Returns the Y offset of the tile grid relative to the origin.



getTileHeight
int getTileHeight(Long id) throws RemoteException(Code)
Returns the height of a tile in pixels.



getTileWidth
int getTileWidth(Long id) throws RemoteException(Code)
Returns the width of a tile in pixels.



getWidth
int getWidth(Long id) throws RemoteException(Code)
Returns the width of the RMIImage.



setSource
void setSource(Long id, RenderedImage source) throws RemoteException(Code)
Sets the source of the image on the server side. This source should ideally be a lightweight reference to an image available locally on the server or over a further network link (for example, an IIPOpImage that contains a URL but not actual image data).

Although it is legal to use any RenderedImage, one should be aware that a deep copy might be made and transmitted to the server.
Parameters:
  id - An ID for the source which must be unique across all clients.
Parameters:
  source - a RenderedImage source.




setSource
void setSource(Long id, RenderedOp source) throws RemoteException(Code)
Sets the source to a RenderedOp (i.e., an imaging DAG). This DAG will be copied over to the server where it will be transformed into an OpImage chain using the server's local OperationRegistry and available RenderedImageFactory objects.
Parameters:
  id - An ID for the source which must be unique across all clients.
Parameters:
  source - a RenderedOp source.



setSource
void setSource(Long id, RenderableOp source, RenderContextProxy renderContextProxy) throws RemoteException(Code)
Sets the source to a RenderableOp defined by a renderable imaging DAG and a rendering context. The entire RenderableImage DAG will be copied over to the server.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.