Beispiel #1
0
  /**
   * Implementation of docking station functionality for "register user" use case.
   *
   * <p>Method called on docking station receiving a "start registration" triggering input event at
   * the touch screen.
   *
   * @param personalInfo
   */
  public void startRegReceived(String personalInfo) {
    logger.fine("Starting on instance " + getInstanceName());
    cardReader.requestCard(); // Generate output event
    logger.fine("At position 1 on instance " + getInstanceName());

    String card = cardReader.checkCard(); // Pull in non-triggering input event
    logger.fine("At position 2 on instance " + getInstanceName());

    String keyID = keyIssuer.issueKey(); // Generate output event

    // Create a new User class in the Hub system and links it to the key.
    hub.newUser(personalInfo, keyID, card);
  }
Beispiel #2
0
 void setDistributor(EventDistributor d) {
   touchScreen.addDistributorLinks(d);
   cardReader.addDistributorLinks(d);
   keyReader.addDistributorLinks(d);
   for (DPoint dp : dockingPoints) {
     dp.setDistributor(d);
   }
 }
Beispiel #3
0
 void setCollector(EventCollector c) {
   touchScreen.setCollector(c);
   cardReader.setCollector(c);
   keyIssuer.setCollector(c);
   for (DPoint dp : dockingPoints) {
     dp.setCollector(c);
   }
 }
Beispiel #4
0
 /**
  * Respond back to the card reader with the given response.
  *
  * @param resp The response
  */
 public void respondWith(Response resp) {
   m_response = resp;
   m_reader.sendResponse(m_response);
 }