Interface ServerManager
-
- All Superinterfaces:
KurentoObject
,MediaObject
public interface ServerManager extends MediaObject
This is a standalone object for managing the MediaServer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ListenerSubscription
addObjectCreatedListener(EventListener<ObjectCreatedEvent> listener)
Add aEventListener
for eventObjectCreatedEvent
.void
addObjectCreatedListener(EventListener<ObjectCreatedEvent> listener, Continuation<ListenerSubscription> cont)
Add aEventListener
for eventObjectCreatedEvent
.ListenerSubscription
addObjectDestroyedListener(EventListener<ObjectDestroyedEvent> listener)
Add aEventListener
for eventObjectDestroyedEvent
.void
addObjectDestroyedListener(EventListener<ObjectDestroyedEvent> listener, Continuation<ListenerSubscription> cont)
Add aEventListener
for eventObjectDestroyedEvent
.int
getCpuCount()
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.TFuture<Integer>
getCpuCount(Transaction tx)
Number of CPU cores that the media server can use.ServerInfo
getInfo()
Get Server information, version, modules, factories, etcvoid
getInfo(Continuation<ServerInfo> cont)
Get Server information, version, modules, factories, etcTFuture<ServerInfo>
getInfo(Transaction tx)
Get Server information, version, modules, factories, etcString
getKmd(String moduleName)
Returns 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.TFuture<String>
getKmd(Transaction tx, String moduleName)
Returns the kmd associated to a moduleString
getMetadata()
Get Metadata stored in the servervoid
getMetadata(Continuation<String> cont)
Get Metadata stored in the serverTFuture<String>
getMetadata(Transaction tx)
Get Metadata stored in the serverList<MediaPipeline>
getPipelines()
Get All the pipelines available in the servervoid
getPipelines(Continuation<List<MediaPipeline>> cont)
Get All the pipelines available in the serverTFuture<List<MediaPipeline>>
getPipelines(Transaction tx)
Get All the pipelines available in the serverList<String>
getSessions()
Get All active sessions in the servervoid
getSessions(Continuation<List<String>> cont)
Get All active sessions in the serverTFuture<List<String>>
getSessions(Transaction tx)
Get 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.TFuture<Float>
getUsedCpu(Transaction tx, int interval)
Average CPU usage of the server.long
getUsedMemory()
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.TFuture<Long>
getUsedMemory(Transaction tx)
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 Detail
-
getInfo
ServerInfo getInfo()
Get Server information, version, modules, factories, etc
-
getInfo
void getInfo(Continuation<ServerInfo> cont)
Get Server information, version, modules, factories, etc
-
getInfo
TFuture<ServerInfo> getInfo(Transaction tx)
Get Server information, version, modules, factories, etc
-
getPipelines
List<MediaPipeline> getPipelines()
Get All the pipelines available in the server
-
getPipelines
void getPipelines(Continuation<List<MediaPipeline>> cont)
Get All the pipelines available in the server
-
getPipelines
TFuture<List<MediaPipeline>> getPipelines(Transaction tx)
Get All the pipelines available in the server
-
getSessions
void getSessions(Continuation<List<String>> cont)
Get All active sessions in the server
-
getSessions
TFuture<List<String>> getSessions(Transaction tx)
Get All active sessions in the server
-
getMetadata
String getMetadata()
Get Metadata stored in the server
-
getMetadata
void getMetadata(Continuation<String> cont)
Get Metadata stored in the server
-
getMetadata
TFuture<String> getMetadata(Transaction tx)
Get Metadata stored in the server
-
getKmd
String getKmd(String moduleName)
Returns the kmd associated to a module- Parameters:
moduleName
- Name of the module to get its kmd file- Returns:
- The kmd file. *
-
getKmd
void getKmd(String moduleName, Continuation<String> cont)
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(java.lang.String)
-
getKmd
TFuture<String> getKmd(Transaction tx, String moduleName)
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
void getCpuCount(Continuation<Integer> cont)
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()
-
getCpuCount
TFuture<Integer> getCpuCount(Transaction tx)
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
void getUsedCpu(int interval, Continuation<Float> cont)
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(int)
-
getUsedCpu
TFuture<Float> getUsedCpu(Transaction tx, 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 %. *
-
getUsedMemory
long getUsedMemory()
Returns the amount of memory that the server is using, in KiB- Returns:
- Used memory, in KiB. *
-
getUsedMemory
void getUsedMemory(Continuation<Long> cont)
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()
-
getUsedMemory
TFuture<Long> getUsedMemory(Transaction tx)
Returns the amount of memory that the server is using, in KiB- Returns:
- Used memory, in KiB. *
-
addObjectCreatedListener
ListenerSubscription addObjectCreatedListener(EventListener<ObjectCreatedEvent> listener)
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
void removeObjectCreatedListener(ListenerSubscription listenerSubscription)
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
ListenerSubscription addObjectDestroyedListener(EventListener<ObjectDestroyedEvent> listener)
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
void removeObjectDestroyedListener(ListenerSubscription listenerSubscription)
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
-
-