public class MailFetchingService extends Object implements CommunoteSingletonService
Constructor and Description |
---|
MailFetchingService(String name)
Creates a new MailFetching service with the given name.
|
Modifier and Type | Method and Description |
---|---|
static MailFetchingService |
createDefaultMailFetchingService()
Factory method to create the default mail fetching service.
|
protected MailFetcher |
getMailFetcher() |
String |
getName()
Returns the name of the service that is used to address it in the
CommunoteServiceManager . |
boolean |
isEnabled() |
boolean |
isRunning()
Returns true if the service is currently running.
|
void |
start(boolean triggeredLocally)
Non-blocking function that starts the service.
|
void |
stop()
Stops the service and returns after the service was stopped.
|
boolean |
supportsRestart()
Returns whether the service can be restarted at runtime.
|
public MailFetchingService(String name)
name
- the name of the servicepublic static MailFetchingService createDefaultMailFetchingService()
protected MailFetcher getMailFetcher()
public String getName()
CommunoteServiceManager
.getName
in interface CommunoteService
public boolean isEnabled()
isEnabled
in interface CommunoteService
True
, when the service is enabled, else false.public boolean isRunning()
isRunning
in interface CommunoteService
public void start(boolean triggeredLocally)
start
in interface CommunoteService
triggeredLocally
- true if the service was triggered on this Communote instance, false if it was
triggered by an event from another Communote instance when running a clustered
setuppublic void stop()
stop
in interface CommunoteService
public boolean supportsRestart()
supportsRestart
in interface CommunoteService
Copyright © 2019 Communote team. All rights reserved.