org.mule.runtime.soap.api.message.ImmutableSoapRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mule-service-soap-api Show documentation
Show all versions of mule-service-soap-api Show documentation
Mule service that allows to create SOAP servers and clients
The newest version!
/*
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.runtime.soap.api.message;
import static java.util.Collections.unmodifiableMap;
import org.mule.runtime.api.metadata.MediaType;
import org.mule.runtime.extension.api.soap.SoapAttachment;
import java.io.InputStream;
import java.util.Map;
/**
* Immutable implementation of a {@link SoapRequest}.
*
* @since 4.0
*/
public final class ImmutableSoapRequest implements SoapRequest {
private final InputStream content;
private final Map soapHeaders;
private final Map attachments;
private final Map transportHeaders;
private final MediaType contentType;
private final String operation;
ImmutableSoapRequest(InputStream content,
Map soapHeaders,
Map transportHeaders,
Map attachments,
MediaType contentType,
String operation) {
this.content = content;
this.soapHeaders = unmodifiableMap(soapHeaders);
this.transportHeaders = unmodifiableMap(transportHeaders);
this.attachments = unmodifiableMap(attachments);
this.contentType = contentType;
this.operation = operation;
}
@Override
public InputStream getContent() {
return content;
}
@Override
public Map getSoapHeaders() {
return soapHeaders;
}
@Override
public Map getTransportHeaders() {
return transportHeaders;
}
@Override
public Map getAttachments() {
return attachments;
}
@Override
public MediaType getContentType() {
return contentType;
}
@Override
public String getOperation() {
return operation;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy