|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Server.LogicalTarget.ServerLogicalTargetManager
CADI.Server.LogicalTarget.JPEG2000.JP2LogicalTargetManager
public class JP2LogicalTargetManager
This class extends the ServerLogicalTargetManager class
and it is used to manage the JPEG2000 logical targets.
There are implemented the following rate-distortion methods:
1- File-Order: this rate-distortion method deliveries the requested WOI
in the same order they are saved in the codestream.
2- CPI: the requested WOI is delivery following a Coding Passes
Interleaving strategy.
3- CoRD: the requested WOI is delivery following the Characterization of
Rate Distortion (CoRD) algorithm. NOTICE: this algoritm is only working
for gray-scale images.
| Field Summary | |
|---|---|
private CoRDBasedDelivery |
cordBasedDelivery
This object is used when the image data are sent using the Characterization of Rate Distortion (CoRD) algorithm. |
private CoRDDelivery |
cordDelivery
This object is used when the image data are sent using the classic Characterization of Rate Distortion (CoRD) algorithm. |
private CPIBasedDelivery |
cpiBasedDelivery
This object is used when the image data are sent using the Coding Passes Interleaving (CPI) algorithm. |
private CPIDelivery |
cpiDelivery
This object is used when the image data are sent using the Coding Passes Interleaving (CPI) algorithm. |
private int |
deliveryProgressionOrder
Definition in Worker.deliveryProgressionOrder. |
private FileOrderDelivery |
fileOrderDelivery
This object is used when the image data are sent following the order of the codestream in the file. |
private JPCParameters |
jpcParameters
Contains the parameters of a JPC codestream. |
private JP2LogicalTarget |
logicalTarget
Is the logical target which is being delivery. |
private long |
maximumResponseLength
Definition in DataLimitField.len |
private int |
rateDistortionMethod
Definition in JP2LogicalTarget.rateDistortionMethod |
private int |
RDSubType
Indicates a subtype of the rateDistortionMethod attribute. |
private ViewWindowField |
requestViewWindow
Contains the requested Window Of Interest. |
private long |
responseLength
It is a temporal attribute to accumulate the response length which is sending to the client. |
private JPCServerCache |
serverCache
Is the server cache for the client session and target. |
| Fields inherited from class CADI.Server.LogicalTarget.ServerLogicalTargetManager |
|---|
EORReasonCode, EORReasonMessage, jpipMessageHeaders, log, parentName, quality, responseViewWindow |
| Constructor Summary | |
|---|---|
JP2LogicalTargetManager()
Constructor |
|
| Method Summary | |
|---|---|
private void |
addMetadaBin0(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
Adds the metadata bin 0 to the response. |
private void |
addTileHeader(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
Adds the tile-header to the response. |
void |
deliveryData(HTTPResponseSender httpResponseSender)
This method deliveries the data which belong to the request view window. |
void |
deliveryData(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
This method deliveries the data which belong to the request view window. |
private void |
deliveryDataCoRD(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
Delivery the image WOI following the Characterization of Rate Distortion (CoRD) algorithm |
private void |
deliveryDataCPI(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
Delivery the image WOI following the Coding Passes Interleaving (CPI) strategy. |
private void |
deliveryDataFileOrder(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
Delivery the image WOI following the order of the codestream in the file. |
void |
list(java.io.PrintStream out)
Prints this JPCLogicalTargetManager out to the specified output stream. |
ServerLogicalTarget |
logicalTargetIndexing(BufferedDataInputStream in)
Indexes a logical target file, i.e, reads the logical target structure and it is kept in memory be used later when a client request for a Window of Interest of the logical target. |
void |
processClientRequest(ServerLogicalTarget logicalTarget,
ServerCache serverCache,
ViewWindowField viewWindow,
long len)
This method processes the request WOI of the client. |
private void |
sendEndOfResponse(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
This method is used to send the End of Response of a JPIP message. |
void |
setDeliveryProgressionOrder(int deliveryProgressionOrder)
Sets the deliveryProgressionOrder attribute. |
void |
setRateDistortionMethod(int rateDistortionMethod,
int subType)
Sets the rate-distortion method which will be used to calculate the response to WOI requested by the client. |
java.lang.String |
toString()
|
| Methods inherited from class CADI.Server.LogicalTarget.ServerLogicalTargetManager |
|---|
getEORReasonCode, getEORReasonMessage, getJPIPMessageHeaders, getQuality, getResponseViewWindow, setLog, setParentName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private JP2LogicalTarget logicalTarget
private int rateDistortionMethod
JP2LogicalTarget.rateDistortionMethod
private int RDSubType
rateDistortionMethod attribute.
This parameter, when takes a value, it will depend of the
rateDistortionMethod value.
private int deliveryProgressionOrder
Worker.deliveryProgressionOrder.
private JPCServerCache serverCache
private ViewWindowField requestViewWindow
private long maximumResponseLength
DataLimitField.len
private FileOrderDelivery fileOrderDelivery
private CPIDelivery cpiDelivery
private CPIBasedDelivery cpiBasedDelivery
private CoRDDelivery cordDelivery
private CoRDBasedDelivery cordBasedDelivery
private long responseLength
private JPCParameters jpcParameters
| Constructor Detail |
|---|
public JP2LogicalTargetManager()
| Method Detail |
|---|
public void setRateDistortionMethod(int rateDistortionMethod,
int subType)
rateDistortionMethod - definition in JP2LogicalTarget.rateDistortionMethodpublic void setDeliveryProgressionOrder(int deliveryProgressionOrder)
deliveryProgressionOrder attribute.
deliveryProgressionOrder - definition in deliveryProgressionOrder.
public ServerLogicalTarget logicalTargetIndexing(BufferedDataInputStream in)
throws WarningException
ServerLogicalTargetManager
logicalTargetIndexing in class ServerLogicalTargetManagerWarningException
public void processClientRequest(ServerLogicalTarget logicalTarget,
ServerCache serverCache,
ViewWindowField viewWindow,
long len)
ServerLogicalTargetManagerThis function must be implemented for each logical target supported.
processClientRequest in class ServerLogicalTargetManager
public void deliveryData(HTTPResponseSender httpResponseSender)
throws java.io.IOException,
ErrorException
ServerLogicalTargetManager
deliveryData in class ServerLogicalTargetManagerjava.io.IOException
ErrorException
public void deliveryData(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
throws java.io.IOException,
ErrorException
ServerLogicalTargetManager
deliveryData in class ServerLogicalTargetManagerjava.io.IOException
ErrorExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.
private void deliveryDataFileOrder(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
throws java.io.IOException,
ErrorException
httpResponseSender - is an object which will be used to send the
the messages to the client.jpipMessageEncoder - is an object used to build the JPIP messages.
java.io.IOException - if an I/O error has ocurred.
ErrorException - if an error in the WOI processing has ocurred.
private void deliveryDataCPI(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
throws java.io.IOException,
ErrorException
httpResponseSender - is an object which will be used to send the
the messages to the client.jpipMessageEncoder - is an object used to build the JPIP messages.
java.io.IOException - if an I/O error has ocurred.
ErrorException - if an error in the WOI processing has ocurred.
private void deliveryDataCoRD(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
throws java.io.IOException,
ErrorException
httpResponseSender - is an object which will be used to send the
the messages to the client.jpipMessageEncoder - is an object used to build the JPIP messages.
java.io.IOException - if an I/O error has ocurred.
ErrorException - if an error in the WOI processing has ocurred.
private void addMetadaBin0(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
throws java.io.IOException
It is a temporal method while metadata are not supported.
java.io.IOException
private void addTileHeader(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
throws java.io.IOException
It is a temporal method while tiles are not supported.
java.io.IOException
private void sendEndOfResponse(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder)
throws java.io.IOException
httpResponseSender - jpipMessageEncoder -
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||