|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.jai.remote.RemoteDescriptorImpl | +--javax.media.jai.remote.JAIRMIDescriptor
This class describes the "jairmi" remote imaging protocol. This protocol assumes that both the client and the server are running JAI. The communication between the client and the server takes place using the Remote Method Invocation (RMI) mechanism.
In order to locate the "jairmi" server, a RMI registry must be
running on this server, and the "jairmi" server must have registered
itself with this RMI registry by binding itself under the
IMAGE_SERVER_BIND_NAME
String
. The RMI
registry is a simple remote object name service that allows remote
clients to get a reference to a remote object by name.
The "jairmi" protocol expects the String
that
represents the server to be a URL
formatted
String
of the form:
//host:portwhere
host
is the name, or IP address of the "jairmi"
remote imaging server, and port
is the port number
where a rmiregistry is running on the same host. A protocol like
"rmi:" does not need to be included in this URL formatted
String
. If the serverName
String
is null, the local host is used as a default.
If the port is not included in the serverName String
, it
defaults to the well-known port for rmiregistry, 1099.
If the serverName supplied to any "jairmi" protocol implementing class's method is null, then the local host will be used instead.
The default "jairmi" server provided with JAI is
com.sun.media.jai.rmi.JAIRMIRemoteServer
. This server
can be run in the following manner, after starting a rmiregistry on
the host where the server will be run:
java -Djava.rmi.server.codebase="file:$JAI/lib/jai_core.jar file:$JAI/lib/jai_codec.jar" -Djava.rmi.server.useCodebaseOnly=false -Djava.security.policy=file:$JAI/policy com.sun.media.jai.rmi.JAIRMIImageServerwhere $JAI refers to the directory where JAI is installed. This server binds itself with the running rmiregistry under the
IMAGE_SERVER_BIND_NAME
String
bind name, and
can be used to serve "jairmi" requests. The policy file specified
above needs to be created by the user. Information on policy
files and permissions can be found at
http://java.sun.com/j2se/1.3/docs/guide/security/PolicyFiles.html
http://java.sun.com/j2se/1.3/docs/guide/security/permissions.html
The JAI instance used by the "jairmi" remote imaging server can be
configured by providing an implementation of the
com.sun.media.jai.remote.JAIServerConfigurationSpi
interface
on the CLASSPATH
when starting the server.
For more details, please refer to
JAIServerConfigurationSpi
The "jairmi" remote imaging server supports the following
configurable parameters whose values can be specified on the command
line when starting the server :
-host
It should be noted that if a parameter was set via JAIServerConfigurationSpi, and the command line option for the same parameter specifies a different value, then the command line specified parameter value will be honored. That is to say that the JAIServerConfigurationSpi specified configuration happens first, followed by command line parameter configuration, and the last configuration to be applied overwrites all previous settings.
Field Summary | |
static String |
IMAGE_SERVER_BIND_NAME
The bind name for the remote "jairmi" server. |
Fields inherited from class javax.media.jai.remote.RemoteDescriptorImpl |
protocolName, serverNameDocURL |
Constructor Summary | |
JAIRMIDescriptor()
Creates a JAIRMIDescriptor . |
Method Summary | |
Object |
getInvalidRegion(String registryModeName,
String oldServerName,
ParameterBlock oldParamBlock,
RenderingHints oldHints,
String newServerName,
ParameterBlock newParamBlock,
RenderingHints newHints,
OperationNode node)
Calculates the region over which two distinct remote renderings of an operation may be expected to differ. |
NegotiableCapabilitySet |
getServerCapabilities(String serverName)
Returns the set of capabilites supported by the server. |
OperationDescriptor[] |
getServerSupportedOperationList(String serverName)
Returns the list of OperationDescriptor s that describe
the operations supported by the server. |
Methods inherited from class javax.media.jai.remote.RemoteDescriptorImpl |
arePropertiesSupported, getName, getParameterListDescriptor, getPropertyGenerators, getServerNameDocs, getSupportedModes, isModeSupported |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String IMAGE_SERVER_BIND_NAME
Constructor Detail |
public JAIRMIDescriptor() throws MalformedURLException
JAIRMIDescriptor
.Method Detail |
public OperationDescriptor[] getServerSupportedOperationList(String serverName) throws RemoteImagingException
OperationDescriptor
s that describe
the operations supported by the server. It is the
implementing class's responsibility to extract this information from
either the server or from its own knowledge of the remote imaging
protocol. The "jairmi" protocol gets this information from the server.
If the supplied serverName argument is null, then the local host will be used instead.
serverName
- The String
identifying the server.public NegotiableCapabilitySet getServerCapabilities(String serverName) throws RemoteImagingException
If the supplied serverName argument is null, then the local host will be used instead.
serverName
- The String
identifying the server.public Object getInvalidRegion(String registryModeName, String oldServerName, ParameterBlock oldParamBlock, RenderingHints oldHints, String newServerName, ParameterBlock newParamBlock, RenderingHints newHints, OperationNode node) throws RemoteImagingException
OperationNode
argument to this
method. The String
that identifies the operation
can be retrieved via the OperationNode
's
getOperationName()
method.
The class of the returned object will vary as a function of
the nature of the operation. For rendered and renderable two-
dimensional images this should be an instance of a class which
implements java.awt.Shape
.
getInvalidRegion
in class RemoteDescriptorImpl
registryModeName
- The name of the mode.oldServerName
- The previous server name.oldParamBlock
- The previous sources and parameters.oldHints
- The previous hints.newServerName
- The current server name.newParamBlock
- The current sources and parameters.newHints
- The current hints.node
- The affected node in the processing chain.null
if there is no common region of validity. If an empty
java.awt.Shape
is returned, this indicates
that all pixels within the bounds of the old rendering
remain valid.IllegalArgumentException
- if registryModeName
is null
or if the operation requires either
sources or parameters and either oldParamBlock
or newParamBlock
is null
.IllegalArgumentException
- if there is no OperationDescriptor
for the specified operationName on any one or both of the
servers identified by oldServerName
and
newServerName
, or if the number of sources or
the name, number and Class
of the operation's
parameters is not the same on both the servers.IllegalArgumentException
- if oldParamBlock
or
newParamBlock
do not contain sufficient sources
or parameters for the operation in question.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |