I tried to receive parameters from HttpProvider and pass to the next incoming stream, so I put the following code on onHTTPRequest method
IApplicationInstance appInstance = vhost.getApplication("live").getAppInstance("_definst_");
WMSProperties props = appInstance.getProperties();
synchronized (props)
{
Map<String, Map<String, String>> storeInfo = (Map<String, Map<String, String>>) props.getProperty("streamStoreInfo");
if (storeInfo == null)
storeInfo = new HashMap<String, Map<String, String>>();
Map<String, String> items = new HashMap<String, String>();
items.put("path", path);
storeInfo.put(streamName, items );
props.put("streamStoreInfo", storeInfo);
}
The HttpProvider would be called before stream upload to WMS.
And also I created a customer module to get the property on onAppStart method
WMSProperties props = appInstance.getProperties();
synchronized (props)
{
Map<String, Map<String, String>> storeInfo = (Map<String, Map<String, String>>) props.getProperty("streamStoreInfo");
getLogger().info("[onAppStart]: "+storeInfo);
}
But the desired property does NOT exist when onAppStart is calling, How should I pass the parameter to application instance or stream that will come later?
Yehudi