org.rhq.enterprise.server.plugins.rhnhosted.xmlrpc
Class RhnDownloader

java.lang.Object
  extended by org.rhq.enterprise.server.plugins.rhnhosted.xmlrpc.RhnDownloader

public class RhnDownloader
extends Object


Field Summary
protected  Map<String,Map> cachedAuthMap
           
protected  String RHN_AUTH
           
protected  String RHN_AUTH_EXPIRE_OFFSET
           
protected  String RHN_AUTH_SERVER_TIME
           
protected  String RHQ_CACHED_TIME
           
protected  String SAT_HANDLER
           
protected  XmlRpcExecutor satHandler
           
protected  String serverUrl
           
protected  String sslCertPath
           
 
Constructor Summary
RhnDownloader(String serverUrlIn)
           
RhnDownloader(String serverUrlIn, String sslCertPathIn)
           
 
Method Summary
protected  InputStream _getFileStream(String systemId, String locationUrl)
           
 boolean checkAuth(String systemId)
           
 InputStream getFileStream(String systemId, String locationUrl)
           
protected  HttpURLConnection getNewConnection(String urlIn)
           
 String getServerUrl()
           
 String getSSLCertPath()
           
 Map login(String systemId)
           
 Map login(String systemId, boolean refresh)
           
 void setSSLCertPath(String sslCertPathIn)
           
protected  boolean verifyAuthMap(Map authProps)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

satHandler

protected XmlRpcExecutor satHandler

serverUrl

protected String serverUrl

SAT_HANDLER

protected String SAT_HANDLER

sslCertPath

protected String sslCertPath

cachedAuthMap

protected Map<String,Map> cachedAuthMap

RHN_AUTH_EXPIRE_OFFSET

protected final String RHN_AUTH_EXPIRE_OFFSET
See Also:
Constant Field Values

RHN_AUTH_SERVER_TIME

protected final String RHN_AUTH_SERVER_TIME
See Also:
Constant Field Values

RHN_AUTH

protected final String RHN_AUTH
See Also:
Constant Field Values

RHQ_CACHED_TIME

protected final String RHQ_CACHED_TIME
See Also:
Constant Field Values
Constructor Detail

RhnDownloader

public RhnDownloader(String serverUrlIn,
                     String sslCertPathIn)

RhnDownloader

public RhnDownloader(String serverUrlIn)
Method Detail

getServerUrl

public String getServerUrl()

setSSLCertPath

public void setSSLCertPath(String sslCertPathIn)

getSSLCertPath

public String getSSLCertPath()

getNewConnection

protected HttpURLConnection getNewConnection(String urlIn)
                                      throws IOException
Throws:
IOException

verifyAuthMap

protected boolean verifyAuthMap(Map authProps)

login

public Map login(String systemId)
          throws IOException,
                 org.apache.xmlrpc.XmlRpcException
Throws:
IOException
org.apache.xmlrpc.XmlRpcException

login

public Map login(String systemId,
                 boolean refresh)
          throws IOException,
                 org.apache.xmlrpc.XmlRpcException
Parameters:
systemId - systemid string contents
refresh - true will cause a refresh of cached login info if any exists
Returns:
Map with values for the keys: X-RHN-Server-Id X-RHN-Auth X-RHN-Auth-User-Id X-RHN-Auth-Expire-Offset X-RHN-Auth-Server-Time
Throws:
IOException
org.apache.xmlrpc.XmlRpcException

checkAuth

public boolean checkAuth(String systemId)
                  throws IOException,
                         org.apache.xmlrpc.XmlRpcException
Throws:
IOException
org.apache.xmlrpc.XmlRpcException

getFileStream

public InputStream getFileStream(String systemId,
                                 String locationUrl)
                          throws IOException,
                                 org.apache.xmlrpc.XmlRpcException
Parameters:
systemId - string containing system id data
locationUrl - url to fetch for package/file/etc
Returns:
InputStream
Throws:
IOException
org.apache.xmlrpc.XmlRpcException

_getFileStream

protected InputStream _getFileStream(String systemId,
                                     String locationUrl)
                              throws IOException,
                                     org.apache.xmlrpc.XmlRpcException
Parameters:
systemId -
locationUrl -
Returns:
Throws:
IOException
org.apache.xmlrpc.XmlRpcException


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.