Package com.dilanperera.rapidws.config

Examples of com.dilanperera.rapidws.config.ServiceData


        // check whether the service has been mapped in configuration
        if (serviceDataMap.containsKey(serviceName))
        {
            // get service data from configuration mapping
            ServiceData serviceData = serviceDataMap.get(serviceName);

            // check whether the operation has been mapped in configuration
            if (serviceData.getOperations().containsKey(operationName))
            {
                // get operation data from configuration mapping
                OperationData operationData = serviceData.getOperations().get(operationName);

                try
                {
                    // create an instance of the operation handler setup in configuration
                    operationHandler = (OperationHandler)operationData.getClassType().newInstance();
                }
                catch (Exception ex)
                {
                  SimpleLogger.Write("Reflection error!");
                  SimpleLogger.Write(ex);

                      // setup the handler for unavailable operations as a default
                    operationHandler = new UnavailableOperationHandler();
                }
            }
            else
            {
              SimpleLogger.Write("Operation [" + operationName + "] in Service [" + serviceName + "] not mapped in configuration!");
              SimpleLogger.Write(String.valueOf(serviceData.getOperations().size()));

                // setup the handler for unavailable operations as a default
                operationHandler = new UnavailableOperationHandler();
            }
        }
View Full Code Here

TOP

Related Classes of com.dilanperera.rapidws.config.ServiceData

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.