Exemplo n.º 1
0
    /** @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary) */
    @Override
    public Dictionary invoke(Dictionary _args) throws Exception {

      FloatHolder currentValue = new FloatHolder();
      FloatHolder currentError = new FloatHolder();
      StringHolder unit = new StringHolder();
      DateHolder timestamp = new DateHolder();

      // invoke model

      model.getCurrentValue(currentValue, currentError, unit, timestamp);

      // build returned Dictionary
      Dictionary _result = new Hashtable();

      _result.put("CurrentValue", currentValue.getObject());
      // java.lang.Float
      _result.put("CurrentError", currentError.getObject());
      // java.lang.Float
      _result.put("Unit", unit.getObject());
      // java.lang.String
      _result.put("Timestamp", timestamp.getObject());
      // java.util.Date
      return _result.isEmpty() ? null : _result;
    }
Exemplo n.º 2
0
    /** @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary) */
    @Override
    public Dictionary invoke(Dictionary _args) throws Exception {

      StringHolder currentApplication = new StringHolder();

      // invoke model

      model.getApplication(currentApplication);

      // build returned Dictionary
      Dictionary _result = new Hashtable();

      _result.put("CurrentApplication", currentApplication.getObject());
      // java.lang.String
      return _result.isEmpty() ? null : _result;
    }