public class Client
extends java.lang.Object
The API defined in this class abstracts the user from the underlying JPIP protocol. After construct an object of this class, it is mandatory to requests for a new session specifying a shared memory, server, port, and the requested target. Once the session has been created, several properties can be set by means of the setMethods, and requests to the server can be performed through the getTarget methods.
The requested image is stored in a shared object of type
ImageData
.
Usage example:
constructor
newSession
set methods
getTarget
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
clientHostName
Contains the local host name.
|
private java.util.HashMap<java.lang.String,ClientSessionTarget> |
clientSessionTargets
Defines a table where the client sessions managed by this object are saved.
|
private java.lang.String |
debug |
private java.lang.String |
defaultSession
This string keeps the identifier of the default session.
|
private long |
initStageTime
Used for verbose information (time for stage).
|
private long |
initTime
Used for verbose information (total time).
|
private boolean |
keepAlive
Indicates whether the HTTP connection to remote server are persistents.
|
private CADILog |
log
Is used to log the client messages.
|
private ClientPrefetching |
prefetching |
private PrefSemaphore |
proxyMutex |
private ViewWindowField |
requestViewWindow
Contains the view window requested by the client application.
|
private StopWatch |
stopWatch |
boolean |
useHTTPSession
Indicates if HTTP session is allowed.
|
boolean |
useHTTPTCPSession
Indicates if HTTP TCP session is allowed.
|
private java.lang.String |
userAgent
Contains the value of the HTTP user-agent feature.
|
private boolean |
useSession
Indicates whether stateless request or session request will be used.
|
Constructor and Description |
---|
Client()
Constructor.
|
Client(CADILog log)
Constructor.
|
Client(java.lang.String logFile,
int logLevel)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
closeSession(java.lang.String sessionID)
Closes the session with the server.
|
long |
getBytesJPIPMessageBody()
Returns the
#bytesJPIPMessageBody attribute. |
long |
getBytesJPIPMessageBody(java.lang.String sessionID)
Returns the
#bytesJPIPMessageBody attribute. |
long |
getBytesJPIPMessageHeader()
Returns the
#bytesJPIPMessageHeader attribute. |
long |
getBytesJPIPMessageHeader(java.lang.String sessionID)
Returns the
#bytesJPIPMessageHeader attribute. |
java.lang.String |
getDefaultSession()
Returns the identifier of which is considered the default session.
|
long |
getDownloadedBytes()
Returns the total bytes downloadeded bytes for the actual logical target.
|
long |
getDownloadedBytes(java.lang.String sessionID)
Returns the total bytes downloaded bytes for the actual logical target.
|
int |
getJPIPStreamType()
Deprecated.
|
java.lang.String |
getLogFileName()
Definition in
CADILog.getFileName() . |
int |
getLogLevel()
Definition in
CADILog.getLogLevel() . |
int |
getManagementPolicy()
Definition in
CADI.Client.Cache.ClientCache#getManagementPolicy() |
int |
getManagementPolicy(java.lang.String sessionID)
Definition in
CADI.Client.Cache.ClientCache#getManagementPolicy() |
long |
getMaxCacheSize()
Definition in
CADI.Client.Cache.ClientCache#getMaxCacheSize() |
long |
getMaxCacheSize(java.lang.String sessionID)
Definition in
CADI.Client.Cache.ClientCache#getMaxCacheSize() |
int |
getPort()
Return the port number of the server.
|
int |
getPort(java.lang.String sessionID)
Return the port number of the server.
|
java.lang.String |
getServer()
Return the sever name of the latest connection.
|
java.lang.String |
getServer(java.lang.String sessionID)
Return the sever name of the latest connection.
|
java.util.Set<java.lang.String> |
getSessionIdentifiers()
Returns a set with the active session identifiers.
|
float |
getSpeed()
Returns the download's speed average.
|
float |
getSpeed(java.lang.String sessionID)
Returns the download's speed average.
|
void |
getTarget()
This method fetches a logical target.
|
void |
getTarget(int[][] comps,
int[] fsiz,
int[] roff,
int[] rsiz,
int layers,
int quality,
int round)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(int[][] comps,
int[] fsiz,
int[] roff,
int[] rsiz,
int layers,
int quality,
int round,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(int[][] comps,
int discardLevels,
int[] roff,
int[] rsiz,
int layers,
int quality)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(int[][] comps,
int discardLevels,
int[] roff,
int[] rsiz,
int layers,
int quality,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(int[] components,
int[] fsiz,
int[] roff,
int[] rsiz,
int layers,
int quality,
int round)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(int[] components,
int[] fsiz,
int[] roff,
int[] rsiz,
int layers,
int quality,
int round,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(int[] components,
int[] fsiz,
int[] roff,
int[] rsiz,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(int[] components,
int discardLevels,
int[] roff,
int[] rsiz,
int layers,
int quality)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(int[] components,
int discardLevels,
int[] roff,
int[] rsiz,
int layers,
int quality,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(int[] components,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(long maxTargetLength)
This method fetches a logical target at a fixed length.
|
void |
getTarget(long maxTargetLength,
int layers,
int quality)
This method fetches a logical target at a fixed length.
|
void |
getTarget(java.lang.String requestURI)
Get the target which is identified by the URI
requestURI |
void |
getTarget(java.lang.String sessionID,
int[][] comps,
int[] fsiz,
int[] roff,
int[] rsiz,
int layers,
int quality,
int round)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(java.lang.String sessionID,
int[][] comps,
int[] fsiz,
int[] roff,
int[] rsiz,
int layers,
int quality,
int round,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(java.lang.String sessionID,
int[][] comps,
int discardLevels,
int[] roff,
int[] rsiz,
int layers,
int quality)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(java.lang.String sessionID,
int[][] comps,
int discardLevels,
int[] roff,
int[] rsiz,
int layers,
int quality,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(java.lang.String sessionID,
int[] components,
int[] fsiz,
int[] roff,
int[] rsiz,
int layers,
int quality,
int round)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(java.lang.String sessionID,
int[] components,
int[] fsiz,
int[] roff,
int[] rsiz,
int layers,
int quality,
int round,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(java.lang.String sessionID,
int[] components,
int[] fsiz,
int[] roff,
int[] rsiz,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(java.lang.String sessionID,
int[] components,
int discardLevels,
int[] roff,
int[] rsiz,
int layers,
int quality)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(java.lang.String sessionID,
int[] components,
int discardLevels,
int[] roff,
int[] rsiz,
int layers,
int quality,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(java.lang.String sessionID,
int[] components,
long maxTargetLength)
This method fetches a logical target defined by the method input
parameters.
|
void |
getTarget(java.lang.String sessionID,
java.lang.String requestURI)
Get the target which is identified by the URI
requestURI |
java.lang.String |
getTargetDescription()
This method returns a detailed description of the last decoded logical
target.
|
java.lang.String |
getTargetDescription(java.lang.String sessionID)
This method returns a detailed description of the last decoded logical
target.
|
java.lang.String |
getTargetName()
Return the latest requested target name.
|
java.lang.String |
getTargetName(java.lang.String sessionID)
Return the latest requested target name.
|
java.lang.String |
getURI()
Returns the last requested URI.
|
java.lang.String |
getURI(java.lang.String sessionID)
Returns the last requested URI.
|
boolean |
isKeepAlive()
Returns the
keepAlive attribute. |
boolean |
isLogEnabled()
Definition in
CADILog.isEnabled() . |
boolean |
isUseHTTPSession()
Returns the
useHTTPSession attribute. |
boolean |
isUseHTTPTCPSession()
Returns the
useHTTPTCPSession attribute |
boolean |
isUseSession()
Returns the
useSession attribute. |
void |
list(java.io.PrintStream out)
Prints this Client fields out to the specified output stream.
|
void |
loadCache(java.lang.String fileName) |
void |
loadCache(java.lang.String sessionID,
java.lang.String fileName) |
java.lang.String |
newSession(ImageData imageData,
java.lang.String url)
Creates a new session.
|
java.lang.String |
newSession(ImageData imageData,
java.lang.String server,
int port,
java.lang.String target)
Creates a new session.
|
java.lang.String |
newSession(ImageData imageData,
java.lang.String server,
int port,
java.lang.String proxyServer,
int proxyPort,
java.lang.String target)
Creates a new session.
|
java.lang.String |
newSession(ImageData imageData,
java.lang.String server,
int port,
java.lang.String proxyServer,
int proxyPort,
java.lang.String target,
int numThreads)
Creates a new session.
|
java.lang.String |
newSession(ImageData imageData,
java.lang.String server,
int port,
java.lang.String proxyServer,
int proxyPort,
java.lang.String target,
int prefetchingWOIType,
float[] movementProbabilities)
Creates a new session.
|
java.lang.String |
newSession(ImageData imageData,
java.lang.String server,
int port,
java.lang.String proxyServer,
int proxyPort,
java.lang.String target,
int numThreads,
int prefetchingWOIType,
float[] movementProbabilities)
Creates a new session.
|
void |
removeSession(java.lang.String sessionID)
Removes a session identified by
sessionID identifier. |
void |
resetJPIPMessagesCounters()
Sets the JPIP message counter to 0.
|
void |
resetJPIPMessagesCounters(java.lang.String sessionID)
Sets the JPIP message counter to 0.
|
void |
reuseCache(boolean reuseCache)
Sets if the client cache must be used.
|
void |
reuseCache(java.lang.String sessionID,
boolean reuseCache)
Sets if the client cache must be used.
|
void |
saveCache(java.lang.String fileName) |
void |
saveCache(java.lang.String sessionID,
java.lang.String fileName) |
void |
setAllowedReturnTypes(java.lang.String sessionID,
java.util.ArrayList<java.lang.String> returnTypes)
Sets the return types allowed by the JPIP client to receive data from the
JPIP server.
|
void |
setAllowedReturnTypes(java.lang.String sessionID,
java.util.ArrayList<java.lang.String> returnTypes,
boolean extendedHeaders)
Sets the return types allowed by the JPIP client to receive data from the
JPIP server.
|
void |
setCacheDescriptor(java.lang.String sessionID,
int type,
int qualifier)
Sets the cache descriptor form type and qualifier for the session
sessionID . |
void |
setCacheType(java.lang.String sessionID,
int cacheType)
OBS: This method must be replaced by the
setCacheDescriptor(java.lang.String, int, int) . |
void |
setDebug(java.lang.String debug)
This method sets the HTTP's user agent header.
|
void |
setDefaultSession(java.lang.String sessionID)
Sets as default session the session identified by the parameter
sessionID . |
void |
setKeepAlive(boolean keepAlive)
Sets the
keepAlive attribute. |
void |
setLogEnabled(boolean enabled)
Sets the log enabled or disabled.
|
void |
setLogFile(java.lang.String logFileName)
Sets the file name where the log will be done.
|
void |
setLogFile(java.lang.String logFileName,
boolean useXMLFormat)
Sets the file name where the log will be done.
|
void |
setLogLevel(int logLevel)
Sets the log level.
|
void |
setManagementPolicy(int managementPolicy)
Definition in
CADI.Client.Cache.ClientCache#setManagementPolicy(int) . |
void |
setManagementPolicy(java.lang.String sessionID,
int managementPolicy)
Definition in
CADI.Client.Cache.ClientCache#setManagementPolicy(int) . |
void |
setMaxCacheSize(long maxCacheSize)
Definition in
CADI.Client.Cache.ClientCache#setMaxCacheSize(long) . |
void |
setMaxCacheSize(java.lang.String sessionID,
long maxCacheSize)
Definition in
CADI.Client.Cache.ClientCache#setMaxCacheSize(long) . |
void |
setUseHTTPSession(boolean useHTTPSession)
Sets the
useHTTPSession attribute. |
void |
setUseHTTPSession(java.lang.String sessionID,
boolean useHTTPSession) |
void |
setUseHTTPTCPSession(boolean useHTTPTCPSession)
Sets the
useHTTPTCPSession attribute |
void |
setUseHTTPTCPSession(java.lang.String sessionID,
boolean useHTTPTCPSession) |
void |
setUseIndexRange(java.lang.String sessionID,
boolean useIndexRange)
OBS: This method must be replaced by the
setCacheDescriptor(java.lang.String, int, int) . |
void |
setUseKeepAlive(java.lang.String sessionID,
boolean useKeepAlive) |
void |
setUseNumberOfBytes(java.lang.String sessionID,
boolean useNumberOfBytes)
OBS: This method must be replaced by the
setCacheDescriptor(java.lang.String, int, int) . |
void |
setUseNumberOfLayers(java.lang.String sessionID,
boolean useNumberOfLayers)
OBS: This method must be replaced by the
setCacheDescriptor(java.lang.String, int, int) . |
void |
setUserAgent(java.lang.String userAgent)
This method sets the HTTP's user agent header.
|
void |
setUseSession(boolean useSession)
Indicates whether sessions will be used in the JPIP connections.
|
void |
setUseWildcard(java.lang.String sessionID,
boolean useWildcard)
OBS: This method must be replaced by the
setCacheDescriptor(java.lang.String, int, int) . |
private void |
showTimeMemory(java.lang.String stage)
Show some time and memory usage statisticals.
|
void |
startPrefetching()
Starts the prefetching strategy, if it had been stopped.
|
void |
stopPrefetching()
Stops the prefetching module.
|
java.lang.String |
toString() |
boolean |
useLogXMLFormat()
Definition in
CADILog.useXMLFormat() . |
private java.util.HashMap<java.lang.String,ClientSessionTarget> clientSessionTargets
The table is defined as a hash to perform a quick access. The
key
used to identify the value of the map is a String
private boolean useSession
public boolean useHTTPSession
This attribute is only allowed when useSession attribute is true.
public boolean useHTTPTCPSession
This attribute is only allowed when useSession attribute is true.
private java.lang.String userAgent
private java.lang.String debug
private ViewWindowField requestViewWindow
private CADILog log
private boolean keepAlive
private java.lang.String clientHostName
private java.lang.String defaultSession
private ClientPrefetching prefetching
private PrefSemaphore proxyMutex
private long initStageTime
0 is initial time.
private long initTime
0 is initial time.
private StopWatch stopWatch
public Client()
public Client(java.lang.String logFile, int logLevel)
logFile
- definition in CADILog.fileName
.logLevel
- definition in CADILog.logLevel
.public java.lang.String newSession(ImageData imageData, java.lang.String url)
imageData
- url
- ClientSideSessionTarget.sid
.public java.lang.String newSession(ImageData imageData, java.lang.String server, int port, java.lang.String target)
imageData
- server
- definition in ClientSideSessionTarget.server
.port
- definition in ClientSideSessionTarget.port
.target
- definition in TargetField.target
ClientSideSessionTarget.sid
.public java.lang.String newSession(ImageData imageData, java.lang.String server, int port, java.lang.String proxyServer, int proxyPort, java.lang.String target)
imageData
- server
- definition in ClientSideSessionTarget.server
.port
- definition in ClientSideSessionTarget.port
.proxyServer
- definition in ClientSessionTarget.proxyServer
.proxyPort
- definition in ClientSessionTarget.proxyPort
.target
- definition in TargetField.target
ClientSideSessionTarget.sid
.public java.lang.String newSession(ImageData imageData, java.lang.String server, int port, java.lang.String proxyServer, int proxyPort, java.lang.String target, int numThreads)
imageData
- server
- definition in ClientSideSessionTarget.server
.port
- definition in ClientSideSessionTarget.port
.proxyServer
- definition in ClientSessionTarget.proxyServer
.proxyPort
- definition in ClientSessionTarget.proxyPort
.target
- definition in TargetField.target
numThreads
- definition in JPEG2KDecoder.numThreads
.ClientSideSessionTarget.sid
.public java.lang.String newSession(ImageData imageData, java.lang.String server, int port, java.lang.String proxyServer, int proxyPort, java.lang.String target, int prefetchingWOIType, float[] movementProbabilities)
If the movementProbabilities
parameter is null
,
all movements are considered equally probable
.
imageData
- server
- definition in ClientSideSessionTarget.server
.port
- definition in ClientSideSessionTarget.port
.proxyServer
- definition in ClientSessionTarget.proxyServer
.proxyPort
- definition in ClientSessionTarget.proxyPort
.target
- definition in TargetField.target
prefetchingWOIType
- definition in Prefetching.prefetchingWOIType
.movementProbabilities
- definition in Prefetching.movements
.ClientSideSessionTarget.sid
.public java.lang.String newSession(ImageData imageData, java.lang.String server, int port, java.lang.String proxyServer, int proxyPort, java.lang.String target, int numThreads, int prefetchingWOIType, float[] movementProbabilities)
imageData
- server
- definition in ClientSideSessionTarget.server
.port
- definition in ClientSideSessionTarget.port
.proxyServer
- definition in ClientSessionTarget.proxyServer
.proxyPort
- definition in ClientSessionTarget.proxyPort
.target
- definition in TargetField.target
numThreads
- definition in JPEG2KDecoder.numThreads
.prefetchingWOIType
- definition in Prefetching.prefetchingWOIType
.movementProbabilities
- definition in Prefetching.movements
.ClientSideSessionTarget.sid
.public java.lang.String getDefaultSession()
defaultSession
.public java.util.Set<java.lang.String> getSessionIdentifiers()
public void setDefaultSession(java.lang.String sessionID)
sessionID
.public void removeSession(java.lang.String sessionID)
sessionID
identifier.sessionID
- public void closeSession(java.lang.String sessionID)
ErrorException
- it an error occurs while the session is being
closed.public void setUseHTTPSession(boolean useHTTPSession)
useHTTPSession
attribute.useHTTPSession
- useHTTPSession
.public void setUseHTTPSession(java.lang.String sessionID, boolean useHTTPSession)
sessionID
- useHTTPSession
- public void setUseHTTPTCPSession(java.lang.String sessionID, boolean useHTTPTCPSession)
sessionID
- useHTTPTCPSession
- public void setUseHTTPTCPSession(boolean useHTTPTCPSession)
useHTTPTCPSession
attributeuseHTTPTCPSession
- useHTTPTCPSession
.public void reuseCache(boolean reuseCache)
reuseCache
- true
if the cache is reseted every time a
new target is requested.public void reuseCache(java.lang.String sessionID, boolean reuseCache)
sessionID
- reuseCache
- true
if the cache is reseted every time a
new target is requestedpublic void setCacheDescriptor(java.lang.String sessionID, int type, int qualifier)
sessionID
.sessionID
- unique session identifier.type
- definition in #descriptorType
.qualifier
- definition in #descritorQualifier
.public void setCacheType(java.lang.String sessionID, int cacheType)
setCacheDescriptor(java.lang.String, int, int)
.sessionID
- cacheType
- public void setUseWildcard(java.lang.String sessionID, boolean useWildcard)
setCacheDescriptor(java.lang.String, int, int)
.sessionID
- useWildcard
- public void setUseIndexRange(java.lang.String sessionID, boolean useIndexRange)
setCacheDescriptor(java.lang.String, int, int)
.sessionID
- useIndexRange
- public void setUseNumberOfLayers(java.lang.String sessionID, boolean useNumberOfLayers)
setCacheDescriptor(java.lang.String, int, int)
.sessionID
- useNumberOfLayers
- public void setUseNumberOfBytes(java.lang.String sessionID, boolean useNumberOfBytes)
setCacheDescriptor(java.lang.String, int, int)
.sessionID
- useNumberOfBytes
- public final void setMaxCacheSize(long maxCacheSize)
CADI.Client.Cache.ClientCache#setMaxCacheSize(long)
.maxCacheSize
- is the maximum size (in bytes) allowed for the
cached data. Only positive values are allowed, a value of 0
means unlimited.public void setMaxCacheSize(java.lang.String sessionID, long maxCacheSize)
CADI.Client.Cache.ClientCache#setMaxCacheSize(long)
.sessionID
- maxCacheSize
- is the maximum size (in bytes) allowed for the
cached data. Only positive values are allowed, a value of 0
means unlimited.public final void setManagementPolicy(int managementPolicy)
CADI.Client.Cache.ClientCache#setManagementPolicy(int)
.managementPolicy
- definition in #managementPolicy
.public void setManagementPolicy(java.lang.String sessionID, int managementPolicy)
CADI.Client.Cache.ClientCache#setManagementPolicy(int)
.sessionID
- managementPolicy
- definition in #managementPolicy
.public void setUseKeepAlive(java.lang.String sessionID, boolean useKeepAlive)
public void setAllowedReturnTypes(java.lang.String sessionID, java.util.ArrayList<java.lang.String> returnTypes)
sessionID
- returnTypes
- public void setAllowedReturnTypes(java.lang.String sessionID, java.util.ArrayList<java.lang.String> returnTypes, boolean extendedHeaders)
Further information, see ClientSideSessionTarget.setAllowedReturnTypes(ArrayList, boolean)
.
sessionID
- returnTypes
- extendedHeaders
- public void getTarget() throws ErrorException, java.lang.IllegalAccessException
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
maxTargetLength
parameters means a maximum limit for
the compressed logical target; and a negative value means the maximum is
unlimited.maxTargetLength
- maximum length of the compressed target. A
positive value means a maximum, and a negative value means
unlimited.java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(long maxTargetLength, int layers, int quality) throws java.lang.IllegalAccessException, ErrorException
maxTargetLength
parameters means a maximum limit for
the compressed logical target; and a negative value means the maximum is
unlimited.maxTargetLength
- maximum length of the compressed target. A
positive value means a maximum, and a negative value means
unlimited.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String requestURI) throws ErrorException
requestURI
requestURI
- is the URI to locate the target.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String sessionID, java.lang.String requestURI) throws ErrorException
requestURI
requestURI
- is the URI to locate the target.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(int[] components, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
components
- is an one-dimension array with the component indeces.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String sessionID, int[] components, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
sessionID
- is the unique session identifier.components
- is an one-dimension array with the component indeces.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(int[] components, int[] fsiz, int[] roff, int[] rsiz, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
components
- is an one-dimension array with the component indeces.fsiz
- definition in ViewWindowField.fsiz
.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String sessionID, int[] components, int[] fsiz, int[] roff, int[] rsiz, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
sessionID
- components
- is an one-dimension array with the component indeces.fsiz
- definition in ViewWindowField.fsiz
.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(int[] components, int discardLevels, int[] roff, int[] rsiz, int layers, int quality) throws java.lang.IllegalAccessException, ErrorException
components
- is an one-dimension array with the component indexes.resolutionLevel
- is the desired resolution level of the target.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String sessionID, int[] components, int discardLevels, int[] roff, int[] rsiz, int layers, int quality) throws java.lang.IllegalAccessException, ErrorException
sessionID
- components
- is an one-dimension array with the component indexes.resolutionLevel
- is the desired resolution level of the target.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(int[][] comps, int discardLevels, int[] roff, int[] rsiz, int layers, int quality) throws java.lang.IllegalAccessException, ErrorException
comps
- definition in ViewWindowField.comps
.resolutionLevel
- is the desired resolution level of the target.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String sessionID, int[][] comps, int discardLevels, int[] roff, int[] rsiz, int layers, int quality) throws java.lang.IllegalAccessException, ErrorException
sessionID
- comps
- definition in ViewWindowField.comps
.resolutionLevel
- is the desired resolution level of the target.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(int[] components, int discardLevels, int[] roff, int[] rsiz, int layers, int quality, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
components
- is an one-dimension array with the component indeces.resolutionLevel
- is the desired resolution level of the target.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String sessionID, int[] components, int discardLevels, int[] roff, int[] rsiz, int layers, int quality, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
components
- is an one-dimension array with the component indeces.resolutionLevel
- is the desired resolution level of the target.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(int[][] comps, int discardLevels, int[] roff, int[] rsiz, int layers, int quality, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
comps
- definition in ViewWindowField.comps
.discardLevels
- is the desired number of levels to be discard in the wavelet transform.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String sessionID, int[][] comps, int discardLevels, int[] roff, int[] rsiz, int layers, int quality, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
sessionID
- comps
- definition in ViewWindowField.comps
.discardLevels
- is the desired number of levels to be discard in the wavelet transform.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(int[] components, int[] fsiz, int[] roff, int[] rsiz, int layers, int quality, int round) throws java.lang.IllegalAccessException, ErrorException
components
- is an one-dimension array with the component indexes.fsiz
- definition in ViewWindowField.fsiz
.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String sessionID, int[] components, int[] fsiz, int[] roff, int[] rsiz, int layers, int quality, int round) throws java.lang.IllegalAccessException, ErrorException
components
- is an one-dimension array with the component indeces.fsiz
- definition in ViewWindowField.fsiz
.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(int[][] comps, int[] fsiz, int[] roff, int[] rsiz, int layers, int quality, int round) throws java.lang.IllegalAccessException, ErrorException
comps
- definition in ViewWindowField.comps
.fsiz
- definition in ViewWindowField.fsiz
.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String sessionID, int[][] comps, int[] fsiz, int[] roff, int[] rsiz, int layers, int quality, int round) throws java.lang.IllegalAccessException, ErrorException
sessionID
- comps
- definition in ViewWindowField.comps
.fsiz
- definition in ViewWindowField.fsiz
.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(int[] components, int[] fsiz, int[] roff, int[] rsiz, int layers, int quality, int round, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
components
- is an one-dimension array with the component indexes.fsiz
- definition in ViewWindowField.fsiz
.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String sessionID, int[] components, int[] fsiz, int[] roff, int[] rsiz, int layers, int quality, int round, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
sessionID
- components
- is an one-dimension array with the component indexes.fsiz
- definition in ViewWindowField.fsiz
.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(int[][] comps, int[] fsiz, int[] roff, int[] rsiz, int layers, int quality, int round, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
comps
- definition in ViewWindowField.comps
.fsiz
- definition in ViewWindowField.fsiz
.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void getTarget(java.lang.String sessionID, int[][] comps, int[] fsiz, int[] roff, int[] rsiz, int layers, int quality, int round, long maxTargetLength) throws java.lang.IllegalAccessException, ErrorException
sessionID
- comps
- definition in ViewWindowField.comps
.fsiz
- definition in ViewWindowField.fsiz
.roff
- definition in ViewWindowField.roff
.rsiz
- definition in ViewWindowField.rsiz
.layers
- definition in ViewWindowField.layers
.quality
- definition in JPIPResponseFields.quality
.maxTargetLength
- definition in #maxTargetLength
java.lang.IllegalAccessException
- if the method is called before the
#setServerAndTarget(String, int, String)
.ErrorException
- if the target (
requestURI
) cannot be
fetched from the server, or the delivery data cannot be
decompressed correctly.public void setUseSession(boolean useSession)
useSession
- true
if sessions will be used.
false
if it will not.public void setKeepAlive(boolean keepAlive)
keepAlive
attribute.keepAlive
- see keepAlive
.public final void setLogFile(java.lang.String logFileName)
logFileName
parameter is null, logs are printed out the default output in
plain text.logFileName
- file name of the log file.public final void setLogFile(java.lang.String logFileName, boolean useXMLFormat)
logFileName
parameter is null, logs are printed out the default output.logFileName
- file name of the log file.useXMLFormat
- if
true
logs are printed out following
a XML format. Otherwise, plain text is used.public final void setLogEnabled(boolean enabled)
enabled
- if
true
, logs are enabled.
Otherwise, logs are disabled.public final void setLogLevel(int logLevel)
logLevel
- public final java.lang.String getTargetDescription()
null
pointer is returned.null
pointer is
returned.public java.lang.String getTargetDescription(java.lang.String sessionID)
null
pointer is returned.sessionID
- null
pointer is
returned.public final java.lang.String getURI()
public java.lang.String getURI(java.lang.String sessionID)
sessionID
- public final java.lang.String getServer()
public final java.lang.String getServer(java.lang.String sessionID)
public final int getPort()
public final int getPort(java.lang.String sessionID)
public java.lang.String getTargetName()
public java.lang.String getTargetName(java.lang.String sessionID)
sessionID
- public float getSpeed()
public float getSpeed(java.lang.String sessionID)
sessionID
- public long getDownloadedBytes()
public long getDownloadedBytes(java.lang.String sessionID)
sessionID
- public void resetJPIPMessagesCounters()
public void resetJPIPMessagesCounters(java.lang.String sessionID)
sessionID
- public long getBytesJPIPMessageHeader()
#bytesJPIPMessageHeader
attribute.#bytesJPIPMessageHeader
attribute.public long getBytesJPIPMessageHeader(java.lang.String sessionID)
#bytesJPIPMessageHeader
attribute.sessionID
- #bytesJPIPMessageHeader
attribute.public long getBytesJPIPMessageBody()
#bytesJPIPMessageBody
attribute.#bytesJPIPMessageBody
attribute.public long getBytesJPIPMessageBody(java.lang.String sessionID)
#bytesJPIPMessageBody
attribute.sessionID
- #bytesJPIPMessageBody
attribute.public boolean isKeepAlive()
keepAlive
attribute.keepAlive
attribute.public boolean isUseSession()
useSession
attribute.useSession
attribute.public boolean isUseHTTPSession()
useHTTPSession
attribute.useHTTPSession
attribute.public boolean isUseHTTPTCPSession()
useHTTPTCPSession
attributeuseHTTPTCPSession
attribute.public int getManagementPolicy()
CADI.Client.Cache.ClientCache#getManagementPolicy()
CADI.Client.Cache.ClientCache#getManagementPolicy()
public int getManagementPolicy(java.lang.String sessionID)
CADI.Client.Cache.ClientCache#getManagementPolicy()
sessionID
- CADI.Client.Cache.ClientCache#getManagementPolicy()
public long getMaxCacheSize()
CADI.Client.Cache.ClientCache#getMaxCacheSize()
CADI.Client.Cache.ClientCache#getMaxCacheSize()
public long getMaxCacheSize(java.lang.String sessionID)
CADI.Client.Cache.ClientCache#getMaxCacheSize()
sessionID
- CADI.Client.Cache.ClientCache#getMaxCacheSize()
public boolean isLogEnabled()
CADILog.isEnabled()
.CADILog.isEnabled()
.public boolean useLogXMLFormat()
CADILog.useXMLFormat()
.CADILog.useXMLFormat()
.public java.lang.String getLogFileName()
CADILog.getFileName()
.CADILog.getFileName()
.public int getLogLevel()
CADILog.getLogLevel()
.CADILog.getLogLevel()
.@Deprecated public int getJPIPStreamType()
public void saveCache(java.lang.String fileName) throws ErrorException
fileName
- ErrorException
public void saveCache(java.lang.String sessionID, java.lang.String fileName) throws ErrorException
fileName
- ErrorException
public void loadCache(java.lang.String fileName) throws ErrorException
fileName
- ErrorException
public void loadCache(java.lang.String sessionID, java.lang.String fileName) throws ErrorException
fileName
- ErrorException
public void setUserAgent(java.lang.String userAgent)
userAgent
- public void setDebug(java.lang.String debug)
userAgent
- public void startPrefetching()
public void stopPrefetching()
public java.lang.String toString()
toString
in class java.lang.Object
public void list(java.io.PrintStream out)
out
- an output stream.private void showTimeMemory(java.lang.String stage)
stage
- string that will be displayed
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)