Package org.jacorb.orb.dsi

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


        String ipAddr = null;

        // This is proprietary non-public API and specific to JacORB only.
        if (ri instanceof ServerRequestInfoImpl)
        {
            ServerRequest request = ((ServerRequestInfoImpl)ri).request;
            // Retrieve the transport from the ServerRequest/GIOPConnection
            ServerIIOPConnection transport =
                ((ServerIIOPConnection)request.getConnection().getTransport());
            // Get the socket from the IIOP layer
            Socket socket = transport.getSocket();

            ipAddr = socket.getInetAddress().getHostAddress();
        }
View Full Code Here

            }
        }

        in.setCodeSet( connection.getTCS(), connection.getTCSW() );

        ServerRequest server_request = null;

        try
        {
            server_request =
            new ServerRequest( orb, in, connection );
        }
        catch( org.jacorb.poa.except.POAInternalError pie )
        {
            if (logger.isWarnEnabled())
                logger.warn("Received a request with a non-jacorb object key" );
View Full Code Here

        inputStream.setCodeSet( connection.getTCS(), connection.getTCSW() );

        inputStream.updateMutatorConnection(connection);

        ServerRequest server_request = null;

        try
        {
            server_request =
            new ServerRequest( orb, inputStream, connection );
        }
        catch( org.jacorb.poa.except.POAInternalError pie )
        {
            logger.warn("Received a request with a non-jacorb object key" );

            if( inputStream.isLocateRequest() )
            {
                LocateReplyOutputStream lr_out =
                new LocateReplyOutputStream( orb,
                                             inputStream.req_hdr.request_id,
                                             LocateStatusType_1_2._UNKNOWN_OBJECT,
                                             inputStream.getGIOPMinor() );

                try
                {
                    connection.sendReply( lr_out );
                }
                catch( IOException e )
                {
                    logger.warn("IOException",e);
                }
            }
            else
            {
                ReplyOutputStream out =
                    new ReplyOutputStream( orb,
                                           inputStream.req_hdr.request_id,
                                           ReplyStatusType_1_2.SYSTEM_EXCEPTION,
                                           inputStream.getGIOPMinor(),
                                           false,
                                           logger );//no locate reply

                try
                {
                    SystemExceptionHelper.write( out,
                            new OBJECT_NOT_EXIST( 0, CompletionStatus.COMPLETED_NO ));

                    connection.sendReply( out );
                }
                catch( IOException e )
                {
                    logger.warn("unexpected exception during requestReceived", e);
                }
            }

            return;
        }

        if (inputStream.isLocateRequest() &&
            ( ! Arrays.equals (server_request.objectKey(), org.jacorb.orb.ParsedIOR.extractObjectKey(inputStream.req_hdr.target, orb))))
        {
            org.omg.CORBA.Object fwd = orb.getReference
            (
                orb.getRootPOA(),
                server_request.objectKey(),
                null,
                true
            );

            if (logger.isDebugEnabled ())
View Full Code Here

    {
        checkIsConfigured();

        StringPair[] result = new StringPair[queue.size()];
        Iterator en = queue.iterator();
        ServerRequest sr;
        for (int i=0; i<result.length; i++)
        {
            sr = (ServerRequest) en.next();
            result[i] = new StringPair(Integer.toString(sr.requestId()), new String( sr.objectId() ) );
        }
        return result;
    }
View Full Code Here

        checkIsConfigured();

        if (!queue.isEmpty())
        {
            Iterator en = queue.iterator();
            ServerRequest result;
            while (en.hasNext())
            {
                result = (ServerRequest) en.next();
                if (result.requestId() == rid)
                {
                    en.remove();
                    this.notifyAll();
                    // notify a queue listener
                    if (queueListener != null)
View Full Code Here

    {
        checkIsConfigured();

        if (!queue.isEmpty())
        {
            ServerRequest result = (ServerRequest) queue.removeFirst();
            this.notifyAll();
            // notify a queue listener

            if (queueListener != null)
            {
View Full Code Here

    {
        checkIsConfigured();

        if (!queue.isEmpty())
        {
            ServerRequest result = (ServerRequest) queue.removeLast();
            this.notifyAll();
            // notify a queue listener
            if (queueListener != null)
            {
                queueListener.requestRemovedFromQueue(result, queue.size());
View Full Code Here

    public void actionRemoveRequestFromQueue(String ridStr) {

        if (queueModel != null && poaModel != null) {
            try {
                ServerRequest request = queueModel.getElementAndRemove(Integer.parseInt(ridStr));
                if (request == null) throw new ApplicationError("error: rid " + ridStr + " is not contained in queue");
                poaModel.getRequestController().rejectRequest(request, new org.omg.CORBA.OBJ_ADAPTER());
            } catch (Throwable e) {
                printMessage("Exception occurred in removeRequestFromQueue() of POAMonitor: "+e);
            }
View Full Code Here

         ORB orb = getORB ();
         byte[] buffer = request.getInputStream ().getBufferCopy ();

         for (int i = 0; i < members.length; i++)
         {
            ServerRequest requestClone = new ServerRequest (orb, new RequestInputStream (orb, request.getConnection (),
                     buffer), request.getConnection ());
            try
            {
               byte[] oid = members[i];
               org.omg.CORBA.Object member = id_to_reference (oid);
               Delegate delegate = (Delegate)((ObjectImpl)member)._get_delegate ();
               requestClone.setObjectKey (delegate.getObjectKey ());
               _invoke (requestClone);
            }
            catch (WrongAdapter ex)
            {
               logger.error ("Caught exception processing group request", ex);
View Full Code Here

TOP

Related Classes of org.jacorb.orb.dsi.ServerRequest

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.