Package org.oasisopen.sca

Examples of org.oasisopen.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


        this.componentContext = context;
    }

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

        receiveEvent(aEventName, "SameThread: Registered to receive notifications for " + aEventName);
    }

    private ServiceReference<EventProcessorCallBack> getClientCallback() {
    if(clientCallback == null) {
        RequestContext requestContext = componentContext.getRequestContext();
        clientCallback = requestContext.getCallbackReference();
      }
    return clientCallback;
  } // end method getClientCallback
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

     *
     * @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 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

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

TOP

Related Classes of org.oasisopen.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.