gov.nasa.pds.portal.product
Class ProductClient

java.lang.Object
  extended by gov.nasa.pds.portal.product.ProductClient
All Implemented Interfaces:
jpl.eda.product.Retriever

public class ProductClient
extends Object
implements jpl.eda.product.Retriever

Client access to a product service.

Version:
$Revision: 13805 $
Author:
Kelly

Constructor Summary
ProductClient(String serviceID)
          Creates a new ProductClient instance.
 
Method Summary
 void close(String productID)
          Close off a large product.
 jpl.eda.xmlquery.XMLQuery query(jpl.eda.xmlquery.XMLQuery q)
          Query the product server.
 byte[] retrieveChunk(String productID, long offset, int length)
          Retrieve a chunk from a large product.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductClient

public ProductClient(String serviceID)
              throws jpl.eda.product.ProductException
Creates a new ProductClient instance.

Parameters:
serviceID - Name of the product server to contact.
Throws:
jpl.eda.product.ProductException - if an error occurs.
Method Detail

query

public jpl.eda.xmlquery.XMLQuery query(jpl.eda.xmlquery.XMLQuery q)
                                throws jpl.eda.product.ProductException
Query the product server.

Parameters:
q - Query
Returns:
Response.
Throws:
jpl.eda.product.ProductException - if an error occurs.

retrieveChunk

public byte[] retrieveChunk(String productID,
                            long offset,
                            int length)
                     throws jpl.eda.product.ProductException
Retrieve a chunk from a large product.

Specified by:
retrieveChunk in interface jpl.eda.product.Retriever
Parameters:
productID - Product ID.
offset - Where in the product to retrieve the data.
length - How much data to get.
Returns:
The data.
Throws:
jpl.eda.product.ProductException - if an error occurs.

close

public void close(String productID)
           throws jpl.eda.product.ProductException
Close off a large product.

Specified by:
close in interface jpl.eda.product.Retriever
Parameters:
productID - Product ID.
Throws:
jpl.eda.product.ProductException - if an error occurs.


Copyright © 2010–2015 Planetary Data System. All rights reserved.