Search in sources :

Example 1 with MessageHandler

use of com.sun.xml.ws.api.handler.MessageHandler in project metro-jax-ws by eclipse-ee4j.

the class ServerMessageHandlerTube method setUpHandlersOnce.

private void setUpHandlersOnce() {
    handlers = new ArrayList<>();
    HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig();
    List<MessageHandler> msgHandlersSnapShot = handlerConfig.getMessageHandlers();
    if (!msgHandlersSnapShot.isEmpty()) {
        handlers.addAll(msgHandlersSnapShot);
        roles = new HashSet<>();
        roles.addAll(handlerConfig.getRoles());
    }
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) HandlerConfiguration(com.sun.xml.ws.client.HandlerConfiguration) MessageHandler(com.sun.xml.ws.api.handler.MessageHandler)

Example 2 with MessageHandler

use of com.sun.xml.ws.api.handler.MessageHandler in project metro-jax-ws by eclipse-ee4j.

the class ClientMessageHandlerTube method setUpProcessor.

void setUpProcessor() {
    if (handlers == null) {
        // Take a snapshot, User may change chain after invocation, Same chain
        // should be used for the entire MEP
        handlers = new ArrayList<>();
        HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig();
        List<MessageHandler> msgHandlersSnapShot = handlerConfig.getMessageHandlers();
        if (!msgHandlersSnapShot.isEmpty()) {
            handlers.addAll(msgHandlersSnapShot);
            roles = new HashSet<>();
            roles.addAll(handlerConfig.getRoles());
            processor = new SOAPHandlerProcessor(true, this, getBinding(), handlers);
        }
    }
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) HandlerConfiguration(com.sun.xml.ws.client.HandlerConfiguration) MessageHandler(com.sun.xml.ws.api.handler.MessageHandler)

Aggregations

MessageHandler (com.sun.xml.ws.api.handler.MessageHandler)2 BindingImpl (com.sun.xml.ws.binding.BindingImpl)2 HandlerConfiguration (com.sun.xml.ws.client.HandlerConfiguration)2