| java.lang.Object javax.media.jai.RenderableOp javax.media.jai.remote.RemoteRenderableOp
RemoteRenderableOp | public class RemoteRenderableOp extends RenderableOp (Code) | | A subclass of RenderableOp for remote operations. This
class represents a node in a remote renderable imaging
chain. A RemoteRenderableOp stores a protocol name (as a
String ), a server name (as a String ), an
operation name (as a String ), and a
ParameterBlock containing sources and miscellaneous
parameters.
By virtue of being a subclass of RemoteRenderableOp ,
this class participates in Java Bean-style events as specified by
RenderableOp . RemoteRenderableOp s add the
server name and the protocol name to the critical attributes, the
editing (chaging) of which may cause a PropertyChangeEventJAI
to be emitted.
See Also: javax.media.jai.RenderableOp since: JAI 1.1 |
Constructor Summary | |
public | RemoteRenderableOp(String protocolName, String serverName, String opName, ParameterBlock pb) Constructs a RemoteRenderableOp using the default
operation registry, given the name of the remote imaging protocol,
the name of the server to perform the operation on, the name of the
operation to be performed remotely and a ParameterBlock
containing RenderableImage sources and other parameters.
Any RenderedImage sources referenced by the
ParameterBlock will be ignored.
An IllegalArgumentException may
be thrown by the protocol specific classes at a later point, if
null is provided as the serverName argument and null is not
considered a valid server name by the specified protocol.
Parameters: protocolName - The protocol name as a String . Parameters: serverName - The server name as a String . Parameters: opName - The operation name. Parameters: pb - The sources and other parameters. | public | RemoteRenderableOp(OperationRegistry registry, String protocolName, String serverName, String opName, ParameterBlock pb) Constructs a RemoteRenderableOp using the specified
operation registry, given the name of the remote imaging protocol,
the name of the server to perform the operation on, the name of the
operation to be performed remotely and a ParameterBlock
containing RenderableImage sources and other parameters.
Any RenderedImage sources referenced by the
ParameterBlock will be ignored.
An IllegalArgumentException may
be thrown by the protocol specific classes at a later point, if
null is provided as the serverName argument and null is not
considered a valid server name by the specified protocol.
Parameters: registry - The OperationRegistry to be used forinstantiation. |
Method Summary | |
public RenderedImage | createRendering(RenderContext renderContext) Overrides the RenderableOp method to return a
RemoteRenderedImage that represents the remote rendering
of this image using a given RenderContext . | public float | getHeight() Overrides the method in RenderableOp to return the
rendering-independent height of the image, as queried from the remote
server. | public float | getMinX() Overrides the method in RenderableOp to return the
minimum X coordinate of the rendering-independent image data, as
queried from the remote server. | public float | getMinY() Overrides the method in RenderableOp to return the
maximum X coordinate of the rendering-independent image data, as
queried from the remote server. | public NegotiableCapabilitySet | getNegotiatedValues() Returns the results of the negotiation between the client and server
capabilities according to the preferences set via the
setNegotiationPreferences() method. | public NegotiableCapability | getNegotiatedValues(String category) Returns the results of the negotiation between the client and server
capabilities for the given catgory according to the preferences set
via the setNegotiationPreferences() method. | public NegotiableCapabilitySet | getNegotiationPreferences() Returns the current negotiation preferences or null, if none were
set previously. | public int | getNumRetries() Returns the number of retries. | public String | getProtocolName() Returns the String that identifies the remote imaging
protocol. | public String | getRegistryModeName() Returns the name of the RegistryMode corresponding to
this RenderableOp . | public int | getRetryInterval() Returns the amount of time between retries in milliseconds. | public String | getServerName() Returns the String that identifies the server. | public float | getWidth() Overrides the method in RenderableOp to return the
rendering-independent width of the image, as queried from the remote
server. | void | sendExceptionToListener(String message, Exception e) | public void | setNegotiationPreferences(NegotiableCapabilitySet preferences) Sets the preferences to be used in the client-server
communication. | public void | setNumRetries(int numRetries) Sets the number of retries.
This new value for number of retries will be stored and will
be passed as RenderingHints as part
of the RenderContext used to create the rendering. | public void | setProtocolAndServerNames(String protocolName, String serverName) Sets the protocol name and the server name of this
RemoteRenderableOp to the specified arguments..
If both the supplied protocol name and the supplied server
name values do not equal the current values, a
PropertyChangeEventJAI named "ProtocolAndServerName"
will be fired. | public void | setProtocolName(String protocolName) Sets a String identifying the remote imaging protocol.
If the supplied name does not equal the current protocol name, a
PropertyChangeEventJAI named "ProtocolName"
will be fired. | public void | setRetryInterval(int retryInterval) Sets the amount of time between retries in milliseconds.
This new value for retry interval will be stored and will
be passed as RenderingHints as part
of the RenderContext used to create the rendering. | public void | setServerName(String serverName) Sets a String identifying the server.
If the supplied name does not equal the current server name, a
PropertyChangeEventJAI named "ServerName"
will be fired. |
protocolName | protected String protocolName(Code) | | The name of the protocol this class provides an implementation for.
|
serverName | protected String serverName(Code) | | The name of the server.
|
RemoteRenderableOp | public RemoteRenderableOp(String protocolName, String serverName, String opName, ParameterBlock pb)(Code) | | Constructs a RemoteRenderableOp using the default
operation registry, given the name of the remote imaging protocol,
the name of the server to perform the operation on, the name of the
operation to be performed remotely and a ParameterBlock
containing RenderableImage sources and other parameters.
Any RenderedImage sources referenced by the
ParameterBlock will be ignored.
An IllegalArgumentException may
be thrown by the protocol specific classes at a later point, if
null is provided as the serverName argument and null is not
considered a valid server name by the specified protocol.
Parameters: protocolName - The protocol name as a String . Parameters: serverName - The server name as a String . Parameters: opName - The operation name. Parameters: pb - The sources and other parameters. Ifnull , it is assumed that this node hasno sources and parameters. throws: IllegalArgumentException - if protocolName isnull . throws: IllegalArgumentException - if opName isnull . |
RemoteRenderableOp | public RemoteRenderableOp(OperationRegistry registry, String protocolName, String serverName, String opName, ParameterBlock pb)(Code) | | Constructs a RemoteRenderableOp using the specified
operation registry, given the name of the remote imaging protocol,
the name of the server to perform the operation on, the name of the
operation to be performed remotely and a ParameterBlock
containing RenderableImage sources and other parameters.
Any RenderedImage sources referenced by the
ParameterBlock will be ignored.
An IllegalArgumentException may
be thrown by the protocol specific classes at a later point, if
null is provided as the serverName argument and null is not
considered a valid server name by the specified protocol.
Parameters: registry - The OperationRegistry to be used forinstantiation. if null , the defaultregistry is used. Parameters: protocolName - The protocol name as a String . Parameters: serverName - The server name as a String . Parameters: opName - The operation name. Parameters: pb - The sources and other parameters. Ifnull , it is assumed that this node hasno sources and parameters. throws: IllegalArgumentException - if protocolName isnull . throws: IllegalArgumentException - if opName isnull . |
createRendering | public RenderedImage createRendering(RenderContext renderContext)(Code) | | Overrides the RenderableOp method to return a
RemoteRenderedImage that represents the remote rendering
of this image using a given RenderContext . This is the
most general way to obtain a rendering of a
RemoteRenderableOp .
This method does not validate sources and parameters supplied
in the ParameterBlock against the specification
of the operation this node represents. It is the caller's
responsibility to ensure that the data in the
ParameterBlock are suitable for this operation.
Otherwise, some kind of exception or error will occur.
RemoteJAI.createRenderable() is the method that does
the validation. Therefore, it is strongly recommended that all
RemoteRenderableOp s are created using
RemoteJAI.createRenderable() .
The RenderContext may contain a Shape
that represents the area-of-interest (aoi). If the aoi is specifed,
it is still legal to return an image that's larger than this aoi.
Therefore, by default, the aoi, if specified, is ignored at the
rendering.
The RenderingHints in the RenderContext
may contain negotiation preferences specified under the
KEY_NEGOTIATION_PREFERENCES key. These preferences
can be ignored by the rendering if it so chooses.
Parameters: renderContext - the RenderContext to use to produce the rendering. a RemoteRenderedImage containing the rendered data. |
getHeight | public float getHeight()(Code) | | Overrides the method in RenderableOp to return the
rendering-independent height of the image, as queried from the remote
server.
the image height as a float. |
getMinX | public float getMinX()(Code) | | Overrides the method in RenderableOp to return the
minimum X coordinate of the rendering-independent image data, as
queried from the remote server.
|
getMinY | public float getMinY()(Code) | | Overrides the method in RenderableOp to return the
maximum X coordinate of the rendering-independent image data, as
queried from the remote server.
|
getNegotiatedValues | public NegotiableCapabilitySet getNegotiatedValues() throws RemoteImagingException(Code) | | Returns the results of the negotiation between the client and server
capabilities according to the preferences set via the
setNegotiationPreferences() method. This will return null
if no negotiation preferences were set, and no negotiation was
performed, or if the negotiation failed.
|
getNegotiatedValues | public NegotiableCapability getNegotiatedValues(String category) throws RemoteImagingException(Code) | | Returns the results of the negotiation between the client and server
capabilities for the given catgory according to the preferences set
via the setNegotiationPreferences() method. This will
return null if no negotiation preferences were set, and no
negotiation was performed, or if the negotiation failed.
Parameters: category - The category to return negotiated results for. |
getNegotiationPreferences | public NegotiableCapabilitySet getNegotiationPreferences()(Code) | | Returns the current negotiation preferences or null, if none were
set previously.
|
getNumRetries | public int getNumRetries()(Code) | | Returns the number of retries. If a value for the number of retries
has been set previously by setNumRetries() , the same
value is returned, else the default number of retries as defined by
RemoteJAI.DEFAULT_NUM_RETRIES is returned.
|
getProtocolName | public String getProtocolName()(Code) | | Returns the String that identifies the remote imaging
protocol.
|
getRegistryModeName | public String getRegistryModeName()(Code) | | Returns the name of the RegistryMode corresponding to
this RenderableOp . This method overrides the
implementation in RenderableOp to always returns the
String "remoteRenderable".
|
getRetryInterval | public int getRetryInterval()(Code) | | Returns the amount of time between retries in milliseconds. If
a value for the retry interval has been set previously by
setRetryInterval() , the same value is returned, else
the default retry interval as defined by
RemoteJAI.DEFAULT_RETRY_INTERVAL is returned.
|
getServerName | public String getServerName()(Code) | | Returns the String that identifies the server.
|
getWidth | public float getWidth()(Code) | | Overrides the method in RenderableOp to return the
rendering-independent width of the image, as queried from the remote
server.
the image width as a float. |
setNegotiationPreferences | public void setNegotiationPreferences(NegotiableCapabilitySet preferences)(Code) | | Sets the preferences to be used in the client-server
communication. These preferences are utilized in the negotiation
process. Note that preferences for more than one category can be
specified using this method. Also each preference can be a list
of values in decreasing order of preference, each value specified
as a NegotiableCapability . The
NegotiableCapability first (for a particular category)
in this list is given highest priority in the negotiation process
(for that category).
It may be noted that this method allows for multiple negotiation
cycles by allowing negotiation preferences to be set
multiple times. Every time this method is called, the new preferences
specified will be stored, a negotiation with these new preferences
will be initiated and the results stored. These new preferences which
have been stored will be passed as RenderingHints as part
of the RenderContext used to create the rendering. The
RenderingHints in the RenderContext will
contain this information under the
KEY_NEGOTIATION_PREFERENCES key. If the
RenderingHints in the RenderContext already
contains negotiation preferences specified by the user, the user
specified negotiation preferences will take preference over the ones
stored in this class.
If preferences to be set are null, the negotiation will become
a two-way negotiation between the client and server capabilities.
Parameters: preferences - The preferences to be used in the negotiationprocess. |
setNumRetries | public void setNumRetries(int numRetries)(Code) | | Sets the number of retries.
This new value for number of retries will be stored and will
be passed as RenderingHints as part
of the RenderContext used to create the rendering. The
RenderingHints in the RenderContext will
contain this information under the
KEY_NUM_RETRIES key. If the
RenderingHints in the RenderContext already
contains a number of retries value specified by the user, that will
take preference over the one stored in this class.
Parameters: numRetries - The number of times an operation should be retriedin case of a network error. throws: IllegalArgumentException - if numRetries is negative. |
setProtocolAndServerNames | public void setProtocolAndServerNames(String protocolName, String serverName)(Code) | | Sets the protocol name and the server name of this
RemoteRenderableOp to the specified arguments..
If both the supplied protocol name and the supplied server
name values do not equal the current values, a
PropertyChangeEventJAI named "ProtocolAndServerName"
will be fired. The oldValue field in the
PropertyChangeEventJAI will contain a two element
array of String s, the old protocol name being the
first element and the old server name being the second. Similarly
the newValue field of the PropertyChangeEventJAI will
contain a two element array of String s, the new protocol
name being the first element and the new server name being the
second. If only the supplied protocol name does not equal
the current protocol name, a PropertyChangeEventJAI
named "ProtocolName" will be fired. If only the supplied server
name does not equal the current server name, a
PropertyChangeEventJAI named "ServerName"
will be fired.
Parameters: protocolName - A String identifying the protocol. Parameters: serverName - A String identifying the server. throws: IllegalArgumentException - if protocolName is null. throws: IllegalArgumentException - if serverName is null. |
setProtocolName | public void setProtocolName(String protocolName)(Code) | | Sets a String identifying the remote imaging protocol.
If the supplied name does not equal the current protocol name, a
PropertyChangeEventJAI named "ProtocolName"
will be fired. The oldValue field in the
PropertyChangeEventJAI will contain the old protocol
name String and the newValue field will contain the
new protocol name String .
Parameters: protocolName - A String identifying the protocol. throws: IllegalArgumentException - if protocolName is null. |
setRetryInterval | public void setRetryInterval(int retryInterval)(Code) | | Sets the amount of time between retries in milliseconds.
This new value for retry interval will be stored and will
be passed as RenderingHints as part
of the RenderContext used to create the rendering. The
RenderingHints in the RenderContext will
contain this information under the
KEY_RETRY_INTERVAL key. If the
RenderingHints in the RenderContext already
contains a retry interval value specified by the user, that will
take preference over the one stored in this class.
Parameters: retryInterval - The amount of time (in milliseconds) to waitbetween retries. throws: IllegalArgumentException - if retryInterval is negative. |
setServerName | public void setServerName(String serverName)(Code) | | Sets a String identifying the server.
If the supplied name does not equal the current server name, a
PropertyChangeEventJAI named "ServerName"
will be fired. The oldValue field in the
PropertyChangeEventJAI will contain the old server
name String and the newValue field will contain the
new server name String .
Parameters: serverName - A String identifying the server. throws: IllegalArgumentException - if serverName is null. |
Methods inherited from javax.media.jai.RenderableOp | public void addPropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public void addPropertyGenerator(PropertyGenerator pg)(Code)(Java Doc) public synchronized void copyPropertyFromSource(String propertyName, int sourceIndex)(Code)(Java Doc) public RenderedImage createDefaultRendering()(Code)(Java Doc) public RenderedImage createRendering(RenderContext renderContext)(Code)(Java Doc) public RenderedImage createScaledRendering(int w, int h, RenderingHints hints)(Code)(Java Doc) public byte getByteParameter(int index)(Code)(Java Doc) public char getCharParameter(int index)(Code)(Java Doc) public double getDoubleParameter(int index)(Code)(Java Doc) public synchronized Object getDynamicProperty(String name)(Code)(Java Doc) public float getFloatParameter(int index)(Code)(Java Doc) public float getHeight()(Code)(Java Doc) public int getIntParameter(int index)(Code)(Java Doc) public long getLongParameter(int index)(Code)(Java Doc) public float getMinX()(Code)(Java Doc) public float getMinY()(Code)(Java Doc) public Object getObjectParameter(int index)(Code)(Java Doc) public String getOperationName()(Code)(Java Doc) public ParameterBlock getParameterBlock()(Code)(Java Doc) public Object getProperty(String name)(Code)(Java Doc) public Class getPropertyClass(String name)(Code)(Java Doc) public String[] getPropertyNames()(Code)(Java Doc) public String[] getPropertyNames(String prefix)(Code)(Java Doc) public synchronized OperationRegistry getRegistry()(Code)(Java Doc) public String getRegistryModeName()(Code)(Java Doc) public RenderingHints getRenderingHints()(Code)(Java Doc) public short getShortParameter(int index)(Code)(Java Doc) public Object getSource(int index)(Code)(Java Doc) public Vector getSources()(Code)(Java Doc) public float getWidth()(Code)(Java Doc) public boolean isDynamic()(Code)(Java Doc) public void removeProperty(String name)(Code)(Java Doc) public void removePropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public void removeSources()(Code)(Java Doc) public synchronized void setOperationName(String opName)(Code)(Java Doc) public void setParameter(byte param, int index)(Code)(Java Doc) public void setParameter(char param, int index)(Code)(Java Doc) public void setParameter(short param, int index)(Code)(Java Doc) public void setParameter(int param, int index)(Code)(Java Doc) public void setParameter(long param, int index)(Code)(Java Doc) public void setParameter(float param, int index)(Code)(Java Doc) public void setParameter(double param, int index)(Code)(Java Doc) public void setParameter(Object param, int index)(Code)(Java Doc) public synchronized void setParameterBlock(ParameterBlock pb)(Code)(Java Doc) public void setProperty(String name, Object value)(Code)(Java Doc) public synchronized void setRegistry(OperationRegistry registry)(Code)(Java Doc) public synchronized void setRenderingHints(RenderingHints hints)(Code)(Java Doc) public void setSource(Object source, int index)(Code)(Java Doc) public void suppressProperty(String name)(Code)(Java Doc)
|
|
|