April 2019
Intermediate to advanced
360 pages
9h 17m
English
MainEmailHandler() is the primary handler and implements the UniversityEmailHandler interface. The first part of this class contains the processEmailHandler() method, which performs the search of the email text for the keywords assigned to each email handler. The following code shows this:
public abstract class MainEmailHandler implements UniversityEmailHandler { private UniversityEmailHandler theNextHandlerInTheChain; public void setNextEmailHandler(UniversityEmailHandler emailHandler) { theNextHandlerInTheChain = emailHandler; } public void processEmailHandler(String emailText) { // starting value boolean keyWordFound = false; // check for a matching keyword in emailText if (keyWords().length == 0) { keyWordFound =
Read now
Unlock full access