anchor.diff:  This section will show the different ways this information can be queried, using a variety of bindings.
   
   
  -===== Direct Injection
  -
  -The simpliest approach is to leverage CDI or OSGi (blueprint) to obtain a reference to the Activity Server.
  -Once the reference to the Activity Server has been obtained, then the +getActivityTypes+ method can be invoked to
  +===== Java API
  +
  +Once the reference to the Activity Server has been obtained (as described previously), then the +getActivityTypes+ method can be invoked to
   obtain the list of events.
   
   ----
  
positive.code: import org.codehaus.jackson.type.TypeReference;
  import org.overlord.rtgov.activity.model.ActivityUnit;
  
  
  .....
          java.net.URL queryUrl = new java.net.URL(....);   // <host>/overlord-rtgov/activity/unit?id=<id>
  
          java.net.HttpURLConnection connection = (java.net.HttpURLConnection) queryUrl.openConnection();
  
          String userPassword = username + ":" + password;
          String encoding = org.apache.commons.codec.binary.Base64.encodeBase64String(userPassword.getBytes());
          
          connection.setRequestProperty("Authorization", "Basic " + encoding);
  
          connection.setRequestMethod("GET");
          connection.setDoOutput(true);
          connection.setDoInput(true);
          connection.setUseCaches(false);
          connection.setAllowUserInteraction(false);
          connection.setRequestProperty("Content-Type", "application/json");
  
          java.io.InputStream is=connection.getInputStream();
  
          ActivityUnit au = mapper.readValue(is, ActivityUnit.class);
  
          is.close();
  ----
  
  See the REST API documentation in the docs folder of the distribution.
  
negative.code: 
  .....
  
  RESTActivityServer restc=new RESTActivityServer();
  restc.setServerURL(_activityServerURL);
  
  ActivityServerLogger activityUnitLogger=new ActivityServerLogger();
  activityUnitLogger.setActivityServer(restc);
  
  activityUnitLogger.init();
  
  _collector.setActivityUnitLogger(activityUnitLogger);
  ----
  
  This shows a situation where an embedded Activity Collector is being initialized with an Activity Server Logger, which uses the REST Activity Server client implementation.
  