Package org.red5.server.api.scope
Interface IBasicScope
- All Superinterfaces:
ICoreObject
,IEventDispatcher
,IEventHandler
,IEventListener
,IEventObservable
- All Known Subinterfaces:
IBroadcastScope
,IGlobalScope
,IScope
- All Known Implementing Classes:
BasicScope
,BroadcastScope
,GlobalScope
,RoomScope
,Scope
,WebScope
Base interface for all scope objects, including SharedObjects.
- Author:
- The Red5 Project, Luke Hubbard (luke@codegent.com)
-
Method Summary
Modifier and TypeMethodDescriptionint
getDepth()
Get the scopes depth, how far down the scope tree is it.getName()
Get the name of this scope.Get this scopes parent.getPath()
Get the full absolute path.getStore()
Get the persistable storegetType()
Get the type of the scope.boolean
Does this scope have a parent? You can think of scopes as of tree items where scope may have a parent and children (child).boolean
Provides a means to allow a scope to perform processing on a connection prior to the actual connection attempt or other handling.boolean
isScopeAllowed
(IScope scope) Provides a means to allow a scope to perform processing on another scope prior to additional scope handling.boolean
isValid()
Validates a scope based on its name and typevoid
setKeepDelay
(int keepDelay) Sets the amount of time to keep the scope available after the last disconnect.void
setSecurityHandlers
(Set<IScopeSecurityHandler> securityHandlers) Sets the scope security handlers.Methods inherited from interface org.red5.server.api.event.IEventDispatcher
dispatchEvent
Methods inherited from interface org.red5.server.api.event.IEventHandler
handleEvent
Methods inherited from interface org.red5.server.api.event.IEventListener
notifyEvent
Methods inherited from interface org.red5.server.api.event.IEventObservable
addEventListener, getEventListeners, removeEventListener
-
Method Details
-
hasParent
boolean hasParent()Does this scope have a parent? You can think of scopes as of tree items where scope may have a parent and children (child).- Returns:
- true if this scope has a parent, otherwise false
-
getParent
IScope getParent()Get this scopes parent.- Returns:
- parent scope, or null if this scope doesn't have a parent
-
getDepth
int getDepth()Get the scopes depth, how far down the scope tree is it. The lowest depth is 0x00, the depth of Global scope. Application scope depth is 0x01. Room depth is 0x02, 0x03 and so forth.- Returns:
- the depth
-
getName
String getName()Get the name of this scope. Eg. someroom- Returns:
- the name
-
getStore
IPersistenceStore getStore()Get the persistable store- Returns:
- the store
-
getPath
String getPath()Get the full absolute path. Eg. host / myapp / someroom- Returns:
- absolute scope path
-
getType
ScopeType getType()Get the type of the scope.- Returns:
- type of scope
-
setKeepDelay
void setKeepDelay(int keepDelay) Sets the amount of time to keep the scope available after the last disconnect.- Parameters:
keepDelay
- delay
-
isValid
boolean isValid()Validates a scope based on its name and type- Returns:
- true if both name and type are valid, false otherwise
-
isConnectionAllowed
Provides a means to allow a scope to perform processing on a connection prior to the actual connection attempt or other handling.- Parameters:
conn
- connection- Returns:
- true if connection is allowed and false if it is not allowed
-
isScopeAllowed
Provides a means to allow a scope to perform processing on another scope prior to additional scope handling.- Parameters:
scope
- scope- Returns:
- true if scope is allowed and false if it is not allowed
-
setSecurityHandlers
Sets the scope security handlers.- Parameters:
securityHandlers
- scope security handlers
-