Examples of ServerRequest


Examples of co.paralleluniverse.actors.behaviors.Server.ServerRequest

     * {@link #handleCast(ActorRef, Object, Object) handleCast} or {@link #handleInfo(Object) handleInfo} as appropriate.
     */
    @Override
    protected void handleMessage(Object m) throws InterruptedException, SuspendExecution {
        if (m instanceof ServerRequest) {
            ServerRequest r = (ServerRequest) m;
            switch (r.getType()) {
                case CALL:
                    try {
                        final V res = handleCall((ActorRef<V>) r.getFrom(), r.getId(), (CallMessage) r.getMessage());
                        if (res != null)
                            reply((ActorRef<V>) r.getFrom(), r.getId(), res == NULL_RETURN_VALUE ? null : res);
                    } catch (Exception e) {
                        replyError((ActorRef<V>) r.getFrom(), r.getId(), e);
                    }
                    break;

                case CAST:
                    handleCast((ActorRef<V>) r.getFrom(), r.getId(), (CastMessage) r.getMessage());
                    break;
            }
        } else
            handleInfo(m);
    }
View Full Code Here

Examples of co.paralleluniverse.actors.behaviors.ServerImpl.ServerRequest

     * {@link #handleCast(ActorRef, Object, Object) handleCast} or {@link #handleInfo(Object) handleInfo} as appropriate.
     */
    @Override
    protected void handleMessage(Object m1) throws InterruptedException, SuspendExecution {
        if (m1 instanceof ServerRequest) {
            ServerRequest m = (ServerRequest) m1;
            switch (m.getType()) {
                case CALL:
                    try {
                        final V res = handleCall((ActorRef<V>) m.getFrom(), m.getId(), (CallMessage) m.getMessage());
                        if (res != null)
                            reply((ActorRef<V>) m.getFrom(), m.getId(), res == NULL_RETURN_VALUE ? null : res);
                    } catch (Exception e) {
                        replyError((ActorRef<V>) m.getFrom(), m.getId(), e);
                    }
                    break;

                case CAST:
                    handleCast((ActorRef<V>) m.getFrom(), m.getId(), (CastMessage) m.getMessage());
                    break;
            }
        } else
            handleInfo(m1);
    }
View Full Code Here

Examples of net.noderunner.http.ServerRequest

    this(servlet, new ServerSocket(port));
  }

  @Override
  protected void handleRequest(Request r) throws IOException {
    ServerRequest request = r.getServer().readRequest();
    HttpServletRequestImpl sreq = new HttpServletRequestImpl(request);
    HttpServletResponseImpl sres = new HttpServletResponseImpl();
    sres.setHeader(MessageHeader.FN_SERVER, "ServletServer_" + servlet.getClass().getSimpleName());
    if (ss != null) {
        sreq.serverSocket(ss);
View Full Code Here

Examples of org.jacorb.orb.dsi.ServerRequest

        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" );
View Full Code Here

Examples of org.jacorb.orb.dsi.ServerRequest

     * This method retrievs the received client certificate
     * from the Credentials.
     */
    private X509Certificate getClientCert(ServerRequestInfo ri)
    {
        ServerRequest request = ((ServerRequestInfoImpl) ri).request;

        GIOPConnection connection = request.getConnection();

        // lookup for context
        if (connection == null)
        {
            if (logger.isWarnEnabled())
View Full Code Here

Examples of org.jacorb.orb.dsi.ServerRequest

    {
        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

Examples of org.jacorb.orb.dsi.ServerRequest

        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

Examples of org.jacorb.orb.dsi.ServerRequest

    {
        checkIsConfigured();

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

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

Examples of org.jacorb.orb.dsi.ServerRequest

    {
        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

Examples of org.jacorb.orb.dsi.ServerRequest

    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
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.