org.openmdx.security.auth.client.spi
Class AbstractHttpClient

java.lang.Object
  extended by org.openmdx.security.auth.client.spi.AbstractHttpClient

public abstract class AbstractHttpClient
extends Object

Abstract HTTP Client


Constructor Summary
protected AbstractHttpClient()
          Constructor
 
Method Summary
protected static void close(Closeable closeable)
          Close a Closeable
protected static void close(HttpURLConnection connection)
          Disconnects the connection
protected abstract  URL getAuthenticationURL()
          Retrieve the authentication URL
protected  HttpURLConnection getHeadConnection(boolean secure)
          Create a POST connection
protected  HttpURLConnection getPostConnection(boolean secure)
          Create a POST connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHttpClient

protected AbstractHttpClient()
Constructor

Parameters:
the - authentication action
Throws:
MalformedURLException
Method Detail

getAuthenticationURL

protected abstract URL getAuthenticationURL()
Retrieve the authentication URL

Returns:
the authentication URL

getPostConnection

protected HttpURLConnection getPostConnection(boolean secure)
                                       throws IOException
Create a POST connection

Parameters:
secure - true if a https connection is required
Returns:
a POST connection
Throws:
IOException

getHeadConnection

protected HttpURLConnection getHeadConnection(boolean secure)
                                       throws IOException
Create a POST connection

Parameters:
secure - true if a https connection is required
Returns:
a POST connection
Throws:
IOException

close

protected static void close(HttpURLConnection connection)
Disconnects the connection

Parameters:
connection - the connection to be disconnected; may be null.

close

protected static void close(Closeable closeable)
Close a Closeable

Parameters:
closeable - the object to be closed; may be null.


This software is published under the BSD license. Copyright © 2003-2008, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.