Java Code Examples for org.omg.CORBA.Request

The following examples show how to use org.omg.CORBA.Request. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: openjdk-jdk9   Source File: ORBImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Send multiple dynamic requests asynchronously.
 *
 * @param req         an array of request objects.
 */
public synchronized void send_multiple_requests_deferred(Request[] req)
{
    checkShutdownState();

    // add the new Requests to pending dynamic Requests
    for (int i = 0; i < req.length; i++) {
        dynamicRequests.addElement(req[i]);
    }

    // Invoke the send_deferred on each new Request
    for (int i = 0; i < req.length; i++) {
        AsynchInvoke invokeObject = new AsynchInvoke( this,
            (com.sun.corba.se.impl.corba.RequestImpl)req[i], true);
        new Thread(null, invokeObject, "ORB-Request-Thread", 0, false).start();
    }
}
 
Example 2
Source Project: openjdk-jdk8u   Source File: ORBImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Send multiple dynamic requests asynchronously.
 *
 * @param req         an array of request objects.
 */
public synchronized void send_multiple_requests_deferred(Request[] req)
{
    checkShutdownState();

    // add the new Requests to pending dynamic Requests
    for (int i = 0; i < req.length; i++) {
        dynamicRequests.addElement(req[i]);
    }

    // Invoke the send_deferred on each new Request
    for (int i = 0; i < req.length; i++) {
        AsynchInvoke invokeObject = new AsynchInvoke( this,
            (com.sun.corba.se.impl.corba.RequestImpl)req[i], true);
        new Thread(invokeObject).start();
    }
}
 
Example 3
Source Project: openjdk-jdk8u-backup   Source File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the next request that has gotten a response.
 *
 * @result            the next request ready with a response.
 */
public org.omg.CORBA.Request get_next_response()
    throws org.omg.CORBA.WrongTransaction
{
    synchronized( this ) {
        checkShutdownState();
    }

    while (true) {
        // check if there already is a response
        synchronized ( dynamicRequests ) {
            Enumeration elems = dynamicRequests.elements();
            while ( elems.hasMoreElements() ) {
                Request currRequest = (Request)elems.nextElement();
                if ( currRequest.poll_response() ) {
                    // get the response for this successfully polled Request
                    currRequest.get_response();
                    dynamicRequests.removeElement(currRequest);
                    return currRequest;
                }
            }
        }

        // wait for a response
        synchronized(this.svResponseReceived) {
            while (!this.svResponseReceived.value()) {
                try {
                    this.svResponseReceived.wait();
                } catch(java.lang.InterruptedException ex) {
                    // NO-OP
                }
            }
            // reinitialize the response flag
            this.svResponseReceived.reset();
        }
    }
}
 
Example 4
Source Project: jdk1.8-source-analysis   Source File: ORBImpl.java    License: Apache License 2.0 5 votes vote down vote up
public synchronized void send_multiple_requests_oneway(Request[] req)
{
    checkShutdownState();

    // Invoke the send_oneway on each new Request
    for (int i = 0; i < req.length; i++) {
        req[i].send_oneway();
    }
}
 
Example 5
Source Project: openjdk-jdk9   Source File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the next request that has gotten a response.
 *
 * @return            the next request ready with a response.
 */
public org.omg.CORBA.Request get_next_response()
    throws org.omg.CORBA.WrongTransaction
{
    synchronized( this ) {
        checkShutdownState();
    }

    while (true) {
        // check if there already is a response
        synchronized ( dynamicRequests ) {
            Enumeration elems = dynamicRequests.elements();
            while ( elems.hasMoreElements() ) {
                Request currRequest = (Request)elems.nextElement();
                if ( currRequest.poll_response() ) {
                    // get the response for this successfully polled Request
                    currRequest.get_response();
                    dynamicRequests.removeElement(currRequest);
                    return currRequest;
                }
            }
        }

        // wait for a response
        synchronized(this.svResponseReceived) {
            while (!this.svResponseReceived.value()) {
                try {
                    this.svResponseReceived.wait();
                } catch(java.lang.InterruptedException ex) {
                    // NO-OP
                }
            }
            // reinitialize the response flag
            this.svResponseReceived.reset();
        }
    }
}
 
Example 6
Source Project: openjdk-8-source   Source File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the next request that has gotten a response.
 *
 * @result            the next request ready with a response.
 */
public org.omg.CORBA.Request get_next_response()
    throws org.omg.CORBA.WrongTransaction
{
    synchronized( this ) {
        checkShutdownState();
    }

    while (true) {
        // check if there already is a response
        synchronized ( dynamicRequests ) {
            Enumeration elems = dynamicRequests.elements();
            while ( elems.hasMoreElements() ) {
                Request currRequest = (Request)elems.nextElement();
                if ( currRequest.poll_response() ) {
                    // get the response for this successfully polled Request
                    currRequest.get_response();
                    dynamicRequests.removeElement(currRequest);
                    return currRequest;
                }
            }
        }

        // wait for a response
        synchronized(this.svResponseReceived) {
            while (!this.svResponseReceived.value()) {
                try {
                    this.svResponseReceived.wait();
                } catch(java.lang.InterruptedException ex) {
                    // NO-OP
                }
            }
            // reinitialize the response flag
            this.svResponseReceived.reset();
        }
    }
}
 
Example 7
Source Project: openjdk-jdk9   Source File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized void send_multiple_requests_oneway(Request[] req)
{
    checkShutdownState();

    // Invoke the send_oneway on each new Request
    for (int i = 0; i < req.length; i++) {
        req[i].send_oneway();
    }
}
 
Example 8
Source Project: openjdk-8-source   Source File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized void send_multiple_requests_oneway(Request[] req)
{
    checkShutdownState();

    // Invoke the send_oneway on each new Request
    for (int i = 0; i < req.length; i++) {
        req[i].send_oneway();
    }
}
 
Example 9
public Request create_request(org.omg.CORBA.Object obj,
                              Context ctx,
                              String operation,
                              NVList arg_list,
                              NamedValue result)
{
    return new RequestImpl(orb, obj, ctx, operation, arg_list,
                           result, null, null);
}
 
Example 10
Source Project: TencentKona-8   Source File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized void send_multiple_requests_oneway(Request[] req)
{
    checkShutdownState();

    // Invoke the send_oneway on each new Request
    for (int i = 0; i < req.length; i++) {
        req[i].send_oneway();
    }
}
 
Example 11
Source Project: TencentKona-8   Source File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the next request that has gotten a response.
 *
 * @result            the next request ready with a response.
 */
public org.omg.CORBA.Request get_next_response()
    throws org.omg.CORBA.WrongTransaction
{
    synchronized( this ) {
        checkShutdownState();
    }

    while (true) {
        // check if there already is a response
        synchronized ( dynamicRequests ) {
            Enumeration elems = dynamicRequests.elements();
            while ( elems.hasMoreElements() ) {
                Request currRequest = (Request)elems.nextElement();
                if ( currRequest.poll_response() ) {
                    // get the response for this successfully polled Request
                    currRequest.get_response();
                    dynamicRequests.removeElement(currRequest);
                    return currRequest;
                }
            }
        }

        // wait for a response
        synchronized(this.svResponseReceived) {
            while (!this.svResponseReceived.value()) {
                try {
                    this.svResponseReceived.wait();
                } catch(java.lang.InterruptedException ex) {
                    // NO-OP
                }
            }
            // reinitialize the response flag
            this.svResponseReceived.reset();
        }
    }
}
 
Example 12
public Request create_request(org.omg.CORBA.Object obj,
                              Context ctx,
                              String operation,
                              NVList arg_list,
                              NamedValue result)
{
    return new RequestImpl(orb, obj, ctx, operation, arg_list,
                           result, null, null);
}
 
Example 13
public Request create_request(org.omg.CORBA.Object obj,
                              Context ctx,
                              String operation,
                              NVList arg_list,
                              NamedValue result,
                              ExceptionList exclist,
                              ContextList ctxlist)
{
    return new RequestImpl(orb, obj, ctx, operation, arg_list, result,
                           exclist, ctxlist);
}
 
Example 14
public Request create_request(org.omg.CORBA.Object obj,
                              Context ctx,
                              String operation,
                              NVList arg_list,
                              NamedValue result,
                              ExceptionList exclist,
                              ContextList ctxlist)
{
    return new RequestImpl(orb, obj, ctx, operation, arg_list, result,
                           exclist, ctxlist);
}
 
Example 15
public Request create_request(org.omg.CORBA.Object obj,
                              Context ctx,
                              String operation,
                              NVList arg_list,
                              NamedValue result,
                              ExceptionList exclist,
                              ContextList ctxlist)
{
    return new RequestImpl(orb, obj, ctx, operation, arg_list, result,
                           exclist, ctxlist);
}
 
Example 16
Source Project: jdk8u60   Source File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the next request that has gotten a response.
 *
 * @result            the next request ready with a response.
 */
public org.omg.CORBA.Request get_next_response()
    throws org.omg.CORBA.WrongTransaction
{
    synchronized( this ) {
        checkShutdownState();
    }

    while (true) {
        // check if there already is a response
        synchronized ( dynamicRequests ) {
            Enumeration elems = dynamicRequests.elements();
            while ( elems.hasMoreElements() ) {
                Request currRequest = (Request)elems.nextElement();
                if ( currRequest.poll_response() ) {
                    // get the response for this successfully polled Request
                    currRequest.get_response();
                    dynamicRequests.removeElement(currRequest);
                    return currRequest;
                }
            }
        }

        // wait for a response
        synchronized(this.svResponseReceived) {
            while (!this.svResponseReceived.value()) {
                try {
                    this.svResponseReceived.wait();
                } catch(java.lang.InterruptedException ex) {
                    // NO-OP
                }
            }
            // reinitialize the response flag
            this.svResponseReceived.reset();
        }
    }
}
 
Example 17
Source Project: JDKSourceCode1.8   Source File: CorbaClientDelegateImpl.java    License: MIT License 5 votes vote down vote up
public Request create_request(org.omg.CORBA.Object obj,
                              Context ctx,
                              String operation,
                              NVList arg_list,
                              NamedValue result,
                              ExceptionList exclist,
                              ContextList ctxlist)
{
    return new RequestImpl(orb, obj, ctx, operation, arg_list, result,
                           exclist, ctxlist);
}
 
Example 18
public Request create_request(org.omg.CORBA.Object obj,
                              Context ctx,
                              String operation,
                              NVList arg_list,
                              NamedValue result)
{
    return new RequestImpl(orb, obj, ctx, operation, arg_list,
                           result, null, null);
}
 
Example 19
public Request create_request(org.omg.CORBA.Object obj,
                              Context ctx,
                              String operation,
                              NVList arg_list,
                              NamedValue result)
{
    return new RequestImpl(orb, obj, ctx, operation, arg_list,
                           result, null, null);
}
 
Example 20
Source Project: openjdk-jdk8u   Source File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized void send_multiple_requests_oneway(Request[] req)
{
    checkShutdownState();

    // Invoke the send_oneway on each new Request
    for (int i = 0; i < req.length; i++) {
        req[i].send_oneway();
    }
}
 
Example 21
Source Project: hottub   Source File: ORBImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the next request that has gotten a response.
 *
 * @result            the next request ready with a response.
 */
public org.omg.CORBA.Request get_next_response()
    throws org.omg.CORBA.WrongTransaction
{
    synchronized( this ) {
        checkShutdownState();
    }

    while (true) {
        // check if there already is a response
        synchronized ( dynamicRequests ) {
            Enumeration elems = dynamicRequests.elements();
            while ( elems.hasMoreElements() ) {
                Request currRequest = (Request)elems.nextElement();
                if ( currRequest.poll_response() ) {
                    // get the response for this successfully polled Request
                    currRequest.get_response();
                    dynamicRequests.removeElement(currRequest);
                    return currRequest;
                }
            }
        }

        // wait for a response
        synchronized(this.svResponseReceived) {
            while (!this.svResponseReceived.value()) {
                try {
                    this.svResponseReceived.wait();
                } catch(java.lang.InterruptedException ex) {
                    // NO-OP
                }
            }
            // reinitialize the response flag
            this.svResponseReceived.reset();
        }
    }
}
 
Example 22
public Request create_request(org.omg.CORBA.Object obj,
                              Context ctx,
                              String operation,
                              NVList arg_list,
                              NamedValue result,
                              ExceptionList exclist,
                              ContextList ctxlist)
{
    return new RequestImpl(orb, obj, ctx, operation, arg_list, result,
                           exclist, ctxlist);
}
 
Example 23
Source Project: openjdk-8   Source File: StubWrapper.java    License: GNU General Public License v2.0 4 votes vote down vote up
public Request _create_request( Context ctx, String operation, NVList arg_list,
    NamedValue result)
{
    return object._create_request( ctx, operation, arg_list, result ) ;
}
 
Example 24
Source Project: openjdk-jdk9   Source File: TestOrbImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public Request get_next_response() throws WrongTransaction {
    return null;
}
 
Example 25
public Request request(org.omg.CORBA.Object obj, String operation)
{
    return new RequestImpl(orb, obj, null, operation, null, null, null,
                           null);
}
 
Example 26
Source Project: openjdk-8-source   Source File: StubWrapper.java    License: GNU General Public License v2.0 4 votes vote down vote up
public Request _request(String operation)
{
    return object._request( operation ) ;
}
 
Example 27
Source Project: openjdk-8   Source File: ORBSingleton.java    License: GNU General Public License v2.0 4 votes vote down vote up
public org.omg.CORBA.Request get_next_response() {
    throw new SecurityException("ORBSingleton: access denied");
}
 
Example 28
Source Project: openjdk-8-source   Source File: StubWrapper.java    License: GNU General Public License v2.0 4 votes vote down vote up
public Request _create_request( Context ctx, String operation, NVList arg_list,
    NamedValue result, ExceptionList exclist, ContextList ctxlist)
{
    return object._create_request( ctx, operation, arg_list, result,
        exclist, ctxlist ) ;
}
 
Example 29
public void send_multiple_requests_oneway(Request[] req) {
    throw new SecurityException("ORBSingleton: access denied");
}
 
Example 30
public Request request(org.omg.CORBA.Object obj, String operation)
{
    return new RequestImpl(orb, obj, null, operation, null, null, null,
                           null);
}