uk.org.ogsadai.activity.delivery
Class DeliverToStreamServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--uk.org.ogsadai.activity.delivery.DeliverToStreamServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class DeliverToStreamServlet
extends javax.servlet.http.HttpServlet

Servlet to provide streaming HTTP delivery of results. This works with the uk.org.ogsadai.activity.delivery.DeliverToStreamActivity activity.

Author:
The OGSA-DAI Project Team
See Also:
Serialized Form

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private static DAILogger LOG
          Logger object for logging in this class
private static java.util.Map streamTable
          Current set of data avaiting collection indexed by sessionID:streamID.
 
Fields inherited from class javax.servlet.http.HttpServlet
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
DeliverToStreamServlet()
           
 
Method Summary
static void addStream(java.lang.String url, java.lang.String resourceId, SessionID sessionId, java.lang.String streamId, BlockReader reader)
          Add a data stream to the list of streams available from this servlet.
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
private static java.lang.String getIndex(java.lang.String url, java.lang.String resourceId, java.lang.String sessionId, java.lang.String streamId)
          Form an index from a URL, resource ID, session ID and stream ID to uniquely identify data.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

LOG

private static final DAILogger LOG
Logger object for logging in this class


streamTable

private static java.util.Map streamTable
Current set of data avaiting collection indexed by sessionID:streamID.

Constructor Detail

DeliverToStreamServlet

public DeliverToStreamServlet()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException

addStream

public static void addStream(java.lang.String url,
                             java.lang.String resourceId,
                             SessionID sessionId,
                             java.lang.String streamId,
                             BlockReader reader)
Add a data stream to the list of streams available from this servlet.

Parameters:
url - Local part of service URL (e.g. ogsadai/DataService).
resourceId - Data service resource ID.
sessionId - Session ID
streamId - Data stream ID.
reader - Data stream.

getIndex

private static java.lang.String getIndex(java.lang.String url,
                                         java.lang.String resourceId,
                                         java.lang.String sessionId,
                                         java.lang.String streamId)
Form an index from a URL, resource ID, session ID and stream ID to uniquely identify data.

Parameters:
url - Local part of service URL (e.g. ogsadai/DataService).
resourceId - Data service resource ID.
sessionId - Session ID
streamId - Data stream ID.
Returns:
string of form url/resourceID/sessionID/stringID