Hi,
I’m trying to do the following:
If a user creates an application using a DevelopmentProvider display the tuples
in a hover that are flowing through a StreamScope oplet.
I’ve created a servlet that accepts requests when a user hovers over a
StreamScope oplet and I can get an instance of a StreamScopeMXBean.
But even though I call setEnabled(true) on the StreamScopeMXBean I never get
any ‘samples’ when I call StreamScopeMXBean.getSamples().
Here is the simple code in the servlet:
StreamScopeMXBean sScopeBean =
StreamScopeUtil.getStreamScope(jobId, opletId, Integer.parseInt(outputPort));
if (sScopeBean != null) {
sScopeBean.setEnabled(true);
System.out.println("is streamScopeMXBean
enabled? " + sScopeBean.isEnabled());
String sampleScope = sScopeBean.getSamples();
System.out.println("sampleScope: " +
sampleScope);
Gson gson = new Gson();
response.setContentType("application/json");
response.setCharacterEncoding("UTF-8");
response.getWriter().write(gson.toJson(sampleScope));
}
The output to the command line is:
is streamScopeMXBean enabled? true
sampleScope: []
What am I missing? I think that if a DevelopmentProvider is used StreamScope
oplets are inserted into the graph, and I should not have to do anything else
to get the sample?
Thanks,
Susan