## org.red5.server.api.so
Interface ISharedObject

All Superinterfaces:
  AttributeStoreMBean, IAttributeStore, IBasicScope, ICastingAttributeStore, ICoreObject, IEventDispatcher, IEventHandler, IEventListener, IEventObservable, IPersistable, IScopeService, IServiceHandlerProvider, ISharedObjectBase, ISharedObjectHandlerProvider, ISharedObjectSecurityService, Iterable<IBasicScope>

All Known Implementing Classes:
  SharedObjectScope

    public interface ISharedObject

extends IBasicScope, ISharedObjectBase, ISharedObjectSecurityService

Serverside access to shared objects.

Author:
  The Red5 Project (red5@osflash.org), Joachim Bauch (jojo@struktur.de)

Field Summary
`static String` `TYPE`

Fields inherited from interface org.red5.server.api.persistence.IPersistable
`TRANSIENT_PREFIX`

Fields inherited from interface org.red5.server.api.so.ISharedObjectSecurityService
`BEAN_NAME`

Method Summary
`void` `acquire()` Prevent shared object from being released.
`ISharedObjectStatistics` `getStatistics()` Return statistics about the shared object.
`boolean` `isAcquired()` Check if shared object currently is acquired.
`void` `release()` Release previously acquired shared object.

Methods inherited from interface org.red5.server.api.IBasicScope
`getDepth, getName, getParent, getPath, getType, hasParent, lock, setKeepDelay, unlock`

Methods inherited from interface org.red5.server.api.ICastingAttributeStore
`getBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttribute`

Methods inherited from interface org.red5.server.api.IAttributeStore
`getAttribute, getAttribute, getAttributeNames, getAttributes, hasAttribute, removeAttribute, removeAttributes, setAttribute, setAttributes, setAttributes`

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`

Methods inherited from interface java.lang.Iterable
`iterator`

Methods inherited from interface org.red5.server.api.persistence.IPersistable
`deserialize, getLastModified, getStore, isPersistent, serialize, setName, setPath, setPersistent, setStore`

Methods inherited from interface org.red5.server.api.so.ISharedObjectBase
`addSharedObjectListener, beginUpdate, beginUpdate, clear, close, endUpdate, getData, getVersion, isLocked, isPersistentObject, lock, removeSharedObjectListener, sendMessage, unlock`

Methods inherited from interface org.red5.server.api.so.ISharedObjectHandlerProvider
`registerServiceHandler, unregisterServiceHandler`

Methods inherited from interface org.red5.server.api.service.IServiceHandlerProvider
`getServiceHandler, getServiceHandlerNames, registerServiceHandler`

Methods inherited from interface org.red5.server.api.so.ISharedObjectSecurityService
`getSharedObjectSecurity, registerSharedObjectSecurity, unregisterSharedObjectSecurity`

Field Detail

### TYPE

    static final String TYPE

See Also:
  Constant Field Values

Method Detail

### acquire

    void acquire()

  Prevent shared object from being released. Each call to `acquire` must be paired with a call to `release` so the SO isn't held forever. This method basically is a noop for persistent SOs as their data is stored and they can be released without losing their contents.

### isAcquired

    boolean isAcquired()

  Check if shared object currently is acquired.

  Returns:
    `true` if the SO is acquired, otherwise `false`

### release

    void release()

  Release previously acquired shared object. If the SO is non-persistent, no more clients are connected the SO isn't acquired any more, the data is released.

### getStatistics

    ISharedObjectStatistics getStatistics()

  Return statistics about the shared object.

  Returns:
    statistics

Copyright © 2006-2010 The Red5 Project