alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Axis 2 example source code file (InvocationContextImpl.java)

This example Axis 2 source code file (InvocationContextImpl.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Axis 2 tags/keywords

asyncresponse, asyncresponse, executor, executor, fixme, invocationcontext, invocationcontextimpl, list, messagecontext, messagecontext, serviceclient, serviceclient, this, threading, threads, util

The Axis 2 InvocationContextImpl.java source code

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.axis2.jaxws.core;

import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.jaxws.client.async.AsyncResponse;

import javax.xml.ws.handler.Handler;
import java.util.List;
import java.util.concurrent.Executor;

/**
 * An implementation of the InvocationContext interface.
 *
 * @see InvocationContext
 */
public class InvocationContextImpl implements InvocationContext {

    private List<Handler> handlers;
    private MessageContext requestMsgCtx;
    private MessageContext responseMsgCtx;
    private Executor executor;
    private AsyncResponse asyncResponse;

    private ServiceClient serviceClient; //FIXME: This is temporary

    public InvocationContextImpl() {
        //do nothing
    }

    /** @see InvocationContext#getHandlers() */
    public List<Handler> getHandlers() {
        return handlers;
    }

    /**
     * Sets the list of hanlders for this InvocationContext
     *
     * @param list
     */
    public void setHandlers(List<Handler> handlers) {
        this.handlers = handlers;
    }

    /** @see InvocationContext#setRequestMessageContext(MessageContext) */
    public void setRequestMessageContext(MessageContext ctx) {
        requestMsgCtx = ctx;
        if (ctx != null) {
            requestMsgCtx.setInvocationContext(this);
        }
    }

    /** @see InvocationContext#setResponseMessageContext(MessageContext) */
    public void setResponseMessageContext(MessageContext ctx) {
        responseMsgCtx = ctx;
        if (ctx != null) {
            responseMsgCtx.setInvocationContext(this);
        }
    }

    /** @see InvocationContext#getResponseMessageContext() */
    public MessageContext getResponseMessageContext() {
        return responseMsgCtx;
    }

    /** @see InvocationContext#getRequestMessageContext() */
    public MessageContext getRequestMessageContext() {
        return requestMsgCtx;
    }

    public Executor getExecutor() {
        return executor;
    }

    public void setExecutor(Executor e) {
        executor = e;
    }

    public AsyncResponse getAsyncResponseListener() {
        return asyncResponse;
    }

    public void setAsyncResponseListener(AsyncResponse ar) {
        asyncResponse = ar;
    }

    // FIXME: This is temporary
    public ServiceClient getServiceClient() {
        return serviceClient;
    }

    // FIXME: This is temporary
    public void setServiceClient(ServiceClient client) {
        serviceClient = client;
    }
}

Other Axis 2 examples (source code examples)

Here is a short list of links related to this Axis 2 InvocationContextImpl.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.