Examples of ServerRequest


Examples of org.jacorb.orb.dsi.ServerRequest

     */

    public void run()
    {
        org.omg.PortableServer.POAManagerPackage.State state;
        ServerRequest request;
        org.omg.CORBA.OBJ_ADAPTER closed_connection_exception =
            new org.omg.CORBA.OBJ_ADAPTER("connection closed: adapter inactive");

        org.omg.CORBA.TRANSIENT transient_exception = new org.omg.CORBA.TRANSIENT();
        while (!terminate)
        {
            state = poa.getState();
            if (POAUtil.isActive(state))
            {
                request = requestQueue.getFirst();

                /* Request available */
                if (request != null)
                {
                    if (request.remainingPOAName() != null)
                    {
                        orb.getBasicAdapter().deliverRequest(request, poa);
                        requestQueue.removeFirst();
                    }
                    else
View Full Code Here

Examples of org.objectweb.celtix.bindings.ServerRequest

     * @param context the message context
     * @return an appropriate ServerRequest for the context
     */
    private ServerRequest createServerRequest(ObjectMessageContext context) {
        AbstractBindingBase binding = handler.getBinding();
        ServerRequest request = new ServerRequest(binding, context);
        // a server-originated resend implies a response, hence non-oneway
        request.setOneway(false);
        return request;
    }
View Full Code Here

Examples of org.objectweb.celtix.bindings.ServerRequest

     * @param context the message context
     */
    private void serverResend(ObjectMessageContext context) throws IOException {
        ServerTransport transport = handler.getServerTransport();
        if (transport != null) {
            ServerRequest serverRequest = createServerRequest(context);
            serverRequest.processOutbound(transport, null, true);
        } else {
            LOG.log(Level.WARNING, "NO_TRANSPORT_FOR_RESEND_MSG");
        }
    }
View Full Code Here

Examples of org.omg.CORBA.ServerRequest

                opType = bopInfo.getExtensor(OperationType.class);
                opQName = bopInfo.getName();
                break;
            }
        }
        ServerRequest request = exchange.get(ServerRequest.class);
        NVList list = prepareArguments(message, destination, info, opType, opQName);
        request.arguments(list);
        message.setList(list);           
   
        OperationInfo opInfo = processWrappedOperation(bopInfo, false);

        addUnmarshalParams(message,
View Full Code Here

Examples of org.omg.CORBA.ServerRequest

    }*/
       
    public void testInvoke() throws Exception {
        CorbaDSIServant dsiServant = new CorbaDSIServant();       
        IMocksControl control = EasyMock.createNiceControl();
        ServerRequest request = EasyMock.createMock(ServerRequest.class);
        Message msg = EasyMock.createMock(Message.class);            
        String opName = "greetMe";
        EasyMock.expect(request.operation()).andReturn(opName);                       
        MessageObserver incomingObserver = new TestObserver();              
        dsiServant.setObserver(incomingObserver);
       
        control.replay();
        dsiServant.invoke(request);
View Full Code Here

Examples of org.omg.CORBA.ServerRequest

    public void testBuildRequestResult() {
        NVList list = (NVList)orb.create_list(0);       
        CorbaServerConduit conduit = setupCorbaServerConduit(false)
        CorbaMessage msg = control.createMock(CorbaMessage.class);
        Exchange exchange = control.createMock(Exchange.class);       
        ServerRequest request = control.createMock(ServerRequest.class);
       
        EasyMock.expect(msg.getExchange()).andReturn(exchange);
        EasyMock.expect(exchange.get(ServerRequest.class)).andReturn(request);
               
        EasyMock.expect(exchange.isOneWay()).andReturn(false);
View Full Code Here

Examples of org.omg.CORBA.ServerRequest

    public void testBuildRequestResultException() {
        NVList list = (NVList)orb.create_list(0);       
        CorbaServerConduit conduit = setupCorbaServerConduit(false)
        CorbaMessage msg = control.createMock(CorbaMessage.class);
        Exchange exchange = control.createMock(Exchange.class);       
        ServerRequest request = control.createMock(ServerRequest.class);
       
        EasyMock.expect(msg.getExchange()).andReturn(exchange);
        EasyMock.expect(exchange.get(ServerRequest.class)).andReturn(request);
               
        EasyMock.expect(exchange.isOneWay()).andReturn(false);
View Full Code Here

Examples of org.omg.CORBA.ServerRequest

        nvlist.add_value(arguments[0].getName(), value, arguments[0].getMode());
       
        CorbaServerConduit conduit = setupCorbaServerConduit(false)
        CorbaMessage msg = control.createMock(CorbaMessage.class);
        Exchange exchange = control.createMock(Exchange.class);       
        ServerRequest request = control.createMock(ServerRequest.class);
       
        EasyMock.expect(msg.getExchange()).andReturn(exchange);
        EasyMock.expect(exchange.get(ServerRequest.class)).andReturn(request);
               
        EasyMock.expect(exchange.isOneWay()).andReturn(false);       
View Full Code Here

Examples of org.omg.CORBA.ServerRequest

    }
   
   
    protected void buildRequestResult(CorbaMessage msg) {       
        Exchange exg = msg.getExchange();       
        ServerRequest request = exg.get(ServerRequest.class);
        try {
            if (!exg.isOneWay()) {               
                CorbaMessage inMsg = (CorbaMessage)msg.getExchange().getInMessage();
                NVList list = inMsg.getList();

                if (msg.getStreamableException() != null) {                   
                    Any exAny = orb.create_any();
                    CorbaStreamable exception = msg.getStreamableException();
                    exAny.insert_Streamable(exception);
                    request.set_exception(exAny);
                    if (msg.getExchange() != null) {
                        msg.getExchange().setOutFaultMessage(msg);
                    }
                } else {
                    CorbaStreamable[] arguments = msg.getStreamableArguments();
                    if (arguments != null) {
                        for (int i = 0; i < arguments.length; ++i) {
                            if (list.item(i).flags() != org.omg.CORBA.ARG_IN.value) {
                                list.item(i).value().insert_Streamable(arguments[i]);
                            }  
                        }
                    }

                    CorbaStreamable resultValue = msg.getStreamableReturn();
                    if (resultValue != null) {
                        Any resultAny = orb.create_any();
                        resultAny.insert_Streamable(resultValue);
                        request.set_result(resultAny);
                    }
                }
            }

        } catch (java.lang.Exception ex) {
View Full Code Here

Examples of org.omg.CORBA.ServerRequest

    protected void setSystemException(CorbaMessage message,
                                      Throwable ex,
                                      CorbaDestination dest) {
        SystemException sysEx = (SystemException)ex;
        message.setSystemException(sysEx);
        ServerRequest request  = message.getExchange().get(ServerRequest.class);
        Any exAny = dest.getOrbConfig().createSystemExceptionAny(orb, sysEx);
        request.set_exception(exAny);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.