public class VirusScannerService extends Object implements CommunoteService
VirusScannerFactory
. It is only
marked as running while the start(boolean)
method is executed.Constructor and Description |
---|
VirusScannerService(String name)
Creates a new virus scanner service.
|
Modifier and Type | Method and Description |
---|---|
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 VirusScannerService(String name)
name
- the name of the service used for registrationpublic 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.