Tabnine Logo
JsonControlService.registerControl
Code IndexAdd Tabnine to your IDE (free)

How to use
registerControl
method
in
org.apache.edgent.runtime.jsoncontrol.JsonControlService

Best Java code snippets using org.apache.edgent.runtime.jsoncontrol.JsonControlService.registerControl (Showing top 5 results out of 315)

origin: apache/incubator-edgent

assertNull(cb2.getDoneS());
control.registerControl("myb", "1s", null, MyBean.class, cb1);
control.registerControl("myb", "2s", null, MyBean.class, cb2);
origin: apache/incubator-edgent

assertEquals(0, cb2.getDoneI());
control.registerControl("myb", "1i", null, MyBean.class, cb1);
control.registerControl("myb", "2i", null, MyBean.class, cb2);
origin: apache/incubator-edgent

@Test
public void testNoArg() throws Exception {
  JsonControlService control = new JsonControlService();
  MyBeanImpl cb1 = new MyBeanImpl();
  MyBeanImpl cb2 = new MyBeanImpl();
  assertFalse(cb1.isDoneIt());
  assertFalse(cb2.isDoneIt());
  control.registerControl("myb", "1", null, MyBean.class, cb1);
  control.registerControl("myb", "2", null, MyBean.class, cb2);
  assertFalse(cb1.isDoneIt());
  assertFalse(cb2.isDoneIt());
  JsonObject req = new JsonObject();
  req.addProperty(JsonControlService.TYPE_KEY, "myb");
  req.addProperty(JsonControlService.ALIAS_KEY, "1");
  req.addProperty(JsonControlService.OP_KEY, "doIt");
  control.controlRequest(req);
  assertTrue(cb1.isDoneIt());
  assertFalse(cb2.isDoneIt());
  req = new JsonObject();
  req.addProperty(JsonControlService.TYPE_KEY, "myb");
  req.addProperty(JsonControlService.ALIAS_KEY, "2");
  req.addProperty(JsonControlService.OP_KEY, "doIt");
  control.controlRequest(req);
  assertTrue(cb1.isDoneIt());
  assertTrue(cb2.isDoneIt());
}
origin: apache/incubator-edgent

assertEquals(0L, cb2.getDoneL());
control.registerControl("myb", "1ld", null, MyBean.class, cb1);
control.registerControl("myb", "2ld", null, MyBean.class, cb2);
origin: apache/incubator-edgent

assertNull(cb2.getDoneTs());
control.registerControl("myb", "1eb", null, MyBean.class, cb1);
control.registerControl("myb", "2eb", null, MyBean.class, cb2);
org.apache.edgent.runtime.jsoncontrolJsonControlServiceregisterControl

Javadoc

All control service MBeans must be valid according to Controls#isControlServiceMBean(Class).

Popular methods of JsonControlService

  • <init>
  • controlRequest
    Handle a JSON control request. The control action is executed directly using the calling thread.
  • controlOperation
    Handle a control operation. An operation maps to a void method.
  • executeMethod
  • findMethod
  • getArguments
  • getControl
  • getControlId
  • getControlMBean

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • putExtra (Intent)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now