Interface ServerManager
- All Superinterfaces:
KurentoObject, MediaObject
-
Method Summary
Modifier and TypeMethodDescriptionAdd aEventListenerfor eventObjectCreatedEvent.voidaddObjectCreatedListener(EventListener<ObjectCreatedEvent> listener, Continuation<ListenerSubscription> cont) Add aEventListenerfor eventObjectCreatedEvent.Add aEventListenerfor eventObjectDestroyedEvent.voidaddObjectDestroyedListener(EventListener<ObjectDestroyedEvent> listener, Continuation<ListenerSubscription> cont) Add aEventListenerfor eventObjectDestroyedEvent.intNumber of CPU cores that the media server can use.voidgetCpuCount(Continuation<Integer> cont) Asynchronous version of getCpuCount:Continuation.onSuccess(F)is called when the action is done.Number of CPU cores that the media server can use.getInfo()Get Server information, version, modules, factories, etcvoidgetInfo(Continuation<ServerInfo> cont) Get Server information, version, modules, factories, etcgetInfo(Transaction tx) Get Server information, version, modules, factories, etcReturns the kmd associated to a modulevoidgetKmd(String moduleName, Continuation<String> cont) Asynchronous version of getKmd:Continuation.onSuccess(F)is called when the action is done.getKmd(Transaction tx, String moduleName) Returns the kmd associated to a moduleGet Metadata stored in the servervoidgetMetadata(Continuation<String> cont) Get Metadata stored in the serverGet Metadata stored in the serverGet All the pipelines available in the servervoidgetPipelines(Continuation<List<MediaPipeline>> cont) Get All the pipelines available in the serverGet All the pipelines available in the serverGet All active sessions in the servervoidgetSessions(Continuation<List<String>> cont) Get All active sessions in the serverGet All active sessions in the serverfloatgetUsedCpu(int interval) Average CPU usage of the server.voidgetUsedCpu(int interval, Continuation<Float> cont) Asynchronous version of getUsedCpu:Continuation.onSuccess(F)is called when the action is done.getUsedCpu(Transaction tx, int interval) Average CPU usage of the server.longReturns the amount of memory that the server is using, in KiBvoidgetUsedMemory(Continuation<Long> cont) Asynchronous version of getUsedMemory:Continuation.onSuccess(F)is called when the action is done.Returns the amount of memory that the server is using, in KiBvoidremoveObjectCreatedListener(ListenerSubscription listenerSubscription) Remove aListenerSubscriptionfor eventObjectCreatedEvent.voidremoveObjectCreatedListener(ListenerSubscription listenerSubscription, Continuation<Void> cont) Remove aListenerSubscriptionfor eventObjectCreatedEvent.voidremoveObjectDestroyedListener(ListenerSubscription listenerSubscription) Remove aListenerSubscriptionfor eventObjectDestroyedEvent.voidremoveObjectDestroyedListener(ListenerSubscription listenerSubscription, Continuation<Void> cont) Remove aListenerSubscriptionfor eventObjectDestroyedEvent.Methods inherited from interface KurentoObject
addEventListener, invoke, isCommited, release, release, release, removeEventListener, waitCommited, whenCommited, whenCommitedMethods inherited from interface MediaObject
addErrorListener, addErrorListener, addTag, addTag, addTag, getChildren, getChildren, getChildren, getCreationTime, getCreationTime, getCreationTime, getId, getId, getId, getMediaPipeline, getMediaPipeline, getMediaPipeline, getName, getName, getName, getParent, getParent, getParent, getSendTagsInEvents, getSendTagsInEvents, getSendTagsInEvents, getTag, getTag, getTag, getTags, getTags, getTags, removeErrorListener, removeErrorListener, removeTag, removeTag, removeTag, setName, setName, setName, setSendTagsInEvents, setSendTagsInEvents, setSendTagsInEvents
-
Method Details
-
getInfo
ServerInfo getInfo()Get Server information, version, modules, factories, etc -
getInfo
Get Server information, version, modules, factories, etc -
getInfo
Get Server information, version, modules, factories, etc -
getPipelines
List<MediaPipeline> getPipelines()Get All the pipelines available in the server -
getPipelines
Get All the pipelines available in the server -
getPipelines
Get All the pipelines available in the server -
getSessions
-
getSessions
Get All active sessions in the server -
getSessions
Get All active sessions in the server -
getMetadata
String getMetadata()Get Metadata stored in the server -
getMetadata
Get Metadata stored in the server -
getMetadata
Get Metadata stored in the server -
getKmd
-
getKmd
Asynchronous version of getKmd:Continuation.onSuccess(F)is called when the action is done. If an error occurs,Continuation.onError(Throwable)is called.- Parameters:
moduleName- Name of the module to get its kmd file- See Also:
-
getKmd
Returns the kmd associated to a module- Parameters:
moduleName- Name of the module to get its kmd file- Returns:
- The kmd file. *
-
getCpuCount
int getCpuCount()Number of CPU cores that the media server can use.Linux processes can be configured to use only a subset of the cores that are available in the system, via the process affinity settings (sched_setaffinity(2)). With this method it is possible to know the number of cores that the media server can use in the machine where it is running.
For example, it's possible to limit the core affinity inside a Docker container by running with a command such as docker run --cpuset-cpus='0,1'.
Note that the return value represents the number of logical processing units available, i.e. CPU cores including Hyper-Threading.
- Returns:
- Number of CPU cores available for the media server. *
-
getCpuCount
Asynchronous version of getCpuCount:Continuation.onSuccess(F)is called when the action is done. If an error occurs,Continuation.onError(Throwable)is called.- See Also:
-
getCpuCount
Number of CPU cores that the media server can use.Linux processes can be configured to use only a subset of the cores that are available in the system, via the process affinity settings (sched_setaffinity(2)). With this method it is possible to know the number of cores that the media server can use in the machine where it is running.
For example, it's possible to limit the core affinity inside a Docker container by running with a command such as docker run --cpuset-cpus='0,1'.
Note that the return value represents the number of logical processing units available, i.e. CPU cores including Hyper-Threading.
- Returns:
- Number of CPU cores available for the media server. *
-
getUsedCpu
float getUsedCpu(int interval) Average CPU usage of the server.This method measures the average CPU usage of the media server during the requested interval. Normally you will want to choose an interval between 1000 and 10000 ms.
The returned value represents the global system CPU usage of the media server, as an average across all processing units (CPU cores).
- Parameters:
interval- Time to measure the average CPU usage, in milliseconds.- Returns:
- CPU usage %. *
-
getUsedCpu
Asynchronous version of getUsedCpu:Continuation.onSuccess(F)is called when the action is done. If an error occurs,Continuation.onError(Throwable)is called.- Parameters:
interval- Time to measure the average CPU usage, in milliseconds.- See Also:
-
getUsedCpu
Average CPU usage of the server.This method measures the average CPU usage of the media server during the requested interval. Normally you will want to choose an interval between 1000 and 10000 ms.
The returned value represents the global system CPU usage of the media server, as an average across all processing units (CPU cores).
- Parameters:
interval- Time to measure the average CPU usage, in milliseconds.- Returns:
- CPU usage %. *
-
getUsedMemory
long getUsedMemory()Returns the amount of memory that the server is using, in KiB- Returns:
- Used memory, in KiB. *
-
getUsedMemory
Asynchronous version of getUsedMemory:Continuation.onSuccess(F)is called when the action is done. If an error occurs,Continuation.onError(Throwable)is called.- See Also:
-
getUsedMemory
Returns the amount of memory that the server is using, in KiB- Returns:
- Used memory, in KiB. *
-
addObjectCreatedListener
Add aEventListenerfor eventObjectCreatedEvent. Synchronous call.- Parameters:
listener- Listener to be called on ObjectCreatedEvent- Returns:
- ListenerSubscription for the given Listener
-
addObjectCreatedListener
void addObjectCreatedListener(EventListener<ObjectCreatedEvent> listener, Continuation<ListenerSubscription> cont) Add aEventListenerfor eventObjectCreatedEvent. Asynchronous call. Calls Continuation<ListenerSubscription> when it has been added.- Parameters:
listener- Listener to be called on ObjectCreatedEventcont- Continuation to be called when the listener is registered
-
removeObjectCreatedListener
Remove aListenerSubscriptionfor eventObjectCreatedEvent. Synchronous call.- Parameters:
listenerSubscription- Listener subscription to be removed
-
removeObjectCreatedListener
void removeObjectCreatedListener(ListenerSubscription listenerSubscription, Continuation<Void> cont) Remove aListenerSubscriptionfor eventObjectCreatedEvent. Asynchronous call. Calls Continuation<Void> when it has been removed.- Parameters:
listenerSubscription- Listener subscription to be removedcont- Continuation to be called when the listener is removed
-
addObjectDestroyedListener
Add aEventListenerfor eventObjectDestroyedEvent. Synchronous call.- Parameters:
listener- Listener to be called on ObjectDestroyedEvent- Returns:
- ListenerSubscription for the given Listener
-
addObjectDestroyedListener
void addObjectDestroyedListener(EventListener<ObjectDestroyedEvent> listener, Continuation<ListenerSubscription> cont) Add aEventListenerfor eventObjectDestroyedEvent. Asynchronous call. Calls Continuation<ListenerSubscription> when it has been added.- Parameters:
listener- Listener to be called on ObjectDestroyedEventcont- Continuation to be called when the listener is registered
-
removeObjectDestroyedListener
Remove aListenerSubscriptionfor eventObjectDestroyedEvent. Synchronous call.- Parameters:
listenerSubscription- Listener subscription to be removed
-
removeObjectDestroyedListener
void removeObjectDestroyedListener(ListenerSubscription listenerSubscription, Continuation<Void> cont) Remove aListenerSubscriptionfor eventObjectDestroyedEvent. Asynchronous call. Calls Continuation<Void> when it has been removed.- Parameters:
listenerSubscription- Listener subscription to be removedcont- Continuation to be called when the listener is removed
-