Package org.osoa.sca

Examples of org.osoa.sca.RequestContext


    public boolean setCallbackIllegally(String aString) {

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

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

        try {
            requestContext = context.getRequestContext();
            serviceRef = (ServiceReference) requestContext.getServiceReference();
            serviceRef.setCallback(serviceRef);
        } catch (ClassCastException goodEx) {
            exceptionProduced = true;
            System.out.println("Test10 appropriate exception caught during setCallback to own service reference");
        } catch (Exception badEx) {
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

    }

    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 = rc.getCallback();
        System.out.println("CallBackApiServiceImpl returning callback");
        return callback;

    }
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;

        try {
            requestContext = context.getRequestContext();
            serviceRef = (ServiceReference) requestContext.getServiceReference();
            serviceRef.setCallback(serviceRef);
        } catch (ClassCastException goodEx) {
            exceptionProduced = true;
            System.out.println("Test10 appropriate exception caught during setCallback to own service reference");
        } catch (Exception badEx) {
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 = rc.getCallback();
        System.out.println("CallBackApiServiceImpl returning callback");
        return callback;

    }
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);

        callback.callBackMessage("Who's There");
        System.out.println("CallBackIdServiceImpl response sent");
        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

    public boolean setCallbackIllegally(String aString) {

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

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

        try {
            requestContext = context.getRequestContext();
            serviceRef = (ServiceReference) requestContext.getServiceReference();
            serviceRef.setCallback(serviceRef);
        } catch (ClassCastException goodEx) {
            exceptionProduced = true;
            System.out.println("Test10 appropriate exception caught during setCallback to own service reference");
        } catch (Exception badEx) {
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

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.