public TreeMap<ProcProperties, String> getProcProperties(SPELLmessage resp) { TreeMap<ProcProperties, String> properties = new TreeMap<ProcProperties, String>(); try { // Build the property map for (ProcProperties name : ProcProperties.values()) { if (resp.hasKey(name.tag)) properties.put(name, resp.get(name.tag)); } } catch (MessageException ex) { ex.printStackTrace(); } return properties; }
/** * ************************************************************************* Constructor * ************************************************************************ */ public RemoteProcedure(IProcedure wasLocalProcedure) { m_procId = wasLocalProcedure.getProcId(); m_properties = new HashMap<ProcProperties, String>(); for (ProcProperties prop : ProcProperties.values()) { m_properties.put(prop, wasLocalProcedure.getProperty(prop)); } m_controller = new RemoteController(); ClientMode cmode = wasLocalProcedure.getRuntimeInformation().getClientMode(); m_executionInformation = new ExecutionInformationHandler(cmode, this); IExecutorInfo info = (IExecutorInfo) wasLocalProcedure.getAdapter(ExecutorInfo.class); m_properties.put(ProcProperties.PROC_NAME, info.getName()); m_executionInformation.copyFrom(info); }