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

public interface IBasicScope extends ICoreObject, IEventObservable
Base interface for all scope objects, including SharedObjects.
Author:
The Red5 Project, Luke Hubbard (luke@codegent.com)
  • 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

      boolean isConnectionAllowed(IConnection conn)
      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

      boolean isScopeAllowed(IScope scope)
      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

      void setSecurityHandlers(Set<IScopeSecurityHandler> securityHandlers)
      Sets the scope security handlers.
      Parameters:
      securityHandlers - scope security handlers