public class Connection extends Object implements AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static interface |
Connection.ConnectionListener
Connection Listener interface
|
| Constructor and Description |
|---|
Connection(@NonNull Server server,
@NonNull AutoCloseable closeable)
Constructor
|
Connection(@NonNull Server server,
@NonNull ManagedChannel managedChannel)
Create a new SiLA Connection
|
| Modifier and Type | Method and Description |
|---|---|
void |
attachAndTriggerListener(@NonNull Connection.ConnectionListener connectionListener) |
void |
close() |
com.google.protobuf.Descriptors.ServiceDescriptor |
getFeatureService(@NonNull String featureId)
Get a feature service
|
public Connection(@NonNull @NonNull Server server, @NonNull @NonNull ManagedChannel managedChannel) throws sila_java.library.core.sila.mapping.feature.MalformedSiLAFeature
server - Server DescriptionmanagedChannel - gRPC Channel to Serversila_java.library.core.sila.mapping.feature.MalformedSiLAFeature - if one of the features is invalidpublic Connection(@NonNull @NonNull Server server, @NonNull @NonNull AutoCloseable closeable) throws sila_java.library.core.sila.mapping.feature.MalformedSiLAFeature
server - the servercloseable - the cleanup method to call when closing the connectionsila_java.library.core.sila.mapping.feature.MalformedSiLAFeaturepublic void attachAndTriggerListener(@NonNull @NonNull Connection.ConnectionListener connectionListener)
connectionListener - Listeners to changes in the connectionpublic com.google.protobuf.Descriptors.ServiceDescriptor getFeatureService(@NonNull @NonNull String featureId) throws KeyException
featureId - The feature identifierKeyException - when no identifier does not match any featurepublic void close()
close in interface AutoCloseableCopyright © 2022 SiLA Java Developers. All rights reserved.