org.omg.CORBA.Context Java Examples

The following examples show how to use org.omg.CORBA.Context. 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: cxf   Author: apache   File: CorbaConduit.java    License: Apache License 2.0 6 votes vote down vote up
public Request getRequest(CorbaMessage message,
                             String opName,
                             org.omg.CORBA.NVList nvlist,
                             org.omg.CORBA.NamedValue ret,
                             org.omg.CORBA.ExceptionList exList)
    throws Exception {
    Request request = null;
    if (orb == null) {
        prepareOrb();
    }
    ContextList ctxList = orb.create_context_list();
    Context ctx = null;
    try {
        ctx = orb.get_default_context();
    } catch (Exception ex) {
        //ignore?
    }

    org.omg.CORBA.Object targetObj =
        (org.omg.CORBA.Object)message.get(CorbaConstants.CORBA_ENDPOINT_OBJECT);
    if (targetObj != null) {
        request = targetObj._create_request(ctx, opName, nvlist, ret, exList, ctxList);
    }
    return request;
}
 
Example #2
Source Project: hottub   Author: dsrg-uoft   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 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 #3
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 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 #4
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ServerRequestImpl.java    License: Apache License 2.0 5 votes vote down vote up
public Context ctx()
{
    if ( !_paramsCalled || _resultSet || _exceptionSet )
        throw _wrapper.contextCalledOutOfOrder() ;

    throw _wrapper.contextNotImplemented() ;
}
 
Example #5
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaClientDelegateImpl.java    License: Apache License 2.0 5 votes vote down vote up
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 #6
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaClientDelegateImpl.java    License: Apache License 2.0 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 #7
Source Project: TencentKona-8   Author: Tencent   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 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 #8
Source Project: hottub   Author: dsrg-uoft   File: ServerRequestImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Context ctx()
{
    if ( !_paramsCalled || _resultSet || _exceptionSet )
        throw _wrapper.contextCalledOutOfOrder() ;

    throw _wrapper.contextNotImplemented() ;
}
 
Example #9
Source Project: cxf   Author: apache   File: CorbaDSIServantTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testInvoke() throws Exception {

    CorbaDestination dest = new TestUtils().getComplexTypesTestDestination();


    CorbaDSIServant dsiServant = new CorbaDSIServant();
    dsiServant.init(orb, null, dest, null);
    ServerRequest request = new ServerRequest() {
        public String operation() {
            return "greetMe";
        }
        public Context ctx() {
            return null;
        }

    };

    MessageObserver incomingObserver = new TestObserver();
    dsiServant.setObserver(incomingObserver);

    Map<String, QName> map = new HashMap<>(2);

    map.put("greetMe", new QName("greetMe"));
    dsiServant.setOperationMapping(map);

    dsiServant.invoke(request);
}
 
Example #10
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
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 #11
Source Project: openjdk-8   Author: bpupadhyaya   File: ServerRequestImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Context ctx()
{
    if ( !_paramsCalled || _resultSet || _exceptionSet )
        throw _wrapper.contextCalledOutOfOrder() ;

    throw _wrapper.contextNotImplemented() ;
}
 
Example #12
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ServerRequestImpl.java    License: MIT License 5 votes vote down vote up
public Context ctx()
{
    if ( !_paramsCalled || _resultSet || _exceptionSet )
        throw _wrapper.contextCalledOutOfOrder() ;

    throw _wrapper.contextNotImplemented() ;
}
 
Example #13
Source Project: JDKSourceCode1.8   Author: wupeixuan   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)
{
    return new RequestImpl(orb, obj, ctx, operation, arg_list,
                           result, null, null);
}
 
Example #14
Source Project: JDKSourceCode1.8   Author: wupeixuan   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 #15
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: CorbaClientDelegateImpl.java    License: GNU General Public License v2.0 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 #16
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ContextImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ContextImpl(Context parent)
{
    throw wrapper.contextNotImplemented() ;
}
 
Example #17
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: StubWrapper.java    License: Apache License 2.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 #18
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ClientRequestInfoImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] operation_context (){
    checkAccess( MID_OPERATION_CONTEXT );

    if( cachedOperationContext == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported4() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        Context ctx = request.ctx( );
        // _REVISIT_ The API for get_values is not compliant with the spec,
        // Revisit this code once it's fixed.
        // _REVISIT_ Our ORB doesn't support Operation Context, This code
        // will not be excerscised until it's supported.
        // The first parameter in get_values is the start_scope which
        // if blank makes it as a global scope.
        // The second parameter is op_flags which is set to RESTRICT_SCOPE
        // As there is only one defined in the spec.
        // The Third param is the pattern which is '*' requiring it to
        // get all the contexts.
        NVList nvList = ctx.get_values( "", CTX_RESTRICT_SCOPE.value,"*" );
        String[] context = new String[(nvList.count() * 2) ];
        if( ( nvList != null ) &&( nvList.count() != 0 ) ) {
            // The String[] array will contain Name and Value for each
            // context and hence double the size in the array.
            int index = 0;
            for( int i = 0; i < nvList.count(); i++ ) {
                NamedValue nv;
                try {
                    nv = nvList.item( i );
                }
                catch (Exception e ) {
                    return (String[]) null;
                }
                context[index] = nv.name();
                index++;
                context[index] = nv.value().extract_string();
                index++;
            }
        }

        cachedOperationContext = context;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the String[] array.

    return cachedOperationContext;
}
 
Example #19
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: RequestImpl.java    License: Apache License 2.0 4 votes vote down vote up
public synchronized Context ctx()
{
    if (_ctx == null)
        _ctx = new ContextImpl(_orb);
    return _ctx;
}
 
Example #20
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   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 #21
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ContextImpl.java    License: Apache License 2.0 4 votes vote down vote up
public ContextImpl(Context parent)
{
    throw wrapper.contextNotImplemented() ;
}
 
Example #22
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ContextImpl.java    License: Apache License 2.0 4 votes vote down vote up
public Context create_child(String name)
{
    throw wrapper.contextNotImplemented() ;
}
 
Example #23
Source Project: openjdk-8   Author: bpupadhyaya   File: ORBImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
/**
 * Get the default Context object
 *
 * @result          the default Context object
 */
public synchronized org.omg.CORBA.Context get_default_context()
{
    checkShutdownState();
    throw wrapper.genericNoImpl() ;
}
 
Example #24
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ORBImpl.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * Get the default Context object
 *
 * @result          the default Context object
 */
public synchronized org.omg.CORBA.Context get_default_context()
{
    checkShutdownState();
    throw wrapper.genericNoImpl() ;
}
 
Example #25
Source Project: openjdk-8-source   Author: keerath   File: RequestImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public RequestImpl (ORB orb,
                    org.omg.CORBA.Object targetObject,
                    Context ctx,
                    String operationName,
                    NVList argumentList,
                    NamedValue resultContainer,
                    ExceptionList exceptionList,
                    ContextList ctxList)
{

    // initialize the orb
    _orb    = orb;
    _wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.OA_INVOCATION ) ;

    // initialize target, context and operation name
    _target     = targetObject;
    _ctx    = ctx;
    _opName = operationName;

    // initialize argument list if not passed in
    if (argumentList == null)
        _arguments = new NVListImpl(_orb);
    else
        _arguments = argumentList;

    // set result container.
    _result = resultContainer;

    // initialize exception list if not passed in
    if (exceptionList == null)
        _exceptions = new ExceptionListImpl();
    else
        _exceptions = exceptionList;

    // initialize context list if not passed in
    if (ctxList == null)
        _ctxList = new ContextListImpl(_orb);
    else
        _ctxList = ctxList;

    // initialize environment
    _env    = new EnvironmentImpl();

}
 
Example #26
Source Project: openjdk-8-source   Author: keerath   File: ProxyInputStream.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public Context read_Context() {
    return in.read_Context();
}
 
Example #27
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: TestSingletonOrbImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public Context get_default_context() {
    return null;
}
 
Example #28
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ContextImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public Context create_child(String name)
{
    throw wrapper.contextNotImplemented() ;
}
 
Example #29
Source Project: TencentKona-8   Author: Tencent   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 #30
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: ORBSingleton.java    License: GNU General Public License v2.0 4 votes vote down vote up
public org.omg.CORBA.Context get_default_context()
{
    throw wrapper.genericNoImpl() ;
}