@Service public interface AgentIPCService
Modifier and Type | Method and Description |
---|---|
void |
createServer(String name,
ThermostatIPCCallbacks callbacks)
Creates an IPC server identified by the provided name, which can be connected to
by IPC clients.
|
void |
createServer(String name,
ThermostatIPCCallbacks callbacks,
UserPrincipal owner)
Creates an IPC server identified by the provided name, which can be connected to
by IPC clients.
|
void |
destroyServer(String name)
Destroys an IPC server identified by the provided name.
|
File |
getConfigurationFile()
Returns the configuration file used by this IPC service.
|
boolean |
serverExists(String name)
Check if an IPC server exists with a given name.
|
void createServer(String name, ThermostatIPCCallbacks callbacks) throws IOException
The server name must contain only letters, numbers, hyphens, and underscores.
name
- - A unique name for this IPC server, must not be nullcallbacks
- - Object to be notified when data is received, must not be nullIOException
- if this IPC server cannot be created for any reasonvoid createServer(String name, ThermostatIPCCallbacks callbacks, UserPrincipal owner) throws IOException
UserPrincipal
.
The server name must contain only letters, numbers, hyphens, and underscores.
name
- - A unique name for this IPC server, must not be nullcallbacks
- - Object to be notified when data is received, must not be nullowner
- - principal representing the intended owner of the serverIOException
- if this IPC server cannot be created for any reasonboolean serverExists(String name) throws IOException
name
- - name of server, must not be nullIOException
- if an error occurred while checking for the named servervoid destroyServer(String name) throws IOException
name
- - the name of the IPC server to destroy, must not be nullIOException
- if this server does not exist, or cannot be destroyed for any reasonFile getConfigurationFile() throws IOException
IOException
- if the configuration file cannot be obtained or the IPC service fails to startCopyright © 2017. All rights reserved.