Package org.apache.uima.ducc.transport.event

Examples of org.apache.uima.ducc.transport.event.ServiceQueryReplyEvent


        String methodName = "query";

        if ( ! validate_user("Query", ev) ) return;   // necessary messages emitted in here

        logger.info(methodName, null, "Query", ev.toString());
        ServiceQueryReplyEvent reply = handler.query(ev);
        ev.setReply(reply);
        //ev.setReply(ServiceCode.OK, "Service not implemented.", "no-endpoint", null);
    }
View Full Code Here


    ServiceQueryReplyEvent query(ServiceQueryEvent ev)
    {
      //String methodName = "query";
        long friendly = ev.getFriendly();
        String epname = ev.getEndpoint();
        ServiceQueryReplyEvent reply = new ServiceQueryReplyEvent();

        if (( friendly == -1) && ( epname == null )) {
            ArrayList<String> keys = serviceStateHandler.getServiceNames();
            for ( String k : keys ) {
                ServiceSet sset = serviceStateHandler.getServiceByName(k);
                if ( k == null ) continue;                    // the unlikely event it changed out from under us
               
                IServiceDescription sd = sset.query();
                updateServiceQuery(sd, sset);
                reply.addService(sd);
            }
        } else {
            ServiceSet sset = serviceStateHandler.getServiceForApi(friendly, epname);
            if ( sset == null ) {
                reply.setMessage("Unknown");
                reply.setEndpoint(epname);
                reply.setId(friendly);
                reply.setReturnCode(false);
            } else {
                IServiceDescription sd = sset.query();
                updateServiceQuery(sd, sset);
                reply.addService(sd);
            }
        }

        return reply;
    }
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.event.ServiceQueryReplyEvent

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.