
com.exacttarget.fuelsdk.ClearAttachmentsOutInterceptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fuelsdk Show documentation
Show all versions of fuelsdk Show documentation
Salesforce Marketing Cloud Java SDK
package com.exacttarget.fuelsdk;
import org.apache.cxf.attachment.AttachmentSerializer;
import org.apache.cxf.binding.soap.SoapMessage;
import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.phase.Phase;
/**
* This interceptor clears {@link AttachmentSerializer} reference
* to ease garbage collection.
*/
public class ClearAttachmentsOutInterceptor extends AbstractSoapInterceptor {
/**
* Class constructor.
*/
public ClearAttachmentsOutInterceptor() {
super(Phase.SETUP_ENDING);
}
/**
* @param message The SOAP message to handle.
*/
public void handleMessage(SoapMessage message) throws Fault {
message.getExchange()
.getOutMessage()
.setContent(org.apache.cxf.attachment.AttachmentSerializer.class, null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy