I'm not familiar enough with ITD's to know exactly how you would go about removing them from an object instance at runtime, but it sounds like mainly you'll want to focus on using the postProcess method to manipulate the body of the outgoing Message. The body will be the actual Java object that is intended to be serialized to AMF (so the result of a remoting-destination invocation, for example).
So something like this:
Code:
public class MyMessageInterceptor implements MessageInterceptor {
public Message postProcess(MessageProcessingContext context, Message inputMessage, Message outputMessage) {
Object result = outputMessage.getBody();
//...Do some sort of processing on result...
outputMessage.setBody(result);
return outputMessage;
}
public Message preProcess(MessageProcessingContext context, Message inputMessage) {
//Don't need to process the incoming message, so just return it
return inputMessage;
}
}