code: public static void main(String args[]) {
          String deviceName = "tango/admin/corvus/hoststate";
          try {
              AttributeProxy att = new AttributeProxy(deviceName);
              att.ping();
              System.out.println(att.name() + " is alive");
              DbAttribute db_att = att.get_property();
              for (int i = 0; i < db_att.size(); i++) {
                  DbDatum datum = db_att.datum(i);
                  System.out.println(datum.name + " : " + datum.extractString());
              }
  
              DeviceAttribute da = att.read();
              System.out.println(att.name() + " : " + da.extractShort());
              System.out.println(att.name() + " state  : " + ApiUtil.stateName(att.state()));
              System.out.println(att.name() + " status : " + att.status());
          } catch (DevFailed e) {
              Except.print_exception(e);
          }
      }
docs: ==========================================================================