Interface ServerManager
- All Superinterfaces:
KurentoObject
,MediaObject
-
Method Summary
Modifier and TypeMethodDescriptionAdd aEventListener
for eventObjectCreatedEvent
.void
addObjectCreatedListener
(EventListener<ObjectCreatedEvent> listener, Continuation<ListenerSubscription> cont) Add aEventListener
for eventObjectCreatedEvent
.Add aEventListener
for eventObjectDestroyedEvent
.void
addObjectDestroyedListener
(EventListener<ObjectDestroyedEvent> listener, Continuation<ListenerSubscription> cont) Add aEventListener
for eventObjectDestroyedEvent
.int
Number of CPU cores that the media server can use.void
getCpuCount
(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, etcvoid
getInfo
(Continuation<ServerInfo> cont) Get Server information, version, modules, factories, etcgetInfo
(Transaction tx) Get Server information, version, modules, factories, etcReturns the kmd associated to a modulevoid
getKmd
(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 servervoid
getMetadata
(Continuation<String> cont) Get Metadata stored in the serverGet Metadata stored in the serverGet All the pipelines available in the servervoid
getPipelines
(Continuation<List<MediaPipeline>> cont) Get All the pipelines available in the serverGet All the pipelines available in the serverGet All active sessions in the servervoid
getSessions
(Continuation<List<String>> cont) Get All active sessions in the serverGet All active sessions in the serverfloat
getUsedCpu
(int interval) Average CPU usage of the server.void
getUsedCpu
(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.long
Returns the amount of memory that the server is using, in KiBvoid
getUsedMemory
(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 KiBvoid
removeObjectCreatedListener
(ListenerSubscription listenerSubscription) Remove aListenerSubscription
for eventObjectCreatedEvent
.void
removeObjectCreatedListener
(ListenerSubscription listenerSubscription, Continuation<Void> cont) Remove aListenerSubscription
for eventObjectCreatedEvent
.void
removeObjectDestroyedListener
(ListenerSubscription listenerSubscription) Remove aListenerSubscription
for eventObjectDestroyedEvent
.void
removeObjectDestroyedListener
(ListenerSubscription listenerSubscription, Continuation<Void> cont) Remove aListenerSubscription
for eventObjectDestroyedEvent
.Methods inherited from interface org.kurento.client.KurentoObject
addEventListener, invoke, isCommited, release, release, release, removeEventListener, waitCommited, whenCommited, whenCommited
Methods inherited from interface org.kurento.client.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
Get All active sessions in the server -
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
Returns the kmd associated to a module- Parameters:
moduleName
- Name of the module to get its kmd file- Returns:
- The kmd file. *
-
getKmd
Asynchronous version of getKmd:Continuation.onSuccess(F)
is called when the action is done. If an error occurs,Continuation.onError(java.lang.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(java.lang.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(java.lang.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(java.lang.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 aEventListener
for 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 aEventListener
for 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 aListenerSubscription
for eventObjectCreatedEvent
. Synchronous call.- Parameters:
listenerSubscription
- Listener subscription to be removed
-
removeObjectCreatedListener
void removeObjectCreatedListener(ListenerSubscription listenerSubscription, Continuation<Void> cont) Remove aListenerSubscription
for 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 aEventListener
for 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 aEventListener
for 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 aListenerSubscription
for eventObjectDestroyedEvent
. Synchronous call.- Parameters:
listenerSubscription
- Listener subscription to be removed
-
removeObjectDestroyedListener
void removeObjectDestroyedListener(ListenerSubscription listenerSubscription, Continuation<Void> cont) Remove aListenerSubscription
for 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
-