com.sun.xml.ws.server.UnsupportedMediaException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rt Show documentation
Show all versions of rt Show documentation
JAX-WS Reference Implementation Runtime
The newest version!
/*
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package com.sun.xml.ws.server;
import com.sun.xml.ws.util.exception.JAXWSExceptionBase;
import com.sun.xml.ws.resources.ServerMessages;
import com.sun.istack.NotNull;
import com.sun.xml.ws.api.pipe.Codec;
import java.util.List;
/**
* {@link Codec} throws this exception when it doesn't understand request message's
* Content-Type
* @author Jitendra Kotamraju
*/
public final class UnsupportedMediaException extends JAXWSExceptionBase {
private static final long serialVersionUID = -6909196265080209905L;
public UnsupportedMediaException( @NotNull String contentType, List expectedContentTypes) {
super(ServerMessages.localizableUNSUPPORTED_CONTENT_TYPE(contentType, expectedContentTypes));
}
public UnsupportedMediaException() {
super(ServerMessages.localizableNO_CONTENT_TYPE());
}
public UnsupportedMediaException(String charset) {
super(ServerMessages.localizableUNSUPPORTED_CHARSET(charset));
}
@Override
public String getDefaultResourceBundleName() {
return "com.sun.xml.ws.resources.server";
}
}