Code example for Properties

Methods: put

0
        this.admin = admin;
    } 
     
    @SuppressWarnings({ "unchecked", "rawtypes" }) 
    public void sendLoginEvent(String userid) {
        Dictionary payload = new Properties();
        payload.put("userid", userid);
        payload.put("timestamp", 
                System.currentTimeMillis());
         
        Event event = new Event("manning/osgi/login", payload);
         
        admin.postEvent(event);
    } 
      
    @SuppressWarnings({ "unchecked", "rawtypes" }) 
    public void sendTravelEvent(String userid) {
        Dictionary payload = new Properties();
        payload.put("price", 80);
         
        Event event = new Event("manning/osgi/travelagent/hotel", payload);