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:port
where 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.JAIRMIImageServer
where $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
com.sun.media.jai.remote.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 The server name or server IP address
-port The port that rmiregistry is running on
-rmiRegistryPort Same as -port option
-serverPort The port that the server should listen on,
for connections from clients
-cacheMemCapacity The memory capacity in bytes.
-cacheMemThreshold The memory threshold, which is the
fractional amount of cache memory to
retain during tile removal
-disableDefaultCache Disable use of default tile cache.
-schedulerParallelism The degree of parallelism of the
default TileScheduler
-schedulerPrefetchParallelism The degree of parallelism
of the default TileScheduler for tile prefetching
-schedulerPriority The priority of tile scheduling for
the default TileScheduler
-schedulerPrefetchPriority The priority of tile prefetch
scheduling for the default TileScheduler
-defaultTileSize x The default tile dimensions in
the form x
-defaultRenderingSize x The default size to render
a RenderableImage to, in the form x
-serializeDeepCopy Whether a deep copy of the image data
should be used when serializing images
-tileCodecFormat The default format to be used for tile
serialization via TileCodecs
-retryInterval The retry interval value to be used for
dealing with network errors during remote imaging
-numRetries The number of retries to be used for dealing
with network errors during remote imaging
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.
since: JAI 1.1 |