FileDocCategorySizeDatePackage
RedirectException.javaAPI DocGlassfish v2 API3483Fri May 04 22:30:32 BST 2007com.sun.appserv.management.client

RedirectException

public final class RedirectException extends IOException
This class holds the redirect URL this HTTP JMX Connector client receives when it tries to connect to http server with mismatching protocol/port/both on admin-listener.

Fields Summary
static final long
serialVersionUID
private final String
redirectURL
private static final Logger
logger
private final boolean
debug
Constructors Summary
public RedirectException(String redirectURL, String message)
Creates a new instance of RedirectException

    
           
         
        super(message);
        this.redirectURL = redirectURL;
    
Methods Summary
public java.net.URLgetRedirectURL()

        try {
            return new URL(redirectURL);
        } catch (MalformedURLException ex) {
            // log the exception as warning because most likely 
            // the subsequent attempt to redirect will fail
            logger.log(Level.WARNING, "Redirect URL received is malformed. " +
                                      "The URL is = " + redirectURL);
            if (debug) ex.printStackTrace();
        }
        return null;
    
public java.lang.StringgetRedirectURLStr()

        return redirectURL;