Package org.osoa.sca

Examples of org.osoa.sca.RequestContext


        this.componentContext = context;
    }

    @Init
    public void init() {
        RequestContext rc = componentContext.getRequestContext();
        if (rc != null) {
            rcContent = "NotNull";
        } else {
            rcContent = "Null";
        }
View Full Code Here


     *
     * @param void
     */
    private CallBackApiCallBack getCallBackInterface() {
        System.out.println("CallBackApiServiceImpl getting request context");
        RequestContext rc = componentContext.getRequestContext();
        System.out.println("CallBackApiServiceImpl getting callback from request context");
        callback = rc.getCallback();
        System.out.println("CallBackApiServiceImpl returning callback");
        return callback;

    }
View Full Code Here

    }

    // SearchCallback methods

    public synchronized void searchResults(TripItem[] items) {
        RequestContext requestContext = componentContext.getRequestContext();
        Object callbackID = requestContext.getServiceReference().getCallbackID();
        System.out.println("Asynch response - " + callbackID);

        if (items != null) {
            for (int i = 0; i < items.length; i++) {
                searchResults.add(items[i]);
View Full Code Here

    protected ComponentContext compositeContext;

    public void knockKnock(String aString) {

        System.out.println("CallBackIdServiceImpl message received: " + aString);
        RequestContext rc = compositeContext.getRequestContext();
        Object callBackId = rc.getServiceReference().getCallbackID();
        System.out.println("CallBackIdServiceImpl callbackID: " + callBackId.toString());

        callback.callBackMessage("Who's There");
        System.out.println("CallBackIdServiceImpl response sent");
        return;
View Full Code Here

    public void setCallbackIllegally(String aString) {

        System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() message received: " + aString);

        boolean exceptionProduced = false;
        RequestContext requestContext = null;
        ServiceReference serviceRef = null;

        // Context is not working properly so we can't trust that this is
        // working.....
        try {
            requestContext = context.getRequestContext();
            serviceRef = (ServiceReference) requestContext.getServiceReference();
        } catch (Exception ex) {
            System.out.println("CallBackBasicServiceImpl.setCallbackIllegally()  " + ex.toString());
            ex.printStackTrace();
            return;
        }
View Full Code Here

    public void setCallbackIllegally(String aString) {

        System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() message received: " + aString);

        boolean exceptionProduced = false;
        RequestContext requestContext = null;
        ServiceReference serviceRef = null;

        // Context is not working properly so we can't trust that this is
        // working.....
        try {
            requestContext = context.getRequestContext();
            serviceRef = (ServiceReference) requestContext.getServiceReference();
        } catch (Exception ex) {
            System.out.println("CallBackBasicServiceImpl.setCallbackIllegally()  " + ex.toString());
            ex.printStackTrace();
            return;
        }
View Full Code Here

    }

    public void callBackMessage(String aString) {

        System.out.println("Entering callback callBackMessage: " + aString);
        RequestContext rc = componentContext.getRequestContext();
        Object callBackId = rc.getServiceReference().getCallbackID();

        synchronized (monitor) {
            this.setReturnMessage(aString);
            this.setCallBackId(callBackId);
            monitor.notify();
View Full Code Here

    }

    private CallBackApiCallBack getCallBackInterface() {
        System.out.println("CallBackApiServiceImpl getting request context");
        RequestContext rc = componentContext.getRequestContext();
        System.out.println("CallBackApiServiceImpl getting callback from request context");
        callback = (CallBackApiCallBack) ((ServiceReference) rc.getServiceReference()).getCallback();
        System.out.println("CallBackApiServiceImpl returning callback");
        return callback;

    }
View Full Code Here

        this.componentContext = context;
    }

    @Init
    public void init() {
        RequestContext rc = componentContext.getRequestContext();
        if (rc != null) {
            rcContent = "NotNull";
        } else {
            rcContent = "Null";
        }
View Full Code Here

        this.componentContext = context;
    }

    @Init
    public void init() {
        RequestContext rc = componentContext.getRequestContext();
        if (rc != null) {
            rcContent = "NotNull";
        } else {
            rcContent = "Null";
        }
View Full Code Here

TOP

Related Classes of org.osoa.sca.RequestContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.