com.sun.xml.ws.util.exception
Class JAXWSExceptionBase

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.xml.ws.WebServiceException
                  extended by com.sun.xml.ws.util.exception.JAXWSExceptionBase
All Implemented Interfaces:
Localizable, Serializable
Direct Known Subclasses:
ClientTransportException, DeserializationException, ExceptionHasMessage, HandlerException, ParseException, ProcessorException, RuntimeModelerException, SenderException, SerializationException, ServerRtException, UnsupportedMediaException, UtilException, ValidationException, WSDLParseException, WSServletException, XMLMessageException, XMLReaderException, XMLStreamReaderException, XMLStreamWriterException

public abstract class JAXWSExceptionBase
extends javax.xml.ws.WebServiceException
implements Localizable

Represents a WebServiceException with localizable message.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.sun.xml.ws.util.localization.Localizable
NOT_LOCALIZABLE
 
Constructor Summary
protected JAXWSExceptionBase(Localizable msg)
           
protected JAXWSExceptionBase(Localizable msg, Throwable cause)
           
protected JAXWSExceptionBase(String message)
           
protected JAXWSExceptionBase(String key, Object... args)
          Deprecated. Should use the localizable constructor instead.
protected JAXWSExceptionBase(Throwable throwable)
          Creates a new exception that wraps the specified exception.
 
Method Summary
 Object[] getArguments()
          Returns the arguments for message formatting.
protected abstract  String getDefaultResourceBundleName()
          Gets the default resource bundle name for this kind of exception.
 String getKey()
          Gets the key in the resource bundle.
 String getMessage()
           
 String getResourceBundleName()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JAXWSExceptionBase

protected JAXWSExceptionBase(String key,
                             Object... args)
Deprecated. Should use the localizable constructor instead.


JAXWSExceptionBase

protected JAXWSExceptionBase(String message)

JAXWSExceptionBase

protected JAXWSExceptionBase(Throwable throwable)
Creates a new exception that wraps the specified exception.


JAXWSExceptionBase

protected JAXWSExceptionBase(Localizable msg)

JAXWSExceptionBase

protected JAXWSExceptionBase(Localizable msg,
                             Throwable cause)
Method Detail

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

getDefaultResourceBundleName

protected abstract String getDefaultResourceBundleName()
Gets the default resource bundle name for this kind of exception. Used for JAXWSExceptionBase(String, Object[]).


getKey

public final String getKey()
Description copied from interface: Localizable
Gets the key in the resource bundle.

Specified by:
getKey in interface Localizable
Returns:
if this method returns Localizable.NOT_LOCALIZABLE, that means the message is not localizable, and the first item of Localizable.getArguments() array holds a String.

getArguments

public final Object[] getArguments()
Description copied from interface: Localizable
Returns the arguments for message formatting.

Specified by:
getArguments in interface Localizable
Returns:
can be an array of length 0 but never be null.

getResourceBundleName

public final String getResourceBundleName()
Specified by:
getResourceBundleName in interface Localizable