Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.invocation.http.interfaces
Class Util

    java.lang.Object
      org.jboss.invocation.http.interfaces.Util

public class Util
extends Object

Common client utility methods

Version:
  $Revision: 1.7.6.1 $
Author:
  Scott.Stark@jboss.org

Field Summary
`static String` | `IGNORE_HTTPS_HOST` A property to override the default https url host verification
`static String` | `SSL_FACTORY_BUILDER` A property to install the https connection ssl socket factory

Constructor Summary
`Util()`

Method Summary
`static void` | `configureHttpsHostVerifier(HttpURLConnection conn)` Given an Https URL connection check the org.jboss.security.ignoreHttpsHost system property and if true, install the AnyhostVerifier as the com.sun.net.ssl.HostnameVerifier or javax.net.ssl.HostnameVerifier depending on the version of JSSE seen.
`static void` | `configureSSLSocketFactory(HttpURLConnection conn)` Override the SSLSocketFactory used by the HttpsURLConnection.
`static void` | `init()` Install the SecurityAssociationAuthenticator as the default java.net.Authenticator
`static Object` | `invoke(URL externalURL, Invocation mi)` Post the Invocation as a serialized MarshalledInvocation object.
`static URL` | `resolveURL(String urlValue)` First try to use the externalURLValue as a URL string and if this fails to produce a valid URL treat the externalURLValue as a system property name from which to obtain the URL string.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### IGNORE_HTTPS_HOST

    public static final String IGNORE_HTTPS_HOST

  A property to override the default https url host verification

  See Also:
    Constant Field Values

### SSL_FACTORY_BUILDER

    public static final String SSL_FACTORY_BUILDER

  A property to install the https connection ssl socket factory

  See Also:
    Constant Field Values

Constructor Detail

### Util

    public Util()

Method Detail

### init

    public static void init()

  Install the SecurityAssociationAuthenticator as the default java.net.Authenticator

### invoke

    public static Object invoke(URL externalURL,
                                Invocation mi)
                         throws Exception

  Post the Invocation as a serialized MarshalledInvocation object. This is using the URL class for now but this should be improved to a cluster aware layer with full usage of HTTP 1.1 features, pooling, etc.

  Throws:
    `Exception`

### configureHttpsHostVerifier

    public static void configureHttpsHostVerifier(HttpURLConnection conn)

  Given an Https URL connection check the org.jboss.security.ignoreHttpsHost system property and if true, install the AnyhostVerifier as the com.sun.net.ssl.HostnameVerifier or javax.net.ssl.HostnameVerifier depending on the version of JSSE seen. If HttpURLConnection is not a HttpsURLConnection then nothing is done.

  Parameters:
    `conn` - a HttpsURLConnection

### configureSSLSocketFactory

    public static void configureSSLSocketFactory(HttpURLConnection conn)
                                          throws InvocationTargetException

  Override the SSLSocketFactory used by the HttpsURLConnection. This method will invoke setSSLSocketFactory on any HttpsURLConnection if there was a SSLSocketFactoryBuilder implementation specified via the org.jboss.security.httpInvoker.sslSocketFactoryBuilder system property.

  Parameters:
    `conn` - possibly a HttpsURLConnection
  Throws:
    `InvocationTargetException` - thrown on failure to invoke setSSLSocketFactory

### resolveURL

    public static URL resolveURL(String urlValue)
                          throws MalformedURLException

  First try to use the externalURLValue as a URL string and if this fails to produce a valid URL treat the externalURLValue as a system property name from which to obtain the URL string. This allows the proxy url to not be set until the proxy is unmarshalled in the client vm, and is necessary when the server is sitting behind a firewall or proxy and does not know what its public http interface is named.

  Throws:
    `MalformedURLException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.