Package org.red5.server.jmx.mxbeans
Interface ScopeMXBean
- All Known Subinterfaces:
GlobalScopeMXBean,WebScopeMXBean
- All Known Implementing Classes:
GlobalScope,RoomScope,Scope,WebScope
An MBean interface for the scope object.
- Author:
- The Red5 Project, Paul Gregoire (mondain@gmail.com)
-
Method Summary
Modifier and TypeMethodDescriptionbooleancreateChildScope(String name) Create child scope with given namevoiddestroy()Destroys scopeintReturn current number of clients connected to the scope.intReturn current number of connections to the scope.intReturn number of currently existing subscopes.Return scope context pathintgetDepth()return scope depthbooleanCheck if scope is enabledintReturn maximum number of clients concurrently connected to the scope.intReturn maximum number of concurrent connections to the scope.intReturn maximum number of concurrently existing subscopes.getPath()Return scope path calculated from parent path and parent scope namebooleanCheck if scope is in running stateReturn set of service handler namesintReturn total number of clients connected to the scope.intReturn total number of connections to the scope.intReturn total number of subscopes created.booleanhasChildScope(String name) Check whether scope has child scope with given namebooleanhasChildScope(ScopeType type, String name) Check whether scope has child scope with given name and typebooleanCheck if scope has a contextbooleanCheck if scope or it's parent has handlerbooleanCheck if scope has parent scopevoidinit()Initialization actions, start if autostart is set tovoidsetAutoStart(boolean autoStart) Setter for autostart flagvoidsetChildLoadPath(String pattern) Setter for child load path.voidsetDepth(int depth) Set scope depthvoidsetEnabled(boolean enabled) Enable or disable scope by setting enable flagvoidSetter for scope namevoidsetPersistenceClass(String persistenceClass) Set scope persistence classbooleanstart()Starts scopevoidstop()Stops scopevoidUnregisters service handler by name
-
Method Details
-
getEnabled
boolean getEnabled()Check if scope is enabled- Returns:
true
if scope is enabled,false
otherwise
-
setEnabled
void setEnabled(boolean enabled) Enable or disable scope by setting enable flag- Parameters:
enabled- Enable flag value
-
getRunning
boolean getRunning()Check if scope is in running state- Returns:
true
if scope is in running state,false
otherwise
-
setAutoStart
void setAutoStart(boolean autoStart) Setter for autostart flag- Parameters:
autoStart- Autostart flag value
-
init
void init()Initialization actions, start if autostart is set totrue
-
start
boolean start()Starts scope- Returns:
true
if scope has handler and it's start method returned true,false
otherwise
-
stop
void stop()Stops scope -
destroy
Destroys scope- Throws:
Exception- on error
-
setPersistenceClass
Set scope persistence class- Parameters:
persistenceClass- Scope's persistence class- Throws:
Exception- java.lang.Exception
-
setChildLoadPath
Setter for child load path. Should be implemented in subclasses?- Parameters:
pattern- Load path pattern
-
hasChildScope
Check whether scope has child scope with given name- Parameters:
name- Child scope name- Returns:
true
if scope has child node with given name,false
otherwise
-
hasChildScope
Check whether scope has child scope with given name and type- Parameters:
type- Child scope typename- Child scope name- Returns:
true
if scope has child node with given name and type,false
otherwise
-
hasContext
boolean hasContext()Check if scope has a context- Returns:
true
if scope has context,false
otherwise
-
getContextPath
String getContextPath()Return scope context path- Returns:
- Scope context path
-
setName
Setter for scope name- Parameters:
name- Scope name
-
getPath
String getPath()Return scope path calculated from parent path and parent scope name- Returns:
- Scope path
-
hasHandler
boolean hasHandler()Check if scope or it's parent has handler- Returns:
true
if scope or it's parent scope has a handler,false
otherwise
-
hasParent
boolean hasParent()Check if scope has parent scope- Returns:
true
if scope has parent scope,false
otherwise`
-
setDepth
void setDepth(int depth) Set scope depth- Parameters:
depth- Scope depth
-
getDepth
int getDepth()return scope depth- Returns:
- Scope depth
-
createChildScope
Create child scope with given name- Parameters:
name- Child scope name- Returns:
true
on success,false
otherwise
-
unregisterServiceHandler
Unregisters service handler by name- Parameters:
name- Service handler name
-
getServiceHandlerNames
Return set of service handler names- Returns:
- Set of service handler names
-
getTotalConnections
int getTotalConnections()Return total number of connections to the scope.- Returns:
- number of connections
-
getMaxConnections
int getMaxConnections()Return maximum number of concurrent connections to the scope.- Returns:
- number of connections
-
getActiveConnections
int getActiveConnections()Return current number of connections to the scope.- Returns:
- number of connections
-
getTotalClients
int getTotalClients()Return total number of clients connected to the scope.- Returns:
- number of clients
-
getMaxClients
int getMaxClients()Return maximum number of clients concurrently connected to the scope.- Returns:
- number of clients
-
getActiveClients
int getActiveClients()Return current number of clients connected to the scope.- Returns:
- number of clients
-
getTotalSubscopes
int getTotalSubscopes()Return total number of subscopes created.- Returns:
- number of subscopes created
-
getMaxSubscopes
int getMaxSubscopes()Return maximum number of concurrently existing subscopes.- Returns:
- number of subscopes
-
getActiveSubscopes
int getActiveSubscopes()Return number of currently existing subscopes.- Returns:
- number of subscopes
-