public class ServerCallManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ServerCallManager.RunningServerCall
Running server task model
|
| Constructor and Description |
|---|
ServerCallManager() |
| Modifier and Type | Method and Description |
|---|---|
Runnable |
addListener(@NonNull CallListener callListener)
Add a listener
|
Optional<ServerCallManager.RunningServerCall> |
getCall(@NonNull UUID callUuid)
Get running task by UUID
|
Collection<ServerCallManager.RunningServerCall> |
getCalls()
Get running server tasks
|
io.grpc.ManagedChannelBuilder<?> |
newChannelBuilderWithEncryption(@NonNull String host,
int port)
Create a Channel builder
ChannelBuilder.withTLSEncryption(java.lang.String, int) using executor |
io.grpc.ManagedChannelBuilder<?> |
newChannelBuilderWithEncryption(@NonNull String host,
int port,
X509Certificate certificate)
Create a Channel builder
ChannelBuilder.withTLSEncryption(java.lang.String, int) using executor |
io.grpc.ManagedChannelBuilder<?> |
newChannelBuilderWithoutEncryption(@NonNull String host,
int port)
Deprecated.
unencrypted communications are forbidden by the standard use
newChannelBuilderWithEncryption(String, int)
newChannelBuilderWithEncryption(String, int, X509Certificate) |
void |
removeListener(@NonNull CallListener callListener)
Remove a listener
|
Future<String> |
runAsync(@NonNull ExecutableServerCall executableServerCall)
Run a task asynchronously with global listeners notification
|
Future<String> |
runAsync(@NonNull ExecutableServerCall executableServerCall,
boolean notifyGlobalListener,
CallListener callRelativeListener)
Run a task asynchronously
|
Future<String> |
runAsync(@NonNull ExecutableServerCall executableServerCall,
CallListener callRelativeListener)
Run a task asynchronously with global listeners notification
|
@Deprecated public io.grpc.ManagedChannelBuilder<?> newChannelBuilderWithoutEncryption(@NonNull @NonNull String host, int port)
newChannelBuilderWithEncryption(String, int)
newChannelBuilderWithEncryption(String, int, X509Certificate)ChannelBuilder.withTLSEncryption(java.lang.String, int) using executorhost - the server hostport - the server portManagedChannelBuilderpublic io.grpc.ManagedChannelBuilder<?> newChannelBuilderWithEncryption(@NonNull
@NonNull String host,
int port)
ChannelBuilder.withTLSEncryption(java.lang.String, int) using executorhost - the server hostport - the server portManagedChannelBuilderpublic io.grpc.ManagedChannelBuilder<?> newChannelBuilderWithEncryption(@NonNull
@NonNull String host,
int port,
X509Certificate certificate)
ChannelBuilder.withTLSEncryption(java.lang.String, int) using executorhost - the server hostport - the server portcertificate - the server certificateManagedChannelBuilderpublic Optional<ServerCallManager.RunningServerCall> getCall(@NonNull @NonNull UUID callUuid)
callUuid - the task UUIDpublic Collection<ServerCallManager.RunningServerCall> getCalls()
public Future<String> runAsync(@NonNull @NonNull ExecutableServerCall executableServerCall, boolean notifyGlobalListener, @Nullable CallListener callRelativeListener)
executableServerCall - the executable tasknotifyGlobalListener - option to notify listeners globallycallRelativeListener - the task listenerpublic Future<String> runAsync(@NonNull @NonNull ExecutableServerCall executableServerCall, @Nullable CallListener callRelativeListener)
executableServerCall - the executable taskcallRelativeListener - the task listenerpublic Future<String> runAsync(@NonNull @NonNull ExecutableServerCall executableServerCall)
executableServerCall - the executable taskpublic Runnable addListener(@NonNull @NonNull CallListener callListener)
callListener - the listener to addpublic void removeListener(@NonNull
@NonNull CallListener callListener)
callListener - the listener to removeCopyright © 2024 SiLA Java Developers. All rights reserved.