@Override public void start(EmailMessageListener emailMessageListener) throws EmailConnectorException { consumer.setEmailMessageListener(emailMessageListener); try { super.start(); } catch (Exception e) { throw new EmailConnectorException("Error is encountered while initializing the polling cycle" + " for email server connector for service:" + id, e); } }
@Override public void start() throws ServerConnectorException { try { consumer = new FileConsumer(id, getProperties(), messageProcessor); super.start(); } catch (RuntimeException e) { throw new ServerConnectorException("Failed to start File Server Connector for service: " + id, e); } }