org.deltava.dao.http
Class DAO

java.lang.Object
  extended by org.deltava.dao.http.DAO
Direct Known Subclasses:
GetAUSOTs, GetGoogleGeocode, GetNATs, GetPACOTs, GetVRouteData

public abstract class DAO
extends Object

An abstract class to supports Data Access Objects that read from an HTTP URL. This differs from a stream-based Data Access Object only that HTTP DAOs create their own stream to a URL. This is used in situations where request-specific data is encoded into the URL.

Since:
2.4
Version:
2.4
Author:
Luke

Constructor Summary
DAO()
           
 
Method Summary
protected  InputStream getStream(String url)
          Opens a connection to a URL and returns a stream to the data.
 void setMethod(String method)
          Sets the HTTP method to use if not GET.
 void setSSLContext(SSLContext ctxt)
          Overrides the context used to generate SSL context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DAO

public DAO()
Method Detail

setSSLContext

public void setSSLContext(SSLContext ctxt)
Overrides the context used to generate SSL context.

Parameters:
ctxt - the SSLContext

setMethod

public void setMethod(String method)
Sets the HTTP method to use if not GET.

Parameters:
method - the method name

getStream

protected InputStream getStream(String url)
                         throws IOException
Opens a connection to a URL and returns a stream to the data.

Parameters:
url - the URL to connect to
Returns:
an InputStream to the data
Throws:
IOException - if an error occurs


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.