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 TypeMethodDescriptionboolean
createChildScope
(String name) Create child scope with given namevoid
destroy()
Destroys scopeint
Return current number of clients connected to the scope.int
Return current number of connections to the scope.int
Return number of currently existing subscopes.Return scope context pathint
getDepth()
return scope depthboolean
Check if scope is enabledint
Return maximum number of clients concurrently connected to the scope.int
Return maximum number of concurrent connections to the scope.int
Return maximum number of concurrently existing subscopes.getPath()
Return scope path calculated from parent path and parent scope nameboolean
Check if scope is in running stateReturn set of service handler namesint
Return total number of clients connected to the scope.int
Return total number of connections to the scope.int
Return total number of subscopes created.boolean
hasChildScope
(String name) Check whether scope has child scope with given nameboolean
hasChildScope
(ScopeType type, String name) Check whether scope has child scope with given name and typeboolean
Check if scope has a contextboolean
Check if scope or it's parent has handlerboolean
Check if scope has parent scopevoid
init()
Initialization actions, start if autostart is set tovoid
setAutoStart
(boolean autoStart) Setter for autostart flagvoid
setChildLoadPath
(String pattern) Setter for child load path.void
setDepth
(int depth) Set scope depthvoid
setEnabled
(boolean enabled) Enable or disable scope by setting enable flagvoid
Setter for scope namevoid
setPersistenceClass
(String persistenceClass) Set scope persistence classboolean
start()
Starts scopevoid
stop()
Stops scopevoid
Unregisters 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
- 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
-