CADI.Client.Network
Class JPIPRequestEncoder

java.lang.Object
  extended by CADI.Client.Network.JPIPRequestEncoder
All Implemented Interfaces:
ImageReturnTypes, StatusCodes

public class JPIPRequestEncoder
extends java.lang.Object
implements StatusCodes, ImageReturnTypes

This class is useful to build a JPIP string from the JPIP parameters.

Usage example:
  construct
  set functions
  createRequest
  getRequest

Version:
1.0 2007/10/27
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
private  JPIPRequestFields jpipRequestFields
          This attribute contains the JPIP request that will be used to build the JPIP string.
private  java.lang.String request
          It contains the JPIP string (as a url).
 
Fields inherited from interface CADI.Common.Network.HTTP.StatusCodes
ACCEPTED, BAD_REQUEST, NOT_FOUND, NOT_IMPLEMENTED, OK, SERVICE_UNAVAILABLE, UNSUPPORTED_MEDIA_TYPE
 
Fields inherited from interface CADI.Common.Defaults.ImageReturnTypes
JPP_STREAM, JPT_STREAM, MAX_IMAGE_RETURN_TYPES_ALLOWED, RAW
 
Constructor Summary
JPIPRequestEncoder()
          Constructor.
JPIPRequestEncoder(JPIPRequestFields jpipRequestFields)
           
 
Method Summary
 java.lang.String createRequest()
          Encoders the JPIP parameters as a URL string
 java.lang.String getRequest()
          Returns the last JPIP request.
 void list(java.io.PrintStream out)
          Prints this JPIP Request Encoder fields out to the specified output stream.
 void reset()
          Resests the request line.
 void setCClose(java.lang.String cid)
           
 void setCID(java.lang.String cid)
           
 void setCNew(boolean httpChannel, boolean httpTcpChannel)
           
 void setComps(int[][] comps)
           
 void setFSiz(int[] fsiz)
           
 void setLayers(int layers)
           
 void setLen(int len)
           
 void setModel(java.util.ArrayList<CacheDescriptor> cacheDescriptor)
           
 void setPath(java.lang.String path)
           
 void setROff(int[] roff)
           
 void setRSiz(int[] rsiz)
           
 void setTarget(java.lang.String target)
           
 void setTID(java.lang.String tid)
           
 void setType(int type)
           
 java.lang.String toString()
          For debugging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

jpipRequestFields

private JPIPRequestFields jpipRequestFields
This attribute contains the JPIP request that will be used to build the JPIP string.


request

private java.lang.String request
It contains the JPIP string (as a url).

Constructor Detail

JPIPRequestEncoder

public JPIPRequestEncoder()
Constructor.


JPIPRequestEncoder

public JPIPRequestEncoder(JPIPRequestFields jpipRequestFields)
Method Detail

createRequest

public java.lang.String createRequest()
Encoders the JPIP parameters as a URL string

Returns:
a string with the JPIP request.

setTarget

public void setTarget(java.lang.String target)
Parameters:
target -

setTID

public void setTID(java.lang.String tid)
Parameters:
tid -

setCID

public void setCID(java.lang.String cid)

setPath

public void setPath(java.lang.String path)

setCNew

public void setCNew(boolean httpChannel,
                    boolean httpTcpChannel)

setCClose

public void setCClose(java.lang.String cid)

setFSiz

public void setFSiz(int[] fsiz)

setROff

public void setROff(int[] roff)

setRSiz

public void setRSiz(int[] rsiz)

setComps

public void setComps(int[][] comps)

setLayers

public void setLayers(int layers)

setLen

public void setLen(int len)

setType

public void setType(int type)

setModel

public void setModel(java.util.ArrayList<CacheDescriptor> cacheDescriptor)

getRequest

public java.lang.String getRequest()
Returns the last JPIP request.

Returns:
the last JPIP request.

reset

public void reset()
Resests the request line.


toString

public java.lang.String toString()
For debugging purposes.

Overrides:
toString in class java.lang.Object

list

public void list(java.io.PrintStream out)
Prints this JPIP Request Encoder fields out to the specified output stream. This method is useful for debugging.

Parameters:
out - an output stream.


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)