Package com.sun.xml.ws.util.exception
Class JAXWSExceptionBase
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javax.xml.ws.WebServiceException
-
- com.sun.xml.ws.util.exception.JAXWSExceptionBase
-
- All Implemented Interfaces:
Localizable,LocalizableMessageFactory.ResourceBundleSupplier,Serializable
- Direct Known Subclasses:
ClientTransportException,DeserializationException,ExceptionHasMessage,HandlerException,RuntimeModelerException,SenderException,SerializationException,ServerRtException,UnsupportedMediaException,UtilException,XMLMessageException,XMLReaderException,XMLStreamReaderException,XMLStreamWriterException
public abstract class JAXWSExceptionBase extends javax.xml.ws.WebServiceException implements Localizable, LocalizableMessageFactory.ResourceBundleSupplier
Represents aWebServiceExceptionwith localizable message.- Author:
- WS Development Team
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.sun.istack.localization.Localizable
NOT_LOCALIZABLE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJAXWSExceptionBase(Localizable msg)protectedJAXWSExceptionBase(Localizable msg, Throwable cause)protectedJAXWSExceptionBase(String message)protectedJAXWSExceptionBase(String key, Object... args)Deprecated.Should use the localizable constructor instead.protectedJAXWSExceptionBase(Throwable throwable)Creates a new exception that wraps the specified exception.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Object[]getArguments()Returns the arguments for message formatting.protected abstract StringgetDefaultResourceBundleName()Gets the default resource bundle name for this kind of exception.StringgetKey()Gets the key in the resource bundle.StringgetMessage()ResourceBundlegetResourceBundle(Locale locale)Gets the ResourceBundle.StringgetResourceBundleName()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
JAXWSExceptionBase
@Deprecated protected JAXWSExceptionBase(String key, Object... args)
Deprecated.Should use the localizable constructor instead.- Parameters:
key-args-
-
JAXWSExceptionBase
protected JAXWSExceptionBase(String message)
-
JAXWSExceptionBase
protected JAXWSExceptionBase(Throwable throwable)
Creates a new exception that wraps the specified exception.- Parameters:
throwable-
-
JAXWSExceptionBase
protected JAXWSExceptionBase(Localizable msg)
-
JAXWSExceptionBase
protected JAXWSExceptionBase(Localizable msg, Throwable cause)
-
-
Method Detail
-
getMessage
public String getMessage()
- Overrides:
getMessagein classThrowable
-
getDefaultResourceBundleName
protected abstract String getDefaultResourceBundleName()
Gets the default resource bundle name for this kind of exception. Used forJAXWSExceptionBase(String, Object[]).- Returns:
-
getKey
public final String getKey()
Description copied from interface:LocalizableGets the key in the resource bundle.- Specified by:
getKeyin interfaceLocalizable- Returns:
- if this method returns
Localizable.NOT_LOCALIZABLE, that means the message is not localizable, and the first item ofLocalizable.getArguments()array holds a String.
-
getArguments
public final Object[] getArguments()
Description copied from interface:LocalizableReturns the arguments for message formatting.- Specified by:
getArgumentsin interfaceLocalizable- Returns:
- can be an array of length 0 but never be null.
-
getResourceBundleName
public final String getResourceBundleName()
- Specified by:
getResourceBundleNamein interfaceLocalizable
-
getResourceBundle
public ResourceBundle getResourceBundle(Locale locale)
Description copied from interface:LocalizableMessageFactory.ResourceBundleSupplierGets the ResourceBundle.- Specified by:
getResourceBundlein interfaceLocalizable- Specified by:
getResourceBundlein interfaceLocalizableMessageFactory.ResourceBundleSupplier- Parameters:
locale- the requested bundle's locale- Returns:
- ResourceBundle
-
-