|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScopeMBean
An MBean interface for the scope object.
Method Summary | |
---|---|
boolean |
createChildScope(String name)
Create child scope with given name |
void |
destroy()
Destroys scope |
int |
getActiveClients()
Return current number of clients connected to the scope. |
int |
getActiveConnections()
Return current number of connections to the scope. |
int |
getActiveSubscopes()
Return number of currently existing subscopes. |
IBasicScope |
getBasicScope(String type,
String name)
Return base scope of given type with given name |
Iterator<String> |
getBasicScopeNames(String type)
Return basic scope names iterator |
Set<IClient> |
getClients()
Return set of clients |
Collection<Set<IConnection>> |
getConnections()
Return connection iterator |
IContext |
getContext()
Return scope context. |
String |
getContextPath()
Return scope context path |
int |
getDepth()
return scope depth |
boolean |
getEnabled()
Check if scope is enabled |
IScopeHandler |
getHandler()
Return scope handler or parent's scope handler if this scope doesn't have one |
int |
getMaxClients()
Return maximum number of clients concurrently connected to the scope. |
int |
getMaxConnections()
Return maximum number of concurrent connections to the scope. |
int |
getMaxSubscopes()
Return maximum number of concurrently existing subscopes. |
IScope |
getParent()
Return parent scope |
String |
getPath()
Return scope path calculated from parent path and parent scope name |
Resource |
getResource(String path)
Return resource located at given path |
Resource[] |
getResources(String path)
Return array of resources from path string, usually used with pattern path |
boolean |
getRunning()
Check if scope is in running state |
IScope |
getScope(String name)
Return child scope by name |
Iterator<String> |
getScopeNames()
Return child scope names iterator |
Object |
getServiceHandler(String name)
Return service handler by name |
Set<String> |
getServiceHandlerNames()
Return set of service handler names |
int |
getTotalClients()
Return total number of clients connected to the scope. |
int |
getTotalConnections()
Return total number of connections to the scope. |
int |
getTotalSubscopes()
Return total number of subscopes created. |
boolean |
hasChildScope(String name)
Check whether scope has child scope with given name |
boolean |
hasChildScope(String type,
String name)
Check whether scope has child scope with given name and type |
boolean |
hasContext()
Check if scope has a context |
boolean |
hasHandler()
Check if scope or it's parent has handler |
boolean |
hasParent()
Check if scope has parent scope |
void |
init()
Initialization actions, start if autostart is set to true |
void |
registerServiceHandler(String name,
Object handler)
Register service handler by name |
void |
setAutoStart(boolean autoStart)
Setter for autostart flag |
void |
setChildLoadPath(String pattern)
Setter for child load path. |
void |
setDepth(int depth)
Set scope depth |
void |
setEnabled(boolean enabled)
Enable or disable scope by setting enable flag |
void |
setName(String name)
Setter for scope name |
void |
setPersistenceClass(String persistenceClass)
Set scope persistence class |
boolean |
start()
Starts scope |
void |
stop()
Stops scope |
void |
unregisterServiceHandler(String name)
Unregisters service handler by name |
Method Detail |
---|
boolean getEnabled()
true
if scope is enabled, false
otherwisevoid setEnabled(boolean enabled)
enabled
- Enable flag valueboolean getRunning()
true
if scope is in running state, false
otherwisevoid setAutoStart(boolean autoStart)
autoStart
- Autostart flag valuevoid init()
true
boolean start()
true
if scope has handler and it's start method returned true, false
otherwisevoid stop()
void destroy()
void setPersistenceClass(String persistenceClass) throws Exception
persistenceClass
- Scope's persistence class
Exception
- Exceptionvoid setChildLoadPath(String pattern)
pattern
- Load path patternboolean hasChildScope(String name)
name
- Child scope name
true
if scope has child node with given name, false
otherwiseboolean hasChildScope(String type, String name)
type
- Child scope typename
- Child scope name
true
if scope has child node with given name and type, false
otherwiseIterator<String> getScopeNames()
Set<IClient> getClients()
boolean hasContext()
true
if scope has context, false
otherwiseIContext getContext()
String getContextPath()
void setName(String name)
name
- Scope nameString getPath()
boolean hasHandler()
true
if scope or it's parent scope has a handler, false
otherwiseIScopeHandler getHandler()
IScope getParent()
boolean hasParent()
true
if scope has parent scope, false
otherwise`void setDepth(int depth)
depth
- Scope depthint getDepth()
Resource[] getResources(String path) throws IOException
path
- Resources path
IOException
- I/O exceptionResource getResource(String path)
path
- Resource path
Collection<Set<IConnection>> getConnections()
boolean createChildScope(String name)
name
- Child scope name
true
on success, false
otherwiseIBasicScope getBasicScope(String type, String name)
type
- Scope typename
- Scope name
Iterator<String> getBasicScopeNames(String type)
type
- Scope type
IScope getScope(String name)
name
- Scope name
void registerServiceHandler(String name, Object handler)
name
- Service handler namehandler
- Service handlervoid unregisterServiceHandler(String name)
name
- Service handler nameObject getServiceHandler(String name)
name
- Handler name
Set<String> getServiceHandlerNames()
int getTotalConnections()
int getMaxConnections()
int getActiveConnections()
int getTotalClients()
int getMaxClients()
int getActiveClients()
int getTotalSubscopes()
int getMaxSubscopes()
int getActiveSubscopes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |