CADI.Proxy.Cache
Class ProxyCacheManagement

java.lang.Object
  extended by CADI.Common.Cache.DataBinsCacheManagement
      extended by CADI.Proxy.Cache.ProxyCacheManagement

public class ProxyCacheManagement
extends DataBinsCacheManagement

This class is used to save a logical target that is being cached by the CADIProxy.

Version:
1.0 2009/08/23
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
private  JPCParameters jpcParameters
          Definition in JPCParameters.
private  int port
          Is the JPIP server's port.
private  java.lang.String proxyTID
          Is the Target Identifier (TID) of this logical target given by the JPIP server.
private  java.lang.String server
          Is the JPIP server.
private  java.lang.String serverTID
          Is the Target Identifier (TID) of this logical target given by the JPIP server.
private  java.lang.String target
          Definition in TargetField.target.
 
Fields inherited from class CADI.Common.Cache.DataBinsCacheManagement
codParameters, EXPLICIT_FORM, IMPLICIT_FORM, INDEX_RANGE, mainHeaderDataBin, NUMBER_OF_BYTES, NUMBER_OF_LAYERS, precinctsDataBins, sizParameters, type, WILDCARD
 
Constructor Summary
ProxyCacheManagement(java.lang.String server, int port, java.lang.String target)
          Constructor.
 
Method Summary
private  SendDataInfo findDescriptor(java.util.ArrayList<SendDataInfo> descriptorsList, int classIdentifier, long inClassIdentifier)
           
private  CacheDescriptor findModelDescriptor(CacheManagementField cacheManagement, int classIdentifier, long inClassIdentifier)
           
private  java.lang.String generateTID_Test()
           
private  java.lang.String generateTID()
           
 java.util.ArrayList<SendDataInfo> getAvailable(ViewWindowField viewWindow)
          This method returns the available data in the cache for the input viewWindow parameter.
 java.util.ArrayList<SendDataInfo> getAvailable(ViewWindowField viewWindow, CacheManagementField cacheManagement)
           
 JPCParameters getJPCParameters()
          Returns the jpcParameters attribute.
 int getPort()
          Returns the port attribute.
 java.lang.String getProxyTID()
          Returns the proxyTID attribute.
 java.util.ArrayList<SendDataInfo> getRemainder(ViewWindowField viewWindow, CacheManagementField cacheManagement, java.util.ArrayList<SendDataInfo> sentDataList)
           
 java.lang.String getServer()
          Returns the server attribute.
 java.lang.String getServerTID()
           
 java.lang.String getTarget()
          Returns the target attribute.
 boolean isMainHeader()
          Check if the codestream main header is available.
 void list(java.io.PrintStream out)
          Prints this Proxy Logical Target fields out to the specified output stream.
 void setJPCParameters(JPCParameters jpcParameters)
          Sets the jpcParameters attribute.
 void setTID(java.lang.String tid)
          Sets the serverTID attribute.
 java.lang.String toString()
           
 
Methods inherited from class CADI.Common.Cache.DataBinsCacheManagement
addJPIPMessage, addJPIPMessage, explicitForm, explicitForm, getCacheDescriptor, getDataBin, getMainHeader, getPrecinctDataBin, getPrecinctDataBins, implicitForm, isCompleteMainHeader, isInCache, reset, setSIZAndCODParamters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

server

private java.lang.String server
Is the JPIP server.


port

private int port
Is the JPIP server's port.


target

private java.lang.String target
Definition in TargetField.target.


serverTID

private java.lang.String serverTID
Is the Target Identifier (TID) of this logical target given by the JPIP server.

Definition in TargetField.tid.


proxyTID

private java.lang.String proxyTID
Is the Target Identifier (TID) of this logical target given by the JPIP server.

Definition in TargetField.tid.


jpcParameters

private JPCParameters jpcParameters
Definition in JPCParameters.

Constructor Detail

ProxyCacheManagement

public ProxyCacheManagement(java.lang.String server,
                            int port,
                            java.lang.String target)
Constructor.

Method Detail

getTarget

public java.lang.String getTarget()
Returns the target attribute.

Returns:
definition in target.

setTID

public void setTID(java.lang.String tid)
Sets the serverTID attribute.

Parameters:
tid - definition in serverTID.

getProxyTID

public java.lang.String getProxyTID()
Returns the proxyTID attribute.

Returns:
definition in proxyTID.

getServer

public java.lang.String getServer()
Returns the server attribute.

Returns:
definition in server.

getPort

public int getPort()
Returns the port attribute.

Returns:
definition in port.

setJPCParameters

public void setJPCParameters(JPCParameters jpcParameters)
Sets the jpcParameters attribute.

Parameters:
jpcParameters - definition in jpcParameters.

getJPCParameters

public JPCParameters getJPCParameters()
Returns the jpcParameters attribute.

Returns:
the jpcParameters attribute.

getAvailable

public java.util.ArrayList<SendDataInfo> getAvailable(ViewWindowField viewWindow)
This method returns the available data in the cache for the input viewWindow parameter. If there are no available data in the cache, a null pointer is returned.

Parameters:
viewWindow - definition in ViewWindowField.
Returns:
an array list with the available data.

getAvailable

public java.util.ArrayList<SendDataInfo> getAvailable(ViewWindowField viewWindow,
                                                      CacheManagementField cacheManagement)
Parameters:
viewWindow -
Returns:

getRemainder

public java.util.ArrayList<SendDataInfo> getRemainder(ViewWindowField viewWindow,
                                                      CacheManagementField cacheManagement,
                                                      java.util.ArrayList<SendDataInfo> sentDataList)
Parameters:
viewWindow -
sentData -
Returns:

isMainHeader

public boolean isMainHeader()
Check if the codestream main header is available.

Returns:
true if the codestream main header is available. Otherwise, the returned value is false.

getServerTID

public java.lang.String getServerTID()
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class DataBinsCacheManagement

list

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

Overrides:
list in class DataBinsCacheManagement
Parameters:
out - an output stream.

generateTID

private java.lang.String generateTID()
Returns:

generateTID_Test

private java.lang.String generateTID_Test()
Returns:

findDescriptor

private SendDataInfo findDescriptor(java.util.ArrayList<SendDataInfo> descriptorsList,
                                    int classIdentifier,
                                    long inClassIdentifier)
Parameters:
descriptorsList -
classIdentifier -
inClassIdentifier -
Returns:

findModelDescriptor

private CacheDescriptor findModelDescriptor(CacheManagementField cacheManagement,
                                            int classIdentifier,
                                            long inClassIdentifier)
Parameters:
cacheManagement -
classIdentifier -
inClassIdentifier -
Returns:


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)