private void processMetaInfo(RecContext context) { profile.netIOBegin(); profile.totalProcessBegin(); CliTransaction cli = new CliTransaction(CliConstants.TYPE_MODULE); cli.setFunctionName("handleMeta"); // handle meta information if (context == null) { String responseMsg = "Unable to parse request meta data."; handleError(ResourceConst.SERVER_ERROR, responseMsg); cli.setStatus("responseMsg"); cli.complete(); } logger.log(Level.INFO, "Meta handled successfully"); // Set context obtained form meta procObj.setContext(context); // Set profiling data setProfileInfo(); // Obtain processConfig for corresponding recType int configId = procObj.getContext().recType; processConfig = ProcessConfigurationFactory.getConfiguration("" + configId); logger.log(Level.INFO, "Obtained process config instance for config id : " + configId); // Obtain proxy object proxy = processConfig.getProxy(); proxy.addResultListener(this); logger.log(Level.INFO, "Obtained proxy instance from process config"); // proxy.init(procObj); cli.complete(); }
private void setProfileInfo() { profile.setCarrier(procObj.getContext().user.getCarrier()); profile.setDeviceType(procObj.getContext().user.getDevice()); profile.setPtn(procObj.getContext().user.getUserId()); logger.log( Level.INFO, "CARRIER: " + procObj.getContext().user.getCarrier() + "; DEVICE: " + procObj.getContext().user.getDevice() + "; USERID: " + procObj.getContext().user.getUserId()); String cserver_machine_name = null; try { InetAddress addr = InetAddress.getLocalHost(); cserver_machine_name = addr.getHostName().toString(); } catch (Exception e) { logger.log(Level.WARNING, "fail to get the server name", e); } profile.setCserver_machine_name(cserver_machine_name); procObj.setProfile(profile); }