Part I.

Red5 Server Documentation

1

1. Annotation Type Anonymous
Annotation for classes that should be serialized without their classname. This should only be used if you know what you're doing and currently is only added to Red5 internal classes.

1.1. Synopsis
}

@Target(value=java.lang.annotation.ElementType.TYPE) @Retention(value=java.lang.annotation.RetentionP

2. Annotation Type DeclarePrivate
Annotation for public methods that should not be callable through RTMP, RTMPT or Remoting.

2.1. Synopsis
}

@Target(value=java.lang.annotation.ElementType.METHOD) @Retention(value=java.lang.annotation.Retentio

3. Annotation Type DeclareProtected
Annotation for public methods that should be protected by a named permission when called through RTMP, RTMPT or Remoting.

3.1. Synopsis

@Target(value=java.lang.annotation.ElementType.METHOD) @Retention(value=java.lang.annotation.Retentio public String permission ; }

3.2. permission
Permission required to execute method.

4. Annotation Type DontSerialize
Annotation for fields that should not be serialized when sending objects to a client.

4.1. Synopsis
}

@Target(value=java.lang.annotation.ElementType.FIELD) @Retention(value=java.lang.annotation.Retention

2

Package org.?red5.?annotations

3

1. Class DataMessage
Message containing data update requests.

1.1. Synopsis

public class DataMessage extends, org.?red5.?compatibility.?flex.?messaging.?messages.?AsyncMessage { // Public Fields public Object identity ;

public int operation ; // Public Constructors public DataMessage(); // Protected Methods protected void addParameters(StringBuilder result); }

Methods inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: addParameters Methods inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: toString Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait Fields inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: correlationId Fields inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: body , clientId , destination , headers , messageId , timestamp , timeToLive

1.2. addParameters(StringBuilder)
protected void addParameters(StringBuilder result);

2. Class SequencedMessage
Response to DataMessage requests.

2.1. Synopsis

public class SequencedMessage extends, org.?red5.?compatibility.?flex.?messaging.?messages.?AsyncMess // Public Fields public String dataMessage ;

4

Package org.?red5.?compatibility.?flex.?data.?messages
public long sequenceId ;

public Object sequenceProxies ;

public long sequenceSize ; // Public Constructors public SequencedMessage(); // Protected Methods protected void addParameters(StringBuilder result); }

Methods inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: addParameters Methods inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: toString Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait Fields inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: correlationId Fields inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: body , clientId , destination , headers , messageId , timestamp , timeToLive See Also
org.red5.compatibility.flex.data.messages.DataMessage

2.2. addParameters(StringBuilder)
protected void addParameters(StringBuilder result);

5

1. Class ArrayCollection
Flex ArrayCollection compatibility class.

1.1. Synopsis
public class ArrayCollection<T> extends, java.?util.?ArrayList implements, java.?util.?Collection, org.?red5.?io.?amf3.?IExternalizable { // Public Constructors public ArrayCollection(); // Public Methods public void readExternal(org.red5.io.amf3.IDataInput input);

public void writeExternal(org.red5.io.amf3.IDataOutput output); }

Methods inherited from java.util.ArrayList: add , addAll , clear , clone , contains , ensureCapacity , get , indexOf , isEmpty , lastIndexOf , remove , removeRange , set , size , toArray , trimToSize Methods inherited from java.util.AbstractList: equals , hashCode , iterator , listIterator , subList Methods inherited from java.util.AbstractCollection: containsAll , removeAll , retainAll , toString Methods inherited from java.lang.Object: finalize , getClass , notify , notifyAll , wait Fields inherited from java.util.AbstractList: modCount See Also Adobe Livedocs (external) [http://livedocs.adobe.com/flex/2/langref/mx/collections/ ArrayCollection.html]

1.2. readExternal(IDataInput)
public void readExternal(org.red5.io.amf3.IDataInput input);

Specified by: Method readExternal in interface IExternalizable Load custom object from stream.

1.3. writeExternal(IDataOutput)
public void writeExternal(org.red5.io.amf3.IDataOutput output);

Specified by: Method writeExternal in interface IExternalizable Store custom object to stream.

6

Package org.?red5.?compatibility.?flex.?messaging.?io

2. Class ObjectProxy
Flex ObjectProxy compatibility class.

2.1. Synopsis
public class ObjectProxy<T,V>implements, java.?util.?Map, org.?red5.?io.?amf3.?IExternalizable { // Public Constructors public ObjectProxy();

public ObjectProxy(java.util.Map<T, V> item); // Public Methods public void clear();

public boolean containsKey(Object name);

public boolean containsValue(Object value);

public java.util.Set<java.util.Map.Entry<T, V>> entrySet();

public V get(Object name);

public boolean isEmpty();

public java.util.Set<T> keySet();

public V put(T name, V value);

public void putAll(java.util.Map values);

public void readExternal(org.red5.io.amf3.IDataInput input);

public V remove(Object name);

public int size();

public String toString();

public java.util.Collection<V> values();

public void writeExternal(org.red5.io.amf3.IDataOutput output); }

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait See Also Adobe Livedocs (external) [http://livedocs.adobe.com/flex/2/langref/mx/utils/ ObjectProxy.html]

7

Package org.?red5.?compatibility.?flex.?messaging.?io

2.2. ObjectProxy()
public ObjectProxy();

Create new empty proxy.

2.3. ObjectProxy(Map<T, V>)
public ObjectProxy(java.util.Map<T, V> item);

Create proxy for given object. Parameters item object to proxy

2.4. containsKey(Object)
public boolean containsKey(Object name);

Specified by: Method containsKey in interface Map Check if proxied object has a given property. Parameters name return

2.5. get(Object)
public V get(Object name);

Specified by: Method get in interface Map Return the value of a property. Parameters name return

2.6. put(T, V)
public V put(T name, V value);

Change a property of the proxied object. Parameters

8

Package org.?red5.?compatibility.?flex.?messaging.?io name value return

2.7. readExternal(IDataInput)
public void readExternal(org.red5.io.amf3.IDataInput input);

Specified by: Method readExternal in interface IExternalizable Load custom object from stream.

2.8. remove(Object)
public V remove(Object name);

Specified by: Method remove in interface Map Remove a property from the proxied object. Parameters name return

2.9. toString()
public String toString();

Return string representation of the proxied object. Parameters return

2.10. writeExternal(IDataOutput)
public void writeExternal(org.red5.io.amf3.IDataOutput output);

Specified by: Method writeExternal in interface IExternalizable Store custom object to stream.

9

1. Class AbstractMessage
Base class for all Flex compatibility messages.

1.1. Synopsis
public class AbstractMessageimplements, java.?io.?Serializable { // Public Fields public Object body ;

public String clientId ;

public String destination ;

public java.util.Map headers ;

public String messageId ;

public long timeToLive ;

public long timestamp ; // Public Constructors public AbstractMessage(); // Public Methods public String toString(); // Protected Methods protected void addParameters(StringBuilder result); }

Direct known subclasses: org.?red5.?compatibility.?flex.?messaging.?messages.?
AsyncMessage

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

1.2. AbstractMessage()
public AbstractMessage();

Initialize default message fields.

1.3. addParameters(StringBuilder)
protected void addParameters(StringBuilder result);

Add message properties to string.

10

Package org.?red5.?compatibility.?flex.?messaging.?messages Parameters result
StringBuilder

to add properties to

1.4. toString()
public String toString();

Return string representation of the message. Parameters return

2. Class AcknowledgeMessage
Flex compatibility message that is returned to the client.

2.1. Synopsis

public class AcknowledgeMessage extends, org.?red5.?compatibility.?flex.?messaging.?messages.?AsyncMe // Public Constructors public AcknowledgeMessage(); }

Methods inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: addParameters Methods inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: toString Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait Fields inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: correlationId Fields inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: body , clientId , destination , headers , messageId , timestamp , timeToLive

3. Class AsyncMessage
Base class for for asynchronous Flex compatibility messages.

3.1. Synopsis

public class AsyncMessage extends, org.?red5.?compatibility.?flex.?messaging.?messages.?AbstractMessa // Public Fields

11

Package org.?red5.?compatibility.?flex.?messaging.?messages
public String correlationId ; // Public Constructors public AsyncMessage(); // Protected Methods protected void addParameters(StringBuilder result); }

Direct known subclasses: org.?red5.?compatibility.?flex.?data.?messages.? DataMessage , org.?red5.?compatibility.?flex.?data.?messages.?SequencedMessage , org.?red5.?compatibility.?flex.?messaging.?messages.?AcknowledgeMessage , org.? red5.?compatibility.?flex.?messaging.?messages.?CommandMessage , org.?red5.? compatibility.?flex.?messaging.?messages.?ErrorMessage , org.?red5.?compatibility.?
flex.?messaging.?messages.?RemotingMessage

Methods inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: addParameters ,
toString

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait Fields inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: body , clientId , destination , headers , messageId , timestamp , timeToLive

3.2. correlationId
public String correlationId ;

Id of message this message belongs to.

3.3. addParameters(StringBuilder)
protected void addParameters(StringBuilder result);

4. Class CommandMessage
Command message as sent by the mx:RemoteObject tag.

4.1. Synopsis

public class CommandMessage extends, org.?red5.?compatibility.?flex.?messaging.?messages.?AsyncMessag // Public Fields public String messageRefType ;

public int operation ; // Public Constructors

12

Package org.?red5.?compatibility.?flex.?messaging.?messages
public CommandMessage(); // Protected Methods protected void addParameters(StringBuilder result); }

Methods inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: addParameters Methods inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: toString Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait Fields inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: correlationId Fields inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: body , clientId , destination , headers , messageId , timestamp , timeToLive See Also osflash documentation (external) [http://osflash.org/documentation/amf3] , Adobe Livedocs (external) [http://livedocs.adobe.com/flex/2/langref/mx/rpc/remoting/mxml/ RemoteObject.html]

4.2. operation
public int operation ;

Command id to execute.

4.3. addParameters(StringBuilder)
protected void addParameters(StringBuilder result);

5. Class Constants
Constants for the flex compatibility messages.

5.1. Synopsis
public class Constants { // Public Static Fields public static final int DATA_OPERATION_SET = 10;

public static final int DATA_OPERATION_UPDATE = 7;

public static final int DATA_OPERATION_UPDATE_ATTRIBUTES = 3;

13

Package org.?red5.?compatibility.?flex.?messaging.?messages
public static final String HEADER_ENDPOINT = "DSEndpoint";

public static final int OPERATION_AUTHENTICATION = 8;

public static final int OPERATION_PING = 5;

public static final int OPERATION_POLL = 2;

public static final int OPERATION_REGISTER = 0; // Public Constructors public Constants(); }

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

5.2. DATA_OPERATION_SET
public static final int DATA_OPERATION_SET = 10;

Set all attributes from a data message.

5.3. DATA_OPERATION_UPDATE
public static final int DATA_OPERATION_UPDATE = 7;

Update destination based on nested DataMessage packet.

5.4. DATA_OPERATION_UPDATE_ATTRIBUTES
public static final int DATA_OPERATION_UPDATE_ATTRIBUTES = 3;

Update given attributes from a data message.

5.5. HEADER_ENDPOINT
public static final String HEADER_ENDPOINT = "DSEndpoint";

Header field that holds the name of the endpoint.

5.6. OPERATION_AUTHENTICATION
public static final int OPERATION_AUTHENTICATION = 8;

Operation id of authentication commands.

5.7. OPERATION_PING
public static final int OPERATION_PING = 5;

14

Package org.?red5.?compatibility.?flex.?messaging.?messages Operation id of ping commands.

5.8. OPERATION_POLL
public static final int OPERATION_POLL = 2;

Operation id of poll command.

5.9. OPERATION_REGISTER
public static final int OPERATION_REGISTER = 0;

Operation id of register command.

6. Class ErrorMessage
Compatibility flex error message to be returned to the client.

6.1. Synopsis
public class ErrorMessage extends, org.?red5.?compatibility.?flex.?messaging.?messages.?AsyncMessage // Public Fields public Object extendedData ;

public String faultCode ;

public String faultDetail ;

public String faultString ;

public Object rootCause ; // Public Constructors public ErrorMessage(); }

Methods inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: addParameters Methods inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: toString Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait Fields inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: correlationId Fields inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: body , clientId , destination , headers , messageId , timestamp , timeToLive

15

Package org.?red5.?compatibility.?flex.?messaging.?messages

7. Class RemotingMessage
Flex compatibility message that is sent by the mx:RemoteObject mxml tag.

7.1. Synopsis

public class RemotingMessage extends, org.?red5.?compatibility.?flex.?messaging.?messages.?AsyncMessa // Public Fields public String operation ;

public String source ; // Public Constructors public RemotingMessage(); // Protected Methods protected void addParameters(StringBuilder result); }

Methods inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: addParameters Methods inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: toString Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait Fields inherited from org.red5.compatibility.flex.messaging.messages.AsyncMessage: correlationId Fields inherited from org.red5.compatibility.flex.messaging.messages.AbstractMessage: body , clientId , destination , headers , messageId , timestamp , timeToLive See Also osflash documentation (external) [http://osflash.org/documentation/amf3]

7.2. operation
public String operation ;

Method to execute.

7.3. source
public String source ;

16

Package org.?red5.?compatibility.?flex.?messaging.?messages Value of the source attribute of mx:RemoteObject that sent the message.

7.4. addParameters(StringBuilder)
protected void addParameters(StringBuilder result);

17

1. Class BaseStreamableFileService
Base class for streamable file services.

1.1. Synopsis
public abstract class BaseStreamableFileServiceimplements, org.?red5.?io.?IStreamableFileService { // Public Constructors public BaseStreamableFileService(); // Public Methods public boolean canHandle(java.io.File file);

public abstract String getExtension();

public abstract String getPrefix();

public abstract IStreamableFile getStreamableFile(java.io.File file) throws IOException;

public String prepareFilename(String name); }

Direct known subclasses: org.?red5.?io.?flv.?impl.?FLVService , org.?red5.?io.?
mp3.?impl.?MP3Service

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

1.2. canHandle(File)
public boolean canHandle(java.io.File file);

Specified by: Method canHandle in interface IStreamableFileService Check whether file can be used by file service, that is, it does exist and have valid extension

1.3. getExtension()
public abstract String getExtension();

Specified by: Method getExtension in interface IStreamableFileService Getter for extension of file

1.4. getPrefix()
public abstract String getPrefix();

18

Package org.?red5.?io Specified by: Method getPrefix in interface IStreamableFileService Getter for prefix. Prefix is used in filename composition to fetch real file name.

1.5. getStreamableFile(File)
public abstract IStreamableFile getStreamableFile(java.io.File file) throws IOException;

Specified by: Method getStreamableFile in interface IStreamableFileService Return streamable file reference. For FLV files returned streamable file already has generated metadata injected.

1.6. prepareFilename(String)
public String prepareFilename(String name);

Specified by: Method prepareFilename in interface IStreamableFileService Prepair given string to conform filename requirements, for example, add extension to the end if missing.

2. Class BufferType
Buffer types (auto, direct or heap).

2.1. Synopsis
public final class BufferType extends, java.?lang.?Enum { // Public Static Fields public static final BufferType AUTO ;

public static final BufferType DIRECT ;

public static final BufferType HEAP ; // Public Static Methods public static BufferType valueOf(String name);

public static BufferType[] values(); }

Methods inherited from java.lang.Enum: clone , compareTo , equals , finalize , getDeclaringClass , hashCode , name , ordinal , toString , valueOf Methods inherited from java.lang.Object: getClass , notify , notifyAll , wait

3. Class CachingFileKeyFrameMetaCache
19

Package org.?red5.?io

public class CachingFileKeyFrameMetaCache extends, org.?red5.?io.?FileKeyFrameMetaCache { // Public Constructors public CachingFileKeyFrameMetaCache(); // Public Methods public org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta loadKeyFrameMeta(java.io.File file);

public void saveKeyFrameMeta(java.io.File file, org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta meta);

public void setMaxCacheEntry(int maxCacheEntry); }

Methods inherited from org.red5.io.FileKeyFrameMetaCache: loadKeyFrameMeta ,
saveKeyFrameMeta

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

4. Class FileKeyFrameMetaCache
File-based keyframe metadata cache.

4.1. Synopsis
public class FileKeyFrameMetaCacheimplements, org.?red5.?io.?IKeyFrameMetaCache { // Public Constructors public FileKeyFrameMetaCache(); // Public Methods public org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta loadKeyFrameMeta(java.io.File file);

public void saveKeyFrameMeta(java.io.File file, org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta meta); }

Direct known subclasses: org.?red5.?io.?CachingFileKeyFrameMetaCache Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

4.2. loadKeyFrameMeta(File)
public org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta loadKeyFrameMeta(java.io.File file);

Specified by: Method loadKeyFrameMeta in interface IKeyFrameMetaCache

20

Package org.?red5.?io Load keyframe informations for the given file.

4.3. saveKeyFrameMeta(File, IKeyFrameDataAnalyzer.KeyFrameMeta)
public void saveKeyFrameMeta(java.io.File file, org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta meta);

Specified by: Method saveKeyFrameMeta in interface IKeyFrameMetaCache Store keyframe informations for the given file.

5. Interface IKeyFrameMetaCache
Interface defining a cache for keyframe metadata informations.

5.1. Synopsis
public interface IKeyFrameMetaCache { // Public Methods public org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta loadKeyFrameMeta(java.io.File file);

public void saveKeyFrameMeta(java.io.File file, org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta meta); }

5.2. loadKeyFrameMeta(File)
public org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta loadKeyFrameMeta(java.io.File file);

Load keyframe informations for the given file. Parameters file return File to load informations for. The keyframe informations or null if none exist.

5.3. saveKeyFrameMeta(File, IKeyFrameDataAnalyzer.KeyFrameMeta)
public void saveKeyFrameMeta(java.io.File file, org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta meta);

Store keyframe informations for the given file. Parameters file meta File to save informations for. Keyframe informations for this file.

6. Interface IStreamableFile
21

Package org.?red5.?io

Interface represents streamable file with tag reader and writers (one for plain mode and one for append)

6.1. Synopsis
public interface IStreamableFile { // Public Methods public ITagWriter getAppendWriter() throws IOException;

public ITagReader getReader() throws IOException;

public ITagWriter getWriter() throws IOException; }

6.2. getAppendWriter()
public ITagWriter getAppendWriter() throws IOException;

Returns a Writer which is setup to append to the file. Parameters return
java.io.IOException

the writer Tag writer used for append mode

I/O exception

6.3. getReader()
public ITagReader getReader() throws IOException;

Returns a reader to parse and read the tags inside the file. Parameters return
java.io.IOException

the reader Tag reader

I/O exception

6.4. getWriter()
public ITagWriter getWriter() throws IOException;

Returns a writer that creates a new file or truncates existing contents.

22

Package org.?red5.?io Parameters return
java.io.IOException

the writer Tag writer

I/O exception

7. Interface IStreamableFileFactory
Scope service extension that provides method to get streamable file services set

7.1. Synopsis
public interface IStreamableFileFactory extends, org.?red5.?server.?api.?IScopeService { // Public Static Fields public static final String BEAN_NAME = "streamableFileFactory"; // Public Methods public IStreamableFileService getService(java.io.File fp);

public java.util.Set<org.red5.io.IStreamableFileService> getServices(); }

7.2. getServices()
public java.util.Set<org.red5.io.IStreamableFileService> getServices();

Getter for services Parameters return Set of streamable file services

8. Interface IStreamableFileService
Provides access to files that can be streamed.

8.1. Synopsis
public interface IStreamableFileService { // Public Methods public boolean canHandle(java.io.File file);

public String getExtension();

public String getPrefix();

public IStreamableFile getStreamableFile(java.io.File file)

23

Parameters file return File resource Streamable file resource 24 .5.2. } 8. getPrefix() public String getPrefix().3. For FLV files returned streamable file already has generated metadata injected. it does exist and have valid extension Parameters file return File object true if file exist and has valid extension.?red5. Check whether file can be used by file service. public String prepareFilename(String name). that is. Prefix is used in filename composition to fetch real file name.Package org.File file). getStreamableFile(File) public IStreamableFile getStreamableFile(java.File file) throws IOException. Getter for extension of file Parameters return File extension that is used 8. getExtension() public String getExtension(). canHandle(File) public boolean canHandle(java.4. false otherwise 8. Return streamable file reference.?io throws IOException. Getter for prefix. Parameters return Prefix 8.io.io.

public byte getDataType().ByteBuffer getBody().mina. public int getPreviousTagSize().ByteBuffer body).common.1. } 9.?io IOException Thrown if there were problems accessing given file 8. Interface ITag A Tag represents the contents or payload of a streamable file. public int getTimestamp().apache. Parameters name return String to format Correct filename 9. public org. public int getBodySize().common. Prepair given string to conform filename requirements. getBody() public org.?red5. Synopsis public interface ITag extends. public void setPreviousTagSize(int size). public void setTimestamp(int timestamp).?IoConstants { // Public Methods public org.ByteBuffer getData().ByteBuffer getBody(). org.common.apache. add extension to the end if missing.mina. 9.Package org. public void setBody(org. for example. 25 .?red5.6.common.mina. public void setBodySize(int size). prepareFilename(String) public String prepareFilename(String name).apache.2. public void setDataType(byte datatype).mina.?io.apache.

?red5. Return the size of the body Parameters return int Body size 9.apache.4. getDataType() public byte getDataType(). Get the data type Parameters return byte Data type as byte 9.mina. getBodySize() public int getBodySize().6.7. getData() public org. Returns the data as a ByteBuffer Parameters return ByteBuffer Data as byte buffer 9. Return the timestamp Parameters 26 .?io Return the body ByteBuffer Parameters return ByteBuffer Body as byte buffer 9. getTimestamp() public int getTimestamp().Package org. getPreviousTagSize() public int getPreviousTagSize().ByteBuffer getData().5.3. Returns previous tag size Parameters return int Previous tag size 9.common.

ByteBuffer body).10. Set the data type.11. Parameters datatype Data type 9. Parameters size Body size 9. Set the size of the body. setDataType(byte) public void setDataType(byte datatype).8. Parameters body Body as ByteBuffer 9.?red5. setBody(ByteBuffer) public void setBody(org. Interface ITagReader 27 .Package org.12. setPreviousTagSize(int) public void setPreviousTagSize(int size). setBodySize(int) public void setBodySize(int size).?io return int Timestamp 9. Set the timestamp. setTimestamp(int) public void setTimestamp(int timestamp). Set the body ByteBuffer.9.apache. Parameters size Previous tag size 9. Parameters timestamp Timestamp 10.common.mina. Set the size of the previous tag.

} 10.3. close() public void close(). public void position(long pos).?io public interface ITagReader { // Public Methods public void close(). public ITag readTag().1. public boolean hasMoreTags(). public long getBytesRead(). Closes the reader and free any allocated memory. public boolean hasVideo(). getBytesRead() public long getBytesRead(). public long getTotalBytes(). public long getDuration().?red5. public IStreamableFile getFile(). decodeHeader() public void decodeHeader().4.Package org. 10. Decode the header of the stream. Returns the amount of bytes read Parameters return long 10. public void decodeHeader().2. public int getOffset(). 10. getDuration() public long getDuration(). 28 .

hasVideo() public boolean hasVideo(). Parameters return the file to be loaded 10. Return the file that is loaded. hasMoreTags() public boolean hasMoreTags().?io Return length in seconds Parameters return 10. Check if the reader also has video tags.6.9. Returns the offet length Parameters return int 10.Package org. Get the total readable bytes in a file or ByteBuffer Parameters return Total readable bytes 10.8. Returns a boolean stating whether the FLV has more tags Parameters return boolean 10. getTotalBytes() public long getTotalBytes().7. getFile() public IStreamableFile getFile().?red5. getOffset() public int getOffset(). Parameters 29 .5.

public IStreamableFile getFile().?red5. public boolean writeTag(ITag tag) throws IOException.?io return 10. position(long) public void position(long pos). org.11. Parameters pos File position to move to 10. readTag() public ITag readTag(). Returns a Tag object Parameters return Tag 11. Move the reader pointer to given position in file.mina. public int getOffset(). } 30 . Interface ITagWriter Writes tags to FLV file 11.10. public boolean writeTag(byte type.apache.Package org. public void writeHeader() throws IOException.common. public long getBytesWritten(). public boolean writeStream(byte[] b).ByteBuffer data) throws IOException. Synopsis public interface ITagWriter { // Public Methods public void close().1.

Package org. Return the file that is written. Write a Stream to disk using bytes Parameters 31 . getFile() public IStreamableFile getFile().5. writeStream(byte[]) public boolean writeStream(byte[] b). getOffset() public int getOffset().7.?red5. Return the offset Parameters return Offset value 11. Return the bytes written Parameters return Number of bytes written 11. Closes a Writer 11. Parameters return the File to be written 11. getBytesWritten() public long getBytesWritten().?io 11.3.2.4. writeHeader() public void writeHeader() throws IOException. close() public void close(). Writes the header bytes IOException I/O exception 11.6.

writeTag(byte. public static final byte FLAG_CODEC_SCREEN = 3.8. Writes a Tag object Parameters tag return IOException Tag to write true on success.?red5. org. false otherwise I/O exception 11.apache.ByteBuffer data) throws IOException. ByteBuffer) public boolean writeTag(byte type. 32 . false otherwise I/O exception 11. false otherwise I/O exception 12.mina. Write a Tag using bytes Parameters type data return IOException Tag type Byte data true on success.1.Package org.9.?io b return IOException Array of bytes to write true on success. Interface IoConstants Constants found in FLV files / streams. Synopsis public interface IoConstants { // Public Static Fields public static final byte FLAG_CODEC_H263 = 2.common. 12. writeTag(ITag) public boolean writeTag(ITag tag) throws IOException.

public static final byte FLAG_TYPE_STEREO = 1. public static final byte TYPE_METADATA = 18. public static final byte FLAG_SIZE_8_BIT = 0. public static final byte FLAG_FORMAT_RAW = 0. public static final byte MASK_SOUND_TYPE = 1. public static final byte FLAG_FRAMETYPE_INTERFRAME = 2.?red5.?io public static final byte FLAG_CODEC_VP6 = 4. public static final byte FLAG_FRAMETYPE_KEYFRAME = 1. public static final byte FLAG_RATE_44_KHZ = 3.Package org. public static final byte FLAG_FORMAT_ADPCM = 1. public static final byte MASK_SOUND_FORMAT = -15. public static final byte FLAG_FORMAT_NELLYMOSER_8_KHZ = 5. public static final byte MASK_SOUND_RATE = 12. public static final byte FLAG_SIZE_16_BIT = 1. public static final byte FLAG_TYPE_MONO = 0. public static final byte FLAG_FRAMETYPE_DISPOSABLE = 3. } 33 . public static final byte FLAG_RATE_11_KHZ = 1. public static final byte FLAG_FORMAT_MP3 = 2. public static final byte TYPE_AUDIO = 8. public static final byte MASK_VIDEO_FRAMETYPE = -15. public static final byte FLAG_RATE_22_KHZ = 2. public static final byte MASK_VIDEO_CODEC = 15. public static final byte TYPE_VIDEO = 9. public static final byte FLAG_FORMAT_NELLYMOSER = 6. public static final byte MASK_SOUND_SIZE = 2. public static final byte FLAG_RATE_5_5_KHZ = 0.

3. FLAG_FORMAT_MP3 public static final byte FLAG_FORMAT_MP3 = 2. Screen codec flag 12. On2 VP6 codec flag 12.6. Raw data format flag 12.5.Package org.9. FLAG_FORMAT_ADPCM public static final byte FLAG_FORMAT_ADPCM = 1. FLAG_FORMAT_NELLYMOSER_8_KHZ public static final byte FLAG_FORMAT_NELLYMOSER_8_KHZ = 5.?io 12.10. NellyMoser-encoded audio format flag 12.?red5. FLAG_FRAMETYPE_DISPOSABLE public static final byte FLAG_FRAMETYPE_DISPOSABLE = 3.8. FLAG_CODEC_SCREEN public static final byte FLAG_CODEC_SCREEN = 3.2. FLAG_FORMAT_NELLYMOSER public static final byte FLAG_FORMAT_NELLYMOSER = 6.7. FLAG_FORMAT_RAW public static final byte FLAG_FORMAT_RAW = 0. MP3 format flag 12. 8 KHz NellyMoser audio format flag 12. Disposable frame type flag 34 .4. H263 codec flag 12. FLAG_CODEC_H263 public static final byte FLAG_CODEC_H263 = 2. FLAG_CODEC_VP6 public static final byte FLAG_CODEC_VP6 = 4. ADPCM format flag 12.

FLAG_FRAMETYPE_INTERFRAME public static final byte FLAG_FRAMETYPE_INTERFRAME = 2. FLAG_SIZE_8_BIT public static final byte FLAG_SIZE_8_BIT = 0.12. 8 bit flag size 12.16. Keyframe type flag 12. 44 KHz rate flag 12. 5. FLAG_RATE_5_5_KHZ public static final byte FLAG_RATE_5_5_KHZ = 0. FLAG_RATE_22_KHZ public static final byte FLAG_RATE_22_KHZ = 2.18. Interframes are created from keyframes rather than independent image 12.?io 12. 16 bit flag size 12.11.Package org. FLAG_RATE_11_KHZ public static final byte FLAG_RATE_11_KHZ = 1.19. Interframe flag.17.?red5.5 KHz rate flag 12. 22 KHz rate flag 12. Mono mode 35 .13.14. FLAG_FRAMETYPE_KEYFRAME public static final byte FLAG_FRAMETYPE_KEYFRAME = 1. 11 KHz rate flag 12. FLAG_SIZE_16_BIT public static final byte FLAG_SIZE_16_BIT = 1.15. FLAG_TYPE_MONO public static final byte FLAG_TYPE_MONO = 0. FLAG_RATE_44_KHZ public static final byte FLAG_RATE_44_KHZ = 3.

26. Mask sound rate 12.23. MASK_VIDEO_CODEC public static final byte MASK_VIDEO_CODEC = 15. MASK_SOUND_SIZE public static final byte MASK_SOUND_SIZE = 2. Mask video codec 12. FLAG_TYPE_STEREO public static final byte FLAG_TYPE_STEREO = 1. Audio data 12.27.20. Mask sound size 12. MASK_VIDEO_FRAMETYPE public static final byte MASK_VIDEO_FRAMETYPE = -15. Metadata 36 . TYPE_AUDIO public static final byte TYPE_AUDIO = 8.25.?io 12. Mask sound format (unsigned) 12.Package org. Stereo mode 12. MASK_SOUND_RATE public static final byte MASK_SOUND_RATE = 12. MASK_SOUND_TYPE public static final byte MASK_SOUND_TYPE = 1.22.24. Video frametype flag 12. TYPE_METADATA public static final byte TYPE_METADATA = 18.28. Mask sound type 12.?red5.21. MASK_SOUND_FORMAT public static final byte MASK_SOUND_FORMAT = -15.

red5.29. notify . toString .Package org. equals . wait 13.File fp).IStreamableFileService> getServices(). } Methods inherited from java. Synopsis public class StreamableFileFactoryimplements.red5.slf4j. public java. Setter for services 37 .io.util. getServices() public java.Set<org.red5.util.Logger logger .?io. finalize .?red5. hashCode .IStreamableFileService> services). Video data 13.io. notifyAll .util.io.?IStreamableFileFactory { // Public Static Fields public static org. public void setServices(java.1. Class StreamableFileFactory Creates streamable file services 13.4. getClass .Set<org. TYPE_VIDEO public static final byte TYPE_VIDEO = 9.red5. // Public Methods public IStreamableFileService getService(java.IStreamableFileService> getServices().2.Object: clone .io.Set<org. // Public Constructors public StreamableFileFactory(). Specified by: Method getServices in interface IStreamableFileFactory Getter for services 13. setServices(Set<IStreamableFileService>) public void setServices(java.lang. getService(File) public IStreamableFileService getService(java.io.File fp).Set<org. org.?red5. Specified by: Method getService in interface IStreamableFileFactory 13.IStreamableFileService> services).util.?io 12.io.3.

Package org.?red5.?io Parameters services Set of streamable file services 38 .

public static final byte TYPE_UNSUPPORTED = 13. 39 . public static final byte TYPE_CLASS_OBJECT = 16. public static final byte TYPE_DATE = 11.nio. Synopsis public class AMF { // Public Static Fields public static final java. public static final byte TYPE_STRING = 2. public static final byte TYPE_MIXED_ARRAY = 8. public static final byte VALUE_FALSE = 0. public static final byte TYPE_NULL = 5. public static final byte TYPE_RECORDSET = 14. public static final byte TYPE_END_OF_OBJECT = 9. public static final byte TYPE_REFERENCE = 7. 1. public static final byte TYPE_NUMBER = 0.charset. public static final byte TYPE_MOVIECLIP = 4. public static final byte TYPE_BOOLEAN = 1. public static final byte TYPE_OBJECT = 3.Charset CHARSET .1. public static final byte TYPE_AMF3_OBJECT = 17. public static final int LONG_STRING_LENGTH = 65535. public static final byte TYPE_XML = 15. public static final byte TYPE_ARRAY = 10. public static final byte TYPE_LONG_STRING = 12. public static final byte TYPE_UNDEFINED = 6. For detailed specification please see the link below.1. Class AMF These are the core AMF data types supported by Red5. public static final byte VALUE_TRUE = 1.

notify .org/amf/astypes] 1. Date marker constant 40 . wait See Also AMF specification (external) [http://osflash.5.4.?io.3. getClass .7. equals .8. Class marker constant 1. TYPE_CLASS_OBJECT public static final byte TYPE_CLASS_OBJECT = 16. TYPE_ARRAY public static final byte TYPE_ARRAY = 10.6.Charset CHARSET . Object marker constant (for AMF3) 1.charset. TYPE_AMF3_OBJECT public static final byte TYPE_AMF3_OBJECT = 17. notifyAll . LONG_STRING_LENGTH public static final int LONG_STRING_LENGTH = 65535.Package org. UTF-8 is used 1. Max string lenght constant 1.?red5.?amf // Public Constructors public AMF(). TYPE_DATE public static final byte TYPE_DATE = 11. } Methods inherited from java. toString . hashCode .lang. Boolean value marker constant 1. finalize .2. Array marker constant 1.Object: clone . TYPE_BOOLEAN public static final byte TYPE_BOOLEAN = 1.nio. CHARSET public static final java.

17. Long string marker constant 1.10.9. Recordset marker constant 1. MovieClip marker constant 1.12.11. TYPE_MIXED_ARRAY public static final byte TYPE_MIXED_ARRAY = 8. Mixed array marker constant 1. TYPE_LONG_STRING public static final byte TYPE_LONG_STRING = 12. Null marker constant 1. TYPE_NUMBER public static final byte TYPE_NUMBER = 0. TYPE_MOVIECLIP public static final byte TYPE_MOVIECLIP = 4. TYPE_NULL public static final byte TYPE_NULL = 5. TYPE_END_OF_OBJECT public static final byte TYPE_END_OF_OBJECT = 9.Package org.14. TYPE_REFERENCE public static final byte TYPE_REFERENCE = 7. Object marker constant 1.15.13. Object reference marker constant 41 .16.?red5.?amf 1. Number marker constant 1.?io. TYPE_RECORDSET public static final byte TYPE_RECORDSET = 14. End of object marker constant 1. TYPE_OBJECT public static final byte TYPE_OBJECT = 3.

Synopsis public class Input extends.?amf 1.20.?io.?red5.23. XML marker constant 1.21. TYPE_UNDEFINED public static final byte TYPE_UNDEFINED = 6.ByteBuffer buf).?io.mina.Package org.apache. protected static org. protected byte currentDataType . String marker constant 1. // Public Constructors public Input(org.common. org.?object.?object. VALUE_TRUE public static final byte VALUE_TRUE = 1.?BaseInput implements.?io.?Input { // Protected Fields protected org. org.18.mina.slf4j.common.19. Class Input Input for Red5 data types 2. false marker constant 1. TYPE_UNSUPPORTED public static final byte TYPE_UNSUPPORTED = 13.Logger log . VALUE_FALSE public static final byte VALUE_FALSE = 0. 42 .1.ByteBuffer buf . true marker constant 2.apache. Unsupported type marker constant 1.22.?red5.?red5. TYPE_STRING public static final byte TYPE_STRING = 2. Undefined marker constant 1. TYPE_XML public static final byte TYPE_XML = 15.

public byte readDataType().object.ReferenceMode mode).Deserializer deserializer).red5.Map<java. public void skipPropertySeparator().ByteBuffer buf).red5.object. public java.Deserializer deserializer).mina.Package org. public void reset(). protected Object newInstance(String className). public void reset(org.util. public Object readReference().common.red5. public org.?amf // Public Static Methods public static String getString(org. 43 .red5. // Public Methods public String getString(). public Object readNull().io.?io. protected Object readBean(org.lang.object.dom.util.io. public boolean hasMoreProperties().object.io. public void skipEndObject().ByteArray readByteArray(). Object bean).Deserializer deserializer.object. public org.String.io.BaseInput.io.w3c. public Object readCustom().lang.Object> readKeyValues(org.Deserial public Object readMap(org. java.io.apache. public Number readNumber(). public Boolean readBoolean().Document readXML().red5. public String readPropertyName(). // Protected Methods protected Class getPropertyType(Object instance.amf. String propertyName).io.Deserializer deserializer).red5. public Object readArray(org.object. public java.red5.Date readDate().io.red5.org. public String readString().amf3. public Object readObject(org.?red5.

BaseInput: clearReferences . equals .red5.Map<java. getClass .apache. Returns a string based on the buffer Parameters buf Byte buffer with data 44 .lang. getString() public String getString(). java.Package org.lang.common.object. refId . finalize .lang.object.Object> result.io.BaseInput: referenceMode . storeReference Methods inherited from java.lang.Object> readSimpleObject(org.io. notifyAll .String. toString . protected void readKeyValues(java. getReference .?amf protected byte readDataType(byte dataType). protected java.?io.apache.object.common. java.ByteBuffer buf).object.ByteBuffer buf).io. refMap 2.io.mina. wait Fields inherited from org. Input(ByteBuffer) public Input(org.util.red5.?io.Object: clone . org.?red5. Specified by: Method getString in interface Input Reads string from buffer Parameters return String 2.red5. Creates Input object from byte buffer Parameters buf Byte buffer 2.red5.4.Deserializer deserializer).2. getString(ByteBuffer) public static String getString(org.De } Direct known subclasses: org.3.mina.util.Map<java. hashCode .String. notify .?amf3.lang.?Input Methods inherited from org.?red5.

object. Parameters return array Description copied from interface: readArray 2.red5.Deserializer deserializer).5. hasMoreProperties() public boolean hasMoreProperties().red5.Deserializer deserializer. This can result in a List or Map being deserialized depending on the array type found. newInstance(String) protected Object newInstance(String className). readBean(Deserializer. readArray(Deserializer) public Object readArray(org. Reads the input as a bean and returns an object Parameters deserializer bean return Deserializer used Input as bean Decoded object 45 . Creats a new instance of the className parameter and returns as an Object Parameters className return Class name as String Object New object instance (for given class) 2.object.?red5. Returns a boolean stating whether there are more properties Parameters return boolean true if there are more properties to read.7. Specified by: Method readArray in interface Input Read an array. false otherwise 2.6. Object) protected Object readBean(org.io.io.?amf return String Decoded string 2.8.Package org. Object bean).?io.

io.?amf 2. This is not supported by the AMF0 deserializer. readByteArray() public org.12. Specified by: Method readCustom in interface Input Reads Custom Parameters return Object Custom type object 2. readDataType() public byte readDataType().Package org. readDataType(byte) protected byte readDataType(byte dataType). Parameters return ByteArray object 2. Parameters return boolean 2.io.13.amf.?red5. Specified by: Method readByteArray in interface Input Read ByteArray object.11.red5.9. readCustom() public Object readCustom(). readBoolean() public Boolean readBoolean(). Specified by: Method readBoolean in interface Input Reads a boolean. Specified by: Method readDataType in interface Input Reads the data type. Parameters return byte Data type 2.amf3. Reads the data type.ByteArray readByteArray().?io. 46 .10.red5.org.

readMap(Deserializer) public Object readMap(org.Date readDate().?red5.Deserializ Specified by: Method readKeyValues in interface Input Read key . java.red5.15.Map<java.?io.io.Deserializer deserializer).red5. This is required for the RecordSet deserializer.amf.object.object. readKeyValues(Map<String.?amf Parameters dataType return Data type as byte One of AMF class constants with type See Also org.util.io. Read key .value pairs. Specified by: Method readDate in interface Input Returns a date Parameters return Date Decoded string object 2.17.util.Deserializer deserializer). Object>. Deserializer) protected void readKeyValues(java.14.value pairs into Map object Parameters result deserializer Map to put resulting pair to Deserializer used 2. readKeyValues(Deserializer) public java.lang.Package org.red5.Object> result.lang.lang.red5. org.value pairs. Specified by: Method readMap in interface Input Read a map containing key .lang.util.String.AMF} 2. This can result in a List or Map being deserialized depending on the map type found. java.Map<java. 2. Parameters return Map 47 .object.String. readDate() public java.Object> readKeyValues(org.16.io.io.

red5. Parameters return Object 2. readObject(Deserializer) public Object readObject(org. Specified by: Method readObject in interface Input Reads start object Parameters deserializer return Deserializer to use Read object 2.?io. In ActionScript 1 and 2 Number type represents all numbers. Specified by: Method readNull in interface Input Reads a null. Reads property name Parameters return String Object property name 2. Parameters return Number 2.object.22.?red5.20. readNull() public Object readNull(). both floats and integers.18. readNumber() public Number readNumber(). Specified by: Method readNumber in interface Input Reads a Number.21. readPropertyName() public String readPropertyName().Package org.Deserializer deserializer).io.19. readReference() public Object readReference(). 48 .?amf Description copied from interface: readMap 2.

Specified by: Method readString in interface Input Reads a string Parameters return String 2.26.Map<java. 49 .object.Dese Reads the input as a map and returns a Map Parameters deserializer return Deserializer to use Read map 2.?red5. reset() public void reset(). readXML() public org. Specified by: Method readXML in interface Input Reads XML Parameters return String XML as string 2.27.w3c.Package org.object.23.lang. reset(BaseInput. readSimpleObject(Deserializer) protected java.?amf Specified by: Method readReference in interface Input Reads Reference Parameters return Object Read reference to object 2.red5.red5.24.io.ReferenceMode) public void reset(org.25.dom.util.lang.Document readXML().BaseInput.ReferenceMode mode).?io.io. java.Object> readSimpleObject(org. Resets map 2.String. readString() public String readString().

?io.Serializer serializer). skipPropertySeparator() public void skipPropertySeparator().red5.util.object. 50 .?object.ByteBuffer buf).Serializer serializer).common. public void reset(). // Public Constructors public Output(org.Map<java.object.ByteBuffer buf(). org.?Output { // Protected Fields protected org. Skips end object 2. org. // Public Methods public org.mina.mina.?BaseOutput implements. public void putString(String string).common.?io.ByteBuffer buf.?red5. protected static final java.apache.apache. public boolean supportsDataType(byte type).?io. Skips property seperator 3.Package org.slf4j.28.mina.ByteBuffer buf .lang.Logger log .?object. Class Output public class Output extends.io.common.29. protected static org. org. skipEndObject() public void skipEndObject().?red5. // Public Static Methods public static void putString(org.red5.apache.mina. String string).?amf Resets map and set mode to handle references Parameters mode mode to handle references 2. public void writeArray(Object array.common.?red5.io.apache. byte[]> stringCache . public boolean isCustom(Object custom). public void writeArray(Object[] array. org.String.

util.?io.io. public void writeObject(java. org.?amf3.io.org.object. } Direct known subclasses: org. toString . notify .object.?Output Methods inherited from org.object. equals . public void writeNull(). org. public void writeRecordSet(org.object. org.io.object.red5. public void writeXML(org. finalize .Serializer serializer).Object.Serializer serializer).red5.Serializer serializer). java.io.red5.red5.object.red5.?io.Map<java. public void writeBoolean(Boolean bol).Collection<?> array.object.util. public void writeReference(Object obj). getReferenceId . getClass .Object> map. storeReference Methods inherited from java.lang.Object> map. org.io.red5. // Protected Methods protected boolean checkWriteReference(Object obj).io.lang. java.red5. public void writeDate(java. hashCode .red5.object. protected void writeArbitraryObject(Object object. notifyAll . protected boolean dontSerializeField(Class<?> objectClass.amf. org.object.io.red5.RecordSet recordset.lang.?amf public void writeArray(java.Object: clone .?red5.io.amf3. org. protected static byte[] encodeString(String string).dom. hasReference .io.?red5. public void writeMap(java.Object.Document xml).red5.util.Collection<?> array.Serializer serializer).ByteArray array).lang.red5.Serializer serializer).Package org.util.util.io.w3c.io. public void writeNumber(Number num).Serializer serializer).lang. public void writeObject(Object object. public void writeString(String string).Map<java. String keyName). public void writeByteArray(org.BaseOutput: clearReferences . public void writeMap(java. public void writeCustom(Object custom).Serializer serializer).Date date). org. wait 51 .

stringCache protected static final java. Output(ByteBuffer) public Output(org. Output buffer 3. Parameters string return encoded string 3. Return buffer of this Output object Parameters return Byte buffer of this Output object 3. Encode string.3.Map<java.String.apache.1.ByteBuffer buf .?amf Fields inherited from org.?io.ByteBuffer buf).BaseOutput: refId . 3.ByteBuffer buf().lang.mina.?red5.4. Cache encoded strings. buf() public org.mina. refMap 3.apache. encodeString(String) protected static byte[] encodeString(String string).apache.common.io.5.6.object. Creates output with given byte buffer Parameters buf Bute buffer 3.common.mina. isCustom(Object) public boolean isCustom(Object custom).common. Specified by: Method isCustom in interface Output 52 .util. byte[]> stringCache .2. buf protected org.Package org.red5.

String) public static void putString(org. Parameters serializer object Output writer Object to write 3. Writes an arbitrary object to the output. writeArbitraryObject(Object.io.Serializer serializer).ByteBuffer buf.red5. Specified by: Method writeArray in interface Output 53 .Serializer serializer).io. Write out string Parameters buf string Byte buffer to write to String to write 3. Serializer) protected void writeArbitraryObject(Object object.11. 3.object.Collection<?> array.7.red5. org.Package org.object.9.mina.?io. org. Specified by: Method supportsDataType in interface Output 3. supportsDataType(byte) public boolean supportsDataType(byte type).common.?amf Whether object is custom 3. Serializer) public void writeArray(java. Specified by: Method writeArray in interface Output Write array. String string). Specified by: Method putString in interface Output 3.red5. org. writeArray(Collection<?>. Serializer) public void writeArray(Object[] array.apache. writeArray(Object[].12.io.8.util.object.?red5. putString(String) public void putString(String string).10.Serializer serializer). putString(ByteBuffer.

io. Specified by: Method writeDate in interface Output Write date 3. Object>. Serializer) public void writeMap(java.util.red5.ByteArray array).19. writeBoolean(Boolean) public void writeBoolean(Boolean bol).util.Serializer serializer).org. Serializer) public void writeMap(java. writeMap(Map<Object.Collection<?> array. Specified by: Method writeCustom in interface Output Write custom (user) object 3. Specified by: Method writeBoolean in interface Output Write boolean 3.io. Specified by: Method writeMap in interface Output Write array as map.Object.Object> map.Serializer serializer).red5. java. org. Serializer) public void writeArray(Object array. org.red5.14.13.?red5. writeArray(Object. 3.amf.18. writeMap(Collection<?>.util.Serializer serializer). writeByteArray(ByteArray) public void writeByteArray(org.lang. org. 3.amf3. writeDate(Date) public void writeDate(java.io. 3.object. Specified by: Method writeByteArray in interface Output Write ByteArray object (AMF3 only).lang. 54 .red5.Date date).15.object.?io.?amf Write array.Map<java.object. Specified by: Method writeArray in interface Output Write primitive array. 3.io. writeCustom(Object) public void writeCustom(Object custom).red5.io.16.17.Package org.

Map<java. java.object. Serializer) public void writeRecordSet(org. Specified by: Method writeNumber in interface Output Write number 3.lang. 55 .20.Serializer serializer).object. 3.25. Specified by: Method writeObject in interface Output Write map as object. Serializer) public void writeObject(Object object. Specified by: Method writeObject in interface Output Write object.io. writeReference(Object) public void writeReference(Object obj).lang.object. 3. writeObject(Map<Object.object. Object>.red5.Package org.io.RecordSet recordset.Object> map. org.22. org.util. 3.red5.Object. Specified by: Method writeNull in interface Output 3. writeNull() public void writeNull().Serializer serializer). Serializer) public void writeObject(java.Serializer serializer). writeRecordSet(RecordSet.red5. org. 3.?io. Specified by: Method writeRecordSet in interface Output Write recordset.?amf Specified by: Method writeMap in interface Output Write map.26.23.io. writeObject(Object. writeNumber(Number) public void writeNumber(Number num).?red5.red5. Specified by: Method writeReference in interface Output Write reference to complex data type 3.21.24.io. writeString(String) public void writeString(String string).

dom.?red5.Document xml).Package org.?io. Specified by: Method writeXML in interface Output Write XML object 56 .w3c.?amf Specified by: Method writeString in interface Output Write string 3. writeXML(Document) public void writeXML(org.27.

public static final byte TYPE_OBJECT = 10.1. public static final byte TYPE_XML_DOCUMENT = 7. public static final byte TYPE_UNDEFINED = 0. public static final byte TYPE_XML = 11. public static final byte TYPE_DATE = 8.1. public static final byte TYPE_ARRAY = 9. public static final long MAX_INTEGER_VALUE = 268435455L. Synopsis public class AMF3 { // Public Static Fields public static final java. public static final byte TYPE_NULL = 1.nio. // Public Constructors public AMF3(). 1. public static final byte TYPE_BOOLEAN_TRUE = 3. public static final byte TYPE_STRING = 6. public static final byte TYPE_BOOLEAN_FALSE = 2. Class AMF3 AMF3 data type definitions. public static final int LONG_STRING_LENGTH = 65535.charset. public static final byte TYPE_OBJECT_PROPERTY = 0. public static final long MIN_INTEGER_VALUE = -268435456L. public static final byte TYPE_OBJECT_VALUE = 2. For detailed specification please see the link below. 57 . public static final byte TYPE_NUMBER = 5.Charset CHARSET . public static final byte TYPE_OBJECT_EXTERNALIZABLE = 1. public static final byte TYPE_OBJECT_PROXY = 3. public static final byte TYPE_INTEGER = 4. public static final byte TYPE_BYTEARRAY = 12.

toString .Package org.pdf] 1.macromedia. Official Adobe AMF3 Specification [http://download. Maximum possible value for integer number encoding. TYPE_BOOLEAN_FALSE public static final byte TYPE_BOOLEAN_FALSE = 2. Minimum possible value for integer number encoding. 1.4.8. equals .3.6. CHARSET public static final java. Array start marker 1. notifyAll . 1. UTF-8 is used 1. Boolean false marker 1. getClass .7. Boolean true marker 58 .Object: clone .?amf3 } Methods inherited from java.?red5. finalize . notify .charset. Max string length 1.Charset CHARSET .org/amf3/index] . MAX_INTEGER_VALUE public static final long MAX_INTEGER_VALUE = 268435455L.5.?io.com/pub/labs/amf/amf3_spec_121207. wait See Also AMF3 specification (external) [http://osflash.2.lang. LONG_STRING_LENGTH public static final int LONG_STRING_LENGTH = 65535. MIN_INTEGER_VALUE public static final long MIN_INTEGER_VALUE = -268435456L.nio. TYPE_BOOLEAN_TRUE public static final byte TYPE_BOOLEAN_TRUE = 3. TYPE_ARRAY public static final byte TYPE_ARRAY = 9. hashCode .

?amf3 1. The remaining integer-data represents the number of class members that exist.14.Package org. Integer marker 1.15.16. 1. including type code. TYPE_OBJECT_EXTERNALIZABLE public static final byte TYPE_OBJECT_EXTERNALIZABLE = 1.10. 59 .12. TYPE_OBJECT public static final byte TYPE_OBJECT = 10. TYPE_NULL public static final byte TYPE_NULL = 1. Date marker 1.11. TYPE_DATE public static final byte TYPE_DATE = 8. Number marker 1. Property list encoding. This value appears for objects that implement IExternalizable. such as ArrayCollection and ObjectProxy. Null marker 1. TYPE_OBJECT_PROPERTY public static final byte TYPE_OBJECT_PROPERTY = 0. The property names are read as string-data. Externalizable object.?red5.13. TYPE_INTEGER public static final byte TYPE_INTEGER = 4. What follows is the value of the "inner" object. ByteArray marker 1. TYPE_BYTEARRAY public static final byte TYPE_BYTEARRAY = 12.?io. TYPE_NUMBER public static final byte TYPE_NUMBER = 5. Object start marker 1.9. The values are then read as AMF3-data.

?IDataInput. String marker 1.xml. Proxy object.XMLDocument.?io.Package org. TYPE_UNDEFINED public static final byte TYPE_UNDEFINED = 0. Name-value encoding. org. The property names and values are encoded as string-data followed by AMF3-data until there is an empty string property name.1. TYPE_OBJECT_VALUE public static final byte TYPE_OBJECT_VALUE = 2. If there is a class-def reference there are no property names and the number of values is equal to the number of properties in the class-def.17.21. 2.20. TYPE_STRING public static final byte TYPE_STRING = 6. TYPE_XML public static final byte TYPE_XML = 11. TYPE_OBJECT_PROXY public static final byte TYPE_OBJECT_PROXY = 3.?amf3.19.?io.22.?red5.?red5. Similar to AMF 0. 2. As with other strings in AMF. XML document marker This is for the legacy XMLDocument type is retained in the language as flash. org.?amf3 1.18.?io. 1.?amf3. the content is encoded in UTF-8. the structure of an XMLDocument needs to be flattened into a string representation for serialization. XMLDocuments can be sent as a reference to a previously occurring XMLDocument instance by using an index to the implicit object reference table. XML start marker 1. Synopsis public class ByteArrayimplements.?IDataOutput { 60 . 1. Class ByteArray Red5 version of the Flex ByteArray class. TYPE_XML_DOCUMENT public static final byte TYPE_XML_DOCUMENT = 7.?red5. Undefined marker 1.

// Public Methods public int bytesAvailable(). public String readMultiByte(int length. public void readBytes(byte[] bytes).?io.ByteBuffer buffer. public int length().?amf3 // Protected Fields protected org. public void position(int position). public float readFloat().mina.Package org. String charSet). public void readBytes(byte[] bytes. public void compress(). public Object readObject(). int length). public short readShort(). public double readDouble(). protected IDataOutput dataOutput . int offset).apache. public boolean readBoolean(). public void readBytes(byte[] bytes.common. public int readInt().nio.ByteOrder getEndian().common. protected IDataInput dataInput . // Protected Constructors protected ByteArray(org. int offset. 61 . public byte readByte(). public java.ByteBuffer data . public int position().mina. public String readUTF(). int length).apache.?red5. // Public Constructors public ByteArray().

?red5. public void writeInt(int value). public void writeBytes(byte[] bytes. public void writeUnsignedInt(long value). public void writeUTF(String value). finalize . getClass . public void uncompress(). wait 62 . public void writeObject(Object value). public void writeByte(byte value). public long readUnsignedInt(). public void writeFloat(float value). public void writeShort(short value). hashCode .apache.ByteBuffer getData().common. } Methods inherited from java. equals . int length).Package org. public void writeDouble(double value). toString . public void writeUTFBytes(String value).Object: clone .?amf3 public String readUTFBytes(int length). public void writeBoolean(boolean value). // Protected Methods protected org. public void writeMultiByte(String value.ByteOrder endian). int offset. public String toString(). public void setEndian(java. notify .nio. protected void prepareIO(). String encoding). notifyAll . public void writeBytes(byte[] bytes.mina. public void writeBytes(byte[] bytes). int offset).?io. public int readUnsignedByte().lang. public int readUnsignedShort().

mina.?amf3 2. 2.6.apache. int) protected ByteArray(org.ByteBuffer buffer. ByteArray() public ByteArray(). 2.5. 2. Object used to read from array. dataInput protected IDataInput dataInput . Parameters buffer length 2.7. Internal constructor used to create ByteArray during deserialization.3.common.Package org. dataOutput protected IDataOutput dataOutput . Public constructor.ByteBuffer data . Parameters return 2.?red5. Object used to write to array.mina. 63 . Return number of bytes available for reading.?io.apache. ByteArray(ByteBuffer.8. Internal storage for array contents. 2. data protected org. int length).4. bytesAvailable() public int bytesAvailable(). Compress contents using zlib.common.2. compress() public void compress(). Creates new empty ByteArray.

common. Specified by: Method getEndian in interface IDataInput Return the byteorder used when loading values.mina. getEndian() public java.ByteBuffer getData(). Parameters return 2.nio.?amf3 2.14.9. Create internal objects used for reading and writing.13. Parameters position 2.Package org. Get internal data.?red5. position() public int position(). getData() protected org. position(int) public void position(int position). Set the current position in the data. Parameters return 2.10.ByteOrder getEndian(). length() public int length().?io. Get the current position in the data. 2.12. Parameters return 2. 64 .apache. Return total number of bytes in array.11. prepareIO() protected void prepareIO().

readFloat() public float readFloat(). int offset.18.Package org.20. 2. int. readByte() public byte readByte(). 2. 2.?io.?amf3 2. readBoolean() public boolean readBoolean(). int) public void readBytes(byte[] bytes.16. readDouble() public double readDouble().17. Specified by: Method readFloat in interface IDataInput 65 . Specified by: Method readDouble in interface IDataInput Read double-precision floating point value. 2. readBytes(byte[]) public void readBytes(byte[] bytes). int) public void readBytes(byte[] bytes. Specified by: Method readBytes in interface IDataInput Read list of bytes to given offset. Specified by: Method readBytes in interface IDataInput Read list of bytes. readBytes(byte[]. 2.15. Specified by: Method readByte in interface IDataInput Read signed single byte value.?red5.19. Specified by: Method readBytes in interface IDataInput Read given number of bytes to given offset. readBytes(byte[]. int offset). Specified by: Method readBoolean in interface IDataInput Read boolean value.21. 2. int length).

2. Specified by: Method readUnsignedInt in interface IDataInput Read unsigned integer value.22. readUnsignedByte() public int readUnsignedByte(). 2.27.?red5. Specified by: Method readObject in interface IDataInput Read arbitrary object. readMultiByte(int. Specified by: Method readUnsignedShort in interface IDataInput 66 .28. 2. Specified by: Method readUnsignedByte in interface IDataInput Read unsigned single byte value. readInt() public int readInt().23. readShort() public short readShort(). Specified by: Method readInt in interface IDataInput Read signed integer value. readUnsignedShort() public int readUnsignedShort(). String charSet). readUnsignedInt() public long readUnsignedInt(). 2.24.Package org. 2. 2. 2.?io.26. readObject() public Object readObject(). Specified by: Method readShort in interface IDataInput Read signed short value. Specified by: Method readMultiByte in interface IDataInput Read multibyte string.?amf3 Read single-precision floating point value.25. String) public String readMultiByte(int length.

uncompress() public void uncompress().29.?io. writeByte(byte) public void writeByte(byte value).Package org. Specified by: Method setEndian in interface IDataInput Set the byteorder to use when loading values.32. 2.31. 2. writeBoolean(boolean) public void writeBoolean(boolean value). 2.34. Specified by: Method readUTFBytes in interface IDataInput Read UTF-8 encoded string with given length. 2. 2.35.nio. Specified by: Method writeByte in interface IDataOutput 67 . setEndian(ByteOrder) public void setEndian(java. Parameters return 2. readUTF() public String readUTF(). Decompress contents using zlib.ByteOrder endian). 2. Specified by: Method readUTF in interface IDataInput Read UTF-8 encoded string.?amf3 Read unsigned short value. readUTFBytes(int) public String readUTFBytes(int length).33.30. toString() public String toString(). Specified by: Method writeBoolean in interface IDataOutput Write boolean value. Return string representation of the array's contents.?red5.

2. int offset. writeBytes(byte[]) public void writeBytes(byte[] bytes). 2.40. writeBytes(byte[].36. 2. int) public void writeBytes(byte[] bytes. writeInt(int) public void writeInt(int value).?amf3 Write signed byte value. Specified by: Method writeBytes in interface IDataOutput Write multiple bytes from given offset.Package org. int. 2. int) public void writeBytes(byte[] bytes. Specified by: Method writeBytes in interface IDataOutput Write given number of bytes from given offset.?io. 2. 2. Specified by: Method writeInt in interface IDataOutput Write signed integer value. String) public void writeMultiByte(String value. Specified by: Method writeBytes in interface IDataOutput Write multiple bytes.37.38. writeFloat(float) public void writeFloat(float value).?red5.42. Specified by: Method writeFloat in interface IDataOutput Write single-precision floating point value. 68 .41. writeDouble(double) public void writeDouble(double value). writeBytes(byte[]. Specified by: Method writeDouble in interface IDataOutput Write double-precision floating point value. 2. int length). writeMultiByte(String. int offset).39.

46. 3.43.?io. 2.1.?io. 2. Can be used to load an IExternalizable object.?IDataInput { // Protected Constructors 69 . Specified by: Method writeUTFBytes in interface IDataOutput Write UTF-8 encoded string as byte array. 2.?amf3.?red5.45.47. 2.44. writeUnsignedInt(long) public void writeUnsignedInt(long value). Specified by: Method writeShort in interface IDataOutput Write signed short value. Class DataInput Implementation of the IDataInput interface. Specified by: Method writeObject in interface IDataOutput Write arbitrary object. writeShort(short) public void writeShort(short value). writeUTF(String) public void writeUTF(String value). so readUTFBytes(int) must be used to load it. 2. Specified by: Method writeUnsignedInt in interface IDataOutput Write unsigned integer value. 3. Synopsis public class DataInputimplements. Specified by: Method writeUTF in interface IDataOutput Write UTF-8 encoded string. org. writeUTFBytes(String) public void writeUTFBytes(String value). Specified by: Method writeMultiByte in interface IDataOutput Write string in given character set. This string is stored without informations about its length.Package org.?amf3 String encoding).?red5. writeObject(Object) public void writeObject(Object value).

object. public String readUTFBytes(int length).2.nio. equals . // Public Methods public java.?red5.lang. notify . public void readBytes(byte[] bytes. public int readUnsignedByte().red5. public String readMultiByte(int length. public int readUnsignedShort().Deserializer deserializer). String charSet).?amf3 protected DataInput(Input input. wait 3. public float readFloat().Object: clone . int length).ByteOrder endian).ByteOrder getEndian(). public String readUTF(). int offset. public void readBytes(byte[] bytes. finalize . notifyAll . public void readBytes(byte[] bytes). org.io.?io. int offset). DataInput(Input.object. public boolean readBoolean().Deserializer deserializer).red5. } Methods inherited from java. org. hashCode .io.Package org. 70 . Deserializer) protected DataInput(Input input. getClass . public byte readByte().nio. public double readDouble(). public long readUnsignedInt(). public Object readObject(). toString . public int readInt(). public void setEndian(java. public short readShort().

Specified by: Method readBytes in interface IDataInput Read list of bytes. Specified by: Method readBytes in interface IDataInput 71 .7. int) public void readBytes(byte[] bytes. int) public void readBytes(byte[] bytes. readBoolean() public boolean readBoolean(). 3. int length).?amf3 Create a new DataInput. Specified by: Method readByte in interface IDataInput Read signed single byte value. getEndian() public java. readBytes(byte[]) public void readBytes(byte[] bytes). 3.5. Specified by: Method getEndian in interface IDataInput Return the byteorder used when loading values.?red5.Package org. Parameters input deserializer input to use the deserializer to use 3. int. 3. int offset). readByte() public byte readByte().?io.nio.3.4. readBytes(byte[].6.8.ByteOrder getEndian(). 3. 3. readBytes(byte[]. Specified by: Method readBytes in interface IDataInput Read list of bytes to given offset. Specified by: Method readBoolean in interface IDataInput Read boolean value. int offset.

3. 3. 3.13. 3. Specified by: Method readUnsignedByte in interface IDataInput 72 .15.?red5. readUnsignedByte() public int readUnsignedByte(). readDouble() public double readDouble(). 3. readInt() public int readInt().14. Specified by: Method readShort in interface IDataInput Read signed short value. readObject() public Object readObject(). Specified by: Method readInt in interface IDataInput Read signed integer value.11. 3.12. readMultiByte(int. String charSet). Specified by: Method readDouble in interface IDataInput Read double-precision floating point value.?amf3 Read given number of bytes to given offset. Specified by: Method readFloat in interface IDataInput Read single-precision floating point value. readShort() public short readShort().Package org.9. Specified by: Method readMultiByte in interface IDataInput Read multibyte string.10.?io. readFloat() public float readFloat(). 3. String) public String readMultiByte(int length. Specified by: Method readObject in interface IDataInput Read arbitrary object.

readUnsignedShort() public int readUnsignedShort(). Specified by: Method readUnsignedShort in interface IDataInput Read unsigned short value. 3. setEndian(ByteOrder) public void setEndian(java. 73 .17. readUTF() public String readUTF(). 3. org. 4.?io. 3.19. Synopsis public class DataOutputimplements. Class DataOutput Implementation of the IDataOutput interface.Serializer serializer).ByteOrder endian).?io. Specified by: Method setEndian in interface IDataInput Set the byteorder to use when loading values.18.nio.?red5. readUnsignedInt() public long readUnsignedInt().16.red5. org. 3. Can be used to store an IExternalizable object. Specified by: Method readUTF in interface IDataInput Read UTF-8 encoded string. Specified by: Method readUTFBytes in interface IDataInput Read UTF-8 encoded string with given length.object.?IDataOutput { // Protected Constructors protected DataOutput(Output output. readUTFBytes(int) public String readUTFBytes(int length).Package org.20.1.?amf3. 3.io. 4.?amf3 Read unsigned single byte value.?red5. Specified by: Method readUnsignedInt in interface IDataInput Read unsigned integer value.

wait 4. public void writeInt(int value). int offset. int offset).Package org. public void writeUnsignedInt(long value). public void writeDouble(double value). equals .object.?red5.Object: clone . } Methods inherited from java.2. public void writeUTF(String value). finalize . int length).ByteOrder endian).nio. Create a new DataOutput. public void writeUTFBytes(String value). hashCode .?amf3 // Public Methods public java. org. public void writeFloat(float value). notify . Parameters output serializer destination to write to the serializer to use 74 .red5.io. public void writeShort(short value).?io. Serializer) protected DataOutput(Output output. String encoding).Serializer serializer). public void writeBoolean(boolean value).ByteOrder getEndian(). public void writeObject(Object value).nio. DataOutput(Output. getClass . public void writeByte(byte value). public void writeMultiByte(String value. notifyAll . public void setEndian(java.lang. public void writeBytes(byte[] bytes. public void writeBytes(byte[] bytes. public void writeBytes(byte[] bytes). toString .

4. Specified by: Method writeBytes in interface IDataOutput Write multiple bytes from given offset.nio. int offset.5. writeBytes(byte[]) public void writeBytes(byte[] bytes). 4. int offset). int) public void writeBytes(byte[] bytes. 4. int) public void writeBytes(byte[] bytes. int length). writeBytes(byte[]. 4. Specified by: Method writeBoolean in interface IDataOutput Write boolean value. writeBytes(byte[].9.4. 4. Specified by: Method writeBytes in interface IDataOutput Write multiple bytes.?amf3 4.Package org.3.nio. Specified by: Method getEndian in interface IDataOutput Return the byteorder used when storing values.?io. int. getEndian() public java.6. setEndian(ByteOrder) public void setEndian(java.ByteOrder getEndian(). Specified by: Method writeByte in interface IDataOutput Write signed byte value.7. writeBoolean(boolean) public void writeBoolean(boolean value). Specified by: Method writeBytes in interface IDataOutput 75 .8.ByteOrder endian). writeByte(byte) public void writeByte(byte value). 4.?red5. Specified by: Method setEndian in interface IDataOutput Set the byteorder to use when storing values.

writeShort(short) public void writeShort(short value).15. 4. Specified by: Method writeMultiByte in interface IDataOutput Write string in given character set.12. String encoding).Package org.10.?io. String) public void writeMultiByte(String value. 4. 4. Specified by: Method writeUnsignedInt in interface IDataOutput 76 . 4. Specified by: Method writeDouble in interface IDataOutput Write double-precision floating point value. Specified by: Method writeShort in interface IDataOutput Write signed short value. writeInt(int) public void writeInt(int value). writeUnsignedInt(long) public void writeUnsignedInt(long value). 4. writeMultiByte(String. 4. Specified by: Method writeFloat in interface IDataOutput Write single-precision floating point value. writeDouble(double) public void writeDouble(double value).?amf3 Write given number of bytes from given offset.16. writeFloat(float) public void writeFloat(float value).13. 4.11.14. Specified by: Method writeObject in interface IDataOutput Write arbitrary object.?red5. writeObject(Object) public void writeObject(Object value). Specified by: Method writeInt in interface IDataOutput Write signed integer value.

public boolean readBoolean().Package org. public int readInt(). Interface IDataInput Interface implemented by classes that provide a way to load custom objects. public String readMultiByte(int length. int offset. public float readFloat(). int length). Specified by: Method writeUTFBytes in interface IDataOutput Write UTF-8 encoded string as byte array.nio. int offset). so readUTFBytes(int) must be used to load it. Synopsis public interface IDataInput { // Public Methods public java.18. public void readBytes(byte[] bytes). public byte readByte(). String charSet).?amf3 Write unsigned integer value. public void readBytes(byte[] bytes.ByteOrder getEndian(). public short readShort(). writeUTF(String) public void writeUTF(String value). 77 .?red5. 5. public void readBytes(byte[] bytes. Specified by: Method writeUTF in interface IDataOutput Write UTF-8 encoded string.17. 4. public double readDouble(). 4. public Object readObject().?io. writeUTFBytes(String) public void writeUTFBytes(String value).1. This string is stored without informations about its length. 5.

com/flex/2/langref/flash/utils/IDataInput. Parameters return the byteorder 5. public int readUnsignedShort(). Read boolean value.2. Parameters return the value 5. public String readUTFBytes(int length). Adobe Livedocs (external) [http:// livedocs. public int readUnsignedByte(). Parameters return the value 5.ByteOrder getEndian().adobe.5.4.nio. readBytes(byte[]) public void readBytes(byte[] bytes). Return the byteorder used when loading values. } See Also .ByteOrder endian). readByte() public byte readByte().?io.Package org.?amf3 public String readUTF().html] readExternal(org.io.red5.3.amf3.IDataInput) 5. getEndian() public java. 78 . public long readUnsignedInt(). Read signed single byte value. public void setEndian(java.?red5.nio. readBoolean() public boolean readBoolean().

Parameters bytes offset destination for read bytes offset in destination to write to 5. int length). readBytes(byte[]. Parameters return the value 79 . readBytes(byte[].?io. Read double-precision floating point value.8. readFloat() public float readFloat().Package org. int offset).7.?red5. int. Parameters return the value 5.?amf3 Read list of bytes. Parameters bytes offset length destination for read bytes offset in destination to write to number of bytes to read 5. int) public void readBytes(byte[] bytes. int) public void readBytes(byte[] bytes.6. Read given number of bytes to given offset.9. int offset. Read single-precision floating point value. readDouble() public double readDouble(). Parameters bytes destination for read bytes 5. Read list of bytes to given offset.

Read unsigned single byte value. Read arbitrary object. readShort() public short readShort().Package org.?red5. readObject() public Object readObject().14. readInt() public int readInt().12. Read multibyte string. Read signed integer value. String charSet). Read signed short value. Parameters return the value 80 .?io. Parameters return the object 5. Parameters return the value 5.13. readMultiByte(int. Parameters return the value 5.11. String) public String readMultiByte(int length.?amf3 5. readUnsignedByte() public int readUnsignedByte(). Parameters length charSet return length of string to read character set of string to read the string 5.10.

17.15. Parameters endian the byteorder to use 6.16.nio. Parameters return the value 5.?red5.19. readUTF() public String readUTF(). readUTFBytes(int) public String readUTFBytes(int length). Read UTF-8 encoded string with given length. Read unsigned integer value. readUnsignedInt() public long readUnsignedInt(). Parameters return the string 5.Package org. Interface IDataOutput 81 . Set the byteorder to use when loading values. Parameters return the value 5.?io. readUnsignedShort() public int readUnsignedShort(). Read unsigned short value.ByteOrder endian). Read UTF-8 encoded string. Parameters length return the length of the string the string 5. setEndian(ByteOrder) public void setEndian(java.?amf3 5.18.

Return the byteorder used when storing values.ByteOrder endian). public void writeInt(int value). Synopsis public interface IDataOutput { // Public Methods public java.2.1.html] writeExternal(org. public void writeShort(short value).nio.nio. Adobe Livedocs (external) [http:// livedocs.IDataOutput) 6.?red5. public void writeBoolean(boolean value). public void writeUTFBytes(String value). public void writeByte(byte value). int offset). public void writeUTF(String value). public void writeBytes(byte[] bytes. String encoding). public void writeObject(Object value). public void writeFloat(float value).Package org.?amf3 Interface implemented by classes that provide a way to store custom objects.ByteOrder getEndian(). 82 . 6.adobe.com/flex/2/langref/flash/utils/IDataOutput. public void writeBytes(byte[] bytes.nio. public void writeMultiByte(String value.?io.ByteOrder getEndian(). public void writeBytes(byte[] bytes). } See Also . public void writeDouble(double value). public void setEndian(java.red5.amf3. int offset.io. getEndian() public java. public void writeUnsignedInt(long value). int length).

setEndian(ByteOrder) public void setEndian(java.6.ByteOrder endian). Write signed byte value. writeBytes(byte[]. Write multiple bytes from given offset.4. writeByte(byte) public void writeByte(byte value). Write multiple bytes. writeBoolean(boolean) public void writeBoolean(boolean value).Package org. Parameters bytes the bytes 83 .5.?amf3 Parameters return the byteorder 6.?red5. Write boolean value. Parameters bytes the bytes 6. Set the byteorder to use when storing values.?io. Parameters value the value 6.3. int) public void writeBytes(byte[] bytes.7.nio. int offset). writeBytes(byte[]) public void writeBytes(byte[] bytes). Parameters value the value 6. Parameters endian the byteorder to use 6.

11. writeInt(int) public void writeInt(int value). 84 . Write double-precision floating point value. writeBytes(byte[]. Write signed integer value. Write string in given character set. Parameters value the value 6. Parameters value the value 6. Parameters value the value 6. String encoding).Package org. String) public void writeMultiByte(String value. int) public void writeBytes(byte[] bytes. Write single-precision floating point value.10. Parameters bytes offset length the bytes offset in bytes to start writing from number of bytes to write 6. writeMultiByte(String. int offset. writeDouble(double) public void writeDouble(double value).?io. writeFloat(float) public void writeFloat(float value).8. Write given number of bytes from given offset.?amf3 offset offset in bytes to start writing from 6.9.?red5. int.12. int length).

Parameters value the object 6. writeUnsignedInt(long) public void writeUnsignedInt(long value).?io. Write UTF-8 encoded string. Write UTF-8 encoded string as byte array.13. Write arbitrary object. Parameters value the string 6. so readUTFBytes(int) must be used to load it. writeObject(Object) public void writeObject(Object value). This string is stored without informations about its length. writeUTFBytes(String) public void writeUTFBytes(String value). Parameters value the value 6. Write signed short value. writeUTF(String) public void writeUTF(String value).14.Package org. Parameters value the value 6.?amf3 Parameters value encoding the string the character set 6.?red5.15.17. Write unsigned integer value.16. Parameters 85 . writeShort(short) public void writeShort(short value).

adobe. Store custom object to stream. readExternal(IDataInput) public void readExternal(IDataInput input). public void writeExternal(IDataOutput output).3.Package org.slf4j.?red5.?io.com/flex/2/langref/flash/utils/ IExternalizable.?io.?amf. Interface IExternalizable Interface that needs to be implemented by classes that serialize / deserialize themselves. org.?Input { // Protected Fields protected static org.Logger log . Synopsis public class Input extends. 7.?amf3 value the string 7. 86 .?object. Synopsis public interface IExternalizable { // Public Methods public void readExternal(IDataInput input). } See Also Adobe Livedocs (external) [http://livedocs.?io.2. Parameters output object to be used for data storing 8.1. Load custom object from stream.html] 7.1.?Input implements. Class Input Input for Red5 data (AMF3) types 8.?red5. Parameters input object to be used for data loading 7. writeExternal(IDataOutput) public void writeExternal(IDataOutput output). org.?red5.

readString . newInstance .mina.io.Document readXML(). // Public Methods public void enforceAMF3().ByteBuffer buf. readXML . storeReference 87 . public ByteArray readByteArray().Input. readDataType .common.amf.io.?red5. readDate . getReference .Package org. readReference .util. readMap . public org. public Number readNumber().Deserializer deserializer). public String readString().mina.object. public String getString().Input: getPropertyType .mina.io. readObject .amf3.red5.Deserializer deserializer).io.io. readSimpleObject .object.Deserializer deserializer). skipEndObject . readByteArray .object.object.red5.?amf3 // Public Constructors public Input(org. reset .dom. readNumber .red5. readPropertyName . public Object readObject(org. public Object readMap(org. hasMoreProperties . readKeyValues .Date readDate().common. readArray . public Object readNull().io.apache.apache. protected Object newInstance(String className). readBean .ByteBuffer buf). public Object readArray(org.common. public Input(org.red5.red5. readBoolean .RefStorage refStorage). readCustom . } Methods inherited from org. public Object readReference(). skipPropertySeparator Methods inherited from org. // Protected Methods protected org. public Object readCustom(). public void reset(). public byte readDataType().?io.BaseInput: clearReferences . org.w3c. public java. readNull . getString . public Boolean readBoolean().red5.ByteBuffer getBuffer().apache.

slf4j.io.common. org. refMap 8. notify .5. toString .?amf3 Methods inherited from java. finalize .4. log Fields inherited from org.ByteBuffer buf).Input: buf . notifyAll .RefStorage refStorage).2. getClass . getBuffer() protected org.io.Object: clone .ByteBuffer buf.Package org. Force using AMF3 everywhere 8.apache. log protected static org. Input(ByteBuffer. Logger 8. wait Fields inherited from org.?io.3. enforceAMF3() public void enforceAMF3().mina. refId .red5. currentDataType . Parameters 88 .common.apache.RefStorage) public Input(org.amf3. Input.Logger log .apache.6. Creates Input object for AMF3 from byte buffer and initializes references from passed RefStorage Parameters buf refStorage 8. equals .red5.red5.lang.mina. Provide access to raw data.common.?red5.amf.Input. hashCode .ByteBuffer getBuffer(). Input(ByteBuffer) public Input(org.BaseInput: referenceMode .io.mina. Creates Input object for AMF3 from byte buffer Parameters buf Byte buffer 8.object.

11. newInstance(String) protected Object newInstance(String className).object.8. Specified by: Method readBoolean in interface Input Reads a boolean Parameters return boolean Boolean value 8.Deserializer deserializer).?red5.10. Specified by: Method getString in interface Input Read a string without the string type header. getString() public String getString().?io. readByteArray() public ByteArray readByteArray(). 8.io.9. Parameters return String Description copied from interface: getString 8. Specified by: Method readByteArray in interface Input Read ByteArray object. Parameters 89 .Package org.?amf3 return ByteBuffer 8. readArray(Deserializer) public Object readArray(org.red5. readBoolean() public Boolean readBoolean().7. Specified by: Method readArray in interface Input Returns an array Parameters return int Length of array 8.

Deserializer deserializer). readDataType() public byte readDataType().13.14. Specified by: Method readDataType in interface Input Reads the data type Parameters return byte Data type 8.12.?io. Specified by: Method readCustom in interface Input Reads Custom Parameters return Object Custom type object 8.?amf3 return ByteArray object Description copied from interface: readByteArray 8. readDate() public java. Specified by: Method readDate in interface Input Returns a date Parameters return Date Date object 8. Specified by: Method readMap in interface Input Read a map containing key . Parameters return Map 90 .?red5.value pairs.Date readDate(). This can result in a List or Map being deserialized depending on the map type found. readMap(Deserializer) public Object readMap(org.red5.object.15. readCustom() public Object readCustom().Package org.io.util.

?amf3 Description copied from interface: readMap 8. readString() public String readString().20.object.16.red5. Specified by: Method readReference in interface Input Read reference to Complex Data Type.17. Objects that are collaborators (properties) of other objects must be stored as references in map of id-reference pairs.18. Specified by: Method readNull in interface Input Reads a null (value) Parameters return Object null 8. readObject(Deserializer) public Object readObject(org. Specified by: Method readNumber in interface Input Reads a Number Parameters return Number Number 8. readReference() public Object readReference().?red5. 8. Specified by: Method readObject in interface Input Read an object.Package org. Parameters return object Description copied from interface: readObject 8. readNull() public Object readNull().19. readNumber() public Number readNumber(). Specified by: Method readString in interface Input 91 .io.?io.Deserializer deserializer).

notifyAll .Document readXML().util.util. toString . Class Input. // Public Constructors public Input.lang.ClassReference Holds informations about already deserialized classes. hashCode .21. Specified by: Method readXML in interface Input Read XML document 8.List<java.?amf3 Reads a string Parameters return String String 8. Resets map 9.ClassReference { // Protected Fields protected java. readXML() public org.w3c. protected String className . java.util.?io. int type. getClass . reset() public void reset().22. java. Create new informations about a class. equals .String> attributeNames . } Methods inherited from java. notify . int type. 92 .dom.2.ClassReference(String className. Input.Package org.ClassReference(String className. wait 9.ClassReference(String.lang. Synopsis protected class Input. protected int type .lang.List<java.String> attributeNames). int.String> attributeNames). finalize . List<String>) public Input. 9.1.List<java.?red5.Object: clone .lang.

util. Type of the class. In AMF3 references should be collected through the whole "body" (across several Input objects).List<java. Synopsis protected class Input. String name).lang. attributeNames protected java. type protected int type . 10. className protected String className . 11.3.?amf3 9.RefStorage { // Public Constructors 93 .4. Class Input. 9.String> attributeNames .lang. Name of the deserialized class.1. notifyAll .1. 9.Object: clone .5.RefStorage Class used to collect AMF3 references. toString .PendingObject { // Protected Constructors protected Input.PendingObject Dummy class that is stored as reference for objects currently being deserialized that reference themselves. } Methods inherited from java. // Public Methods public void addPendingProperty(Object obj. Class Input. Synopsis public static class Input.?io. finalize . public void resolveProperties(Object result). getClass . notify . Names of the attributes of the class. wait 11. 10. Class<?> klass. hashCode .PendingObject(). equals .?red5.Package org.

object.Object: clone .object.util.lang. public void writeArray(java.?Output { // Protected Fields protected static org. finalize .util.Date date).1.RefStorage().ByteBuffer buf). // Public Methods public void enforceAMF3(). } Methods inherited from java.Serializer serializer).?amf. Synopsis public class Output extends.Logger log .?io. // Public Constructors public Output(org.io.Map<java. org.?red5.?io. org. hashCode . public void writeArray(Object array.object. equals .Collection<?> array. public void writeDate(java.Serializer serializer). public void writeNull().Object> map.mina.util.slf4j.common.?red5.?object.Object.?Output implements.?amf3 public Input. org. public boolean supportsDataType(byte type).util.Collection<?> array. wait 12.lang.io.io.object.lang. public void writeMap(java. public void writeMap(java. org.red5.red5.io. 94 . toString .Serializer serializer). public void writeBoolean(Boolean bol). public void writeByteArray(ByteArray array). public void putString(String string). java.?io. public void writeArray(Object[] array. notify .Serializer serializer).apache.Package org.red5. org. getClass .?red5.red5. public void writeNumber(Number num).object. org.red5. notifyAll . Class Output AMF3 output writer 12.io.Serializer serializer). org.

io. getReferenceId .apache. writeRecordSet .Serializer serializer). public void writeRecordSet(org. protected void writeArbitraryObject(Object object. writeReference . writeNumber . reset .io. public void writeString(String string).io. writeArbitraryObject . equals .common. writeCustom .Output: buf .lang. hashCode .object.mina.dom. storeReference Methods inherited from java. writeByteArray . writeObject . writeMap .Document xml). } Methods inherited from org. notifyAll . org. dontSerializeField .ByteBuffer buf). protected org.?io.RecordSet recordset. writeNull . supportsDataType . java. org.Serializer serializer).object.object.object.io.BaseOutput: clearReferences .amf3.object.red5.red5. org.apache.Object: clone . 95 . notify . isCustom .object. writeDate .Map<java.Object> map.?red5.red5.io.Object.util.Input 12.Output: buf .red5.red5.Serializer serializer). refMap See Also org.io.red5. log .common.io.AMF3 .mina.Serializer serializer). writeBoolean . checkWriteReference .amf3.amf. encodeString .2.io.w3c.red5. protected void writeAMF3(). writeString . // Protected Methods protected static byte[] encodeString(String string).lang.?amf3 public void writeObject(Object object. stringCache Fields inherited from org. writeXML Methods inherited from org.ByteBuffer getBuffer().io.amf.red5.red5. byte[] encoded).red5. protected void putString(String str. org. toString . wait Fields inherited from org. public void writeXML(org.BaseOutput: refId . writeArray . putString . Output(ByteBuffer) public Output(org.io.red5. protected void putInteger(long value).lang. hasReference . public void writeObject(java.Package org. org.object. getClass . finalize .io.

ByteBuffer getBuffer().4.apache.5.common. Specified by: Method supportsDataType in interface Output 12.?red5. getBuffer() protected org. byte[] encoded).mina. Provide access to raw data. enforceAMF3() public void enforceAMF3(). writeArbitraryObject(Object. byte[]) protected void putString(String str.3. putString(String) public void putString(String string). supportsDataType(byte) public boolean supportsDataType(byte type).6.mina.Package org.9.7.apache. Parameters buf instance of ByteBuffer See Also org.common.?amf3 Constructor of AMF3 output. 12. encodeString(String) protected static byte[] encodeString(String string). Force using AMF3 everywhere 12. Specified by: Method putString in interface Output 12. 12.?io. putInteger(long) protected void putInteger(long value). Parameters return ByteBuffer 12.8. 12. putString(String.ByteBuffer 12. Serializer) protected void writeArbitraryObject(Object object.10. 96 .

11. org. writeMap(Collection<?>.Serializer serializer). Specified by: Method writeArray in interface Output Write array.Serializer serializer).Date date).object. Serializer) public void writeMap(java.red5.Collection<?> array.object. writeBoolean(Boolean) public void writeBoolean(Boolean bol).Serializer serializer). 12. Specified by: Method writeArray in interface Output Write array.Package org.17.util. Specified by: Method writeArray in interface Output Write primitive array.object.16.red5.13. org.object.util.red5. org.?red5. writeArray(Collection<?>.io.io.12. Specified by: Method writeBoolean in interface Output Write boolean 12.io.14. writeArray(Object.Serializer serializer). Specified by: Method writeDate in interface Output Write date 12. 12. Serializer) public void writeArray(java.?amf3 org. 12. writeDate(Date) public void writeDate(java.util. 12.15. Serializer) public void writeArray(Object array.io. writeArray(Object[]. writeByteArray(ByteArray) public void writeByteArray(ByteArray array). Serializer) public void writeArray(Object[] array. Specified by: Method writeByteArray in interface Output Write ByteArray object (AMF3 only).red5. 97 .Collection<?> array.?io. 12.

Object>.object.red5. org.20. writeObject(Object. writeObject(Map<Object.Serializer serializer).red5.21.23.19.Package org.io. 12.Serializer serializer). Specified by: Method writeRecordSet in interface Output Write recordset. Specified by: Method writeMap in interface Output Write array as map.Object> map. Serializer) public void writeObject(Object object. Specified by: Method writeMap in interface Output Write map. java. Serializer) public void writeMap(java.red5. java. Specified by: Method writeObject in interface Output Write object. 98 . 12.Object> map.object. org.object.18. 12.lang.Map<java.lang.Serializer serializer).lang.Map<java. Serializer) public void writeRecordSet(org.Serializer serializer). org.io.RecordSet recordset.?io.io. Object>.?red5.object.Serializer serializer). writeNumber(Number) public void writeNumber(Number num).?amf3 org. Serializer) public void writeObject(java. org.red5. Specified by: Method writeNull in interface Output 12.io.util. writeRecordSet(RecordSet.object.util. Specified by: Method writeNumber in interface Output Write number 12. writeNull() public void writeNull(). Specified by: Method writeObject in interface Output Write map as object.red5.io. 12.lang.object.red5.io.Object. writeMap(Map<Object.22.Object.

?io.w3c.25. writeString(String) public void writeString(String string).?red5.Document xml).?amf3 12. Specified by: Method writeString in interface Output Write string 12.24. writeXML(Document) public void writeXML(org.Package org.dom. Specified by: Method writeXML in interface Output Write XML object 99 .

util.apache.mina.IoFilter.common.mina.util.apache.IoFilter.common. public void sessionCreated(org.apache.IoSession session. Synopsis public class ExecutorFilter extends.?IoFilterAdapter { // Public Constructors public ExecutorFilter(). public void filterWrite(org.common.mina. Please note that this filter doesn't manage the life cycle of the underlying java. public java.IoFilter.apache. // Public Methods public void exceptionCaught(org. public ExecutorFilter(java.util.apache.mina. Object message).mina.common.NextFilter nextFilter.mina.mina.IoFilter. public void sessionIdle(org.org] 1. Class ExecutorFilter A filter that forward events to java.?mina.mina.common.apache.apache.1.mina.NextFilter nextFilter.common.IoSession session.WriteRequest writeRequest). org.IoSession session.apache.apache.common.IoSession session.apache.IoFilterChain.mina.?apache.common. Apache Directory Project [mailto:dev@directory. org.apache. long keepAliveTime). public ExecutorFilter(int corePoolSize. public void sessionClosed(org.1.apache.concurrent.mina.IoFilter.mina.?common.NextFilter nextFilter. org.apache. org.common.NextFilter nextFilter.NextFilter nextFilter.common.apache.common.common.NextFilter nextFilter.util.mina.apache.Executor executor). public void filterClose(org.IoSession session) throws Exception.mina.mina. org.IoFilter. 100 .IoSession session.mina. org. org.IdleStatus status).ThreadModel automatically.apache.concurrent.IoFilter.concurrent.common.apache. public void messageReceived(org.mina.IoFilter.IoSession session).mina.NextFilter nextFilter.Executor.apache.apache. Throwable cause).apache.IoSession session). This filter is usually inserted by org.common.IoFilter. org.apache.Executor getExecutor().common.common.mina.common. Object message).common. org. so you don't need to add this filter in most cases.mina.Executor. You can apply various thread model by inserting this filter to the org. org.common.common.NextFilter nextFilter.concurrent. public void messageSent(org. int maximumPoolSize. You have to destroy or stop it by yourself. org.

onPreRemove . ExecutorFilter(Executor) public ExecutorFilter(java. filterClose . toString .Executor executor).EventType type.apache. getClass . int.common.apache.apache. Creates a new instance with the specified executor. finalize .IoFilter. long) public ExecutorFilter(int corePoolSize. sessionClosed .Package org.IoSession session. messageSent . org. ExecutorFilter() public ExecutorFilter(). sessionOpened Methods inherited from java.mina.red5.ExecutorFilter.4.IoFilter.common. maximum pool size and keep alive time Parameters corePoolSize maximumPoolSize keepAliveTime Core pool size Maximum pool size Keep alive time (in seconds) 101 . init . sessionIdle . equals .IoFilterAdapter: destroy . onPreAdd .io. Creates a new instace with the default thread pool implementation (new ThreadPoolExecutor(16.filter.?red5.mina.lang.common. Creates new instance with specified core pool size.IoSession session). wait 1. notify .mina. sessionCreated . new LinkedBlockingQueue() )).3. onPostAdd . filterWrite . TimeUnit.mina. 1. org.util. 16. // Protected Methods protected void processEvent(org. int maximumPoolSize.SECONDS.?io.concurrent. } Methods inherited from org. exceptionCaught .apache. messageReceived .Object: clone . notifyAll .NextFilter nextFilter. long keepAliveTime). onPostRemove . Object data).NextFilter nextFilter. org.mina. 60.common. ExecutorFilter(int. Parameters executor Executor 1.?filter public void sessionOpened(org.2.apache. hashCode .common.

util.mina.mina. 1.concurrent. filterWrite(IoFilter. 1. Throwable) public void exceptionCaught(org. IoFilter.5.common.mina.11.apache.common.apache.red5.common. Object) public void messageSent(org.apache.NextFilter.IoSession session.Executor getExecutor().Package org.mina.apache. Object message).?red5. getExecutor() public java.EventType. Parameters return Executor object 1. messageSent(IoFilter.WriteRequest) public void filterWrite(org. org.apache.IoFilter. IoSession.IoSession session.6.mina.apache.common.filter. IoSession. org. Throwable cause).NextFilter.NextFilter nextFilter.apache.?filter 1.NextFilter.common.IoSession session.apache.mina.Executor instance this filter uses.mina.IoSession session) throws Exception.7.10. exceptionCaught(IoFilter.common.IoFilter.common.mina.IoSession session.apache. Object) protected void processEvent(org. Object message).common.mina. org. org.IoSession session. org.NextFilter.io. processEvent(IoFilter.common.NextFilter.EventType type. ExecutorFilter.common. IoSession. Returns the underlying java.NextFilter.common. 1.mina.apache. IoSession.NextFilter nextFilter.util. org.NextFilter nextFilter.NextFilter nextFilter. Object) public void messageReceived(org.apache. messageReceived(IoFilter.8. Object data).common.IoFilter.mina.?io. org.apache.IoFilter.IoFilter.apache.NextFilter nextFilter.IoFilter.WriteRequest writeRequest). 1.9. IoSession) public void filterClose(org.concurrent.mina. filterClose(IoFilter. IoSession.common.mina.ExecutorFilter.NextFilter nextFilter. Handles event Parameters nextFilter session Next filter in queue IoSession object (connection between two ends) 102 .IoFilter. 1. org.

?filter type data Event type Event data 1. notify . hashCode .Event { // Public Methods public Object getData().2.io.common.IoFilter. IoSession) public void sessionClosed(org.15.common.?red5. sessionCreated(IoFilter.EventType getType(). IoSession) public void sessionCreated(org.IoSession session). 1.?io. org.mina. notifyAll .14.13.apache.NextFilter.common. Synopsis protected static class ExecutorFilter.NextFilter getNextFilter().mina.apache. Getter for event data Parameters 103 .common.mina.apache. getData() public Object getData(). equals . sessionClosed(IoFilter.lang.common. sessionIdle(IoFilter.IoFilter. org. IdleStatus) public void sessionIdle(org.mina.12.IoFilter. finalize .NextFilter. getClass .apache.common.filter.common.mina. public org.common.NextFilter.IoSession session).mina. toString . wait 2.IoFilter. IoSession) public void sessionOpened(org.NextFilter nextFilter.mina. IoSession.common. 2.Package org.NextFilter nextFilter. org.IoSession session.red5.IdleStatus status).apache.IoSession session).apache. 1.ExecutorFilter.Event Connection event 2. sessionOpened(IoFilter.mina. } Methods inherited from java.apache.mina. public org.NextFilter nextFilter. Class ExecutorFilter.apache. org.NextFilter.apache.common.NextFilter nextFilter.mina.1. org. 1.apache.IoFilter.Object: clone .

ExecutorFilter.EventType IDLE .EventType WRITTEN . Synopsis protected static class ExecutorFilter.io.?filter return Event data 2.ExecutorFilter.red5.EventType getType().io.filter.filter.lang.Package org.filter.io. public static final org. // Public Methods public String toString().NextFilter getNextFilter(). equals . } Methods inherited from java.ExecutorFilter. public static final org.io.red5. hashCode . getType() public org. public static final org.EventType SENT . public static final org. getNextFilter() public org.red5.filter.red5.io.io.EventType READ . toString . public static final org.Object: clone .ExecutorFilter.?red5.EventType CLOSED .ExecutorFilter.EventType OPENED .io.io.filter. notifyAll .ExecutorFilter.mina.red5. Getter for type Parameters return Type of event 3.filter. public static final org.EventType EXCEPTION .red5.?io.ExecutorFilter.IoFilter.filter.3.red5. public static final org.EventType RECEIVED .filter.apache.EventType { // Public Static Fields public static final org.filter.red5.io.ExecutorFilter.red5.EventType Type of event 3. notify .1.4. getClass . Getter for next filter in queue Parameters return Next filter 2. wait 104 .ExecutorFilter. finalize .common. Class ExecutorFilter.

ExecutorFilter. SENT public static final org.?io.EventType OPENED . READ public static final org.?red5.2.EventType RECEIVED .filter.Package org.5.ExecutorFilter.filter. WRITTEN public static final org.ExecutorFilter.io.red5.ExecutorFilter.7.filter. On connection idle 3. CLOSED public static final org.red5.ExecutorFilter.EventType SENT .4.10. On connection opened 3. On data read 3. 105 .red5. On exception 3. On data written 3. toString() public String toString().9.EventType CLOSED .filter.filter.EventType READ .io.EventType EXCEPTION .EventType WRITTEN . OPENED public static final org.red5. On data sent 3.io.red5. On connection closed 3.io.3.io. EXCEPTION public static final org.EventType IDLE . RECEIVED public static final org.io.8.?filter 3.io.filter.ExecutorFilter.filter.red5. On data recieved 3.ExecutorFilter. IDLE public static final org.ExecutorFilter.red5.filter.6.red5.io.

public byte getFlagReserved02(). public byte getVersion(). // Public Constructors public FLVHeader(). public boolean flagAudio . public void setSignature(byte[] signature). 106 . public void setFlagAudio(boolean flagAudio). // Public Methods public int getDataOffset().1. public boolean getFlagVideo(). public byte[] getSignature(). public void setFlagReserved02(byte flagReserved02). Class FLVHeader FLVHeader parses out the contents of a FLV video file and returns the Header data 1. public byte version .1. public byte[] signature . public byte getFlagReserved01(). public byte flagReserved02 . public void setFlagReserved01(byte flagReserved01). public boolean getFlagAudio(). public byte flagReserved01 . Synopsis public class FLVHeader { // Public Fields public int dataOffset . public boolean flagVideo . public void setFlagVideo(boolean type_flags_video). public void setDataOffset(int data_offset).

reserved for data up to 4. hashCode . notify . } Methods inherited from java.294.Object: clone . public void setVersion(byte version). flagReserved01 public byte flagReserved01 . two 1. signature public byte[] signature .2. flagVideo public boolean flagVideo .7.org/flv#flv_header] 1.295 1.5. Reserved flag. public String toString(). Audio flag 1. one 1.?io. equals . dataOffset public int dataOffset .lang.6. Signature 1. flagReserved02 public byte flagReserved02 . toString .Package org.8. notifyAll .?flv public void setTypeFlags(byte typeFlags). finalize .?red5. flagAudio public boolean flagAudio .4.3. getClass . version 107 . wait See Also OSFlash (external) [http://osflash.967. Reserved flag. Video flag 1.

Gets the FlagReserved02 which is a datatype specified in the Flash Specification Parameters return byte FlagReserved02 1. FLV version 1. Returns a boolean on whether this data contains video Parameters 108 . Returns a boolean on whether this data contains audio Parameters return boolean true if this FLV header contains audio data.?io. first 1. getFlagReserved01() public byte getFlagReserved01(). Gets the FlagReserved01 which is a datatype specified in the Flash Specification Parameters return byte Flag reserved.10.9. getFlagAudio() public boolean getFlagAudio().11. getFlagVideo() public boolean getFlagVideo(). getFlagReserved02() public byte getFlagReserved02().12. Returns the data offset bytes Parameters return int Data offset 1.13.?red5.?flv public byte version . false otherwise 1.Package org. getDataOffset() public int getDataOffset().

?red5.18.17.?io. getSignature() public byte[] getSignature(). Gets the version byte Parameters return byte FLV version byte 1. false otherwise 1.16. Returns the signature bytes Parameters return byte[] Signature 1. getVersion() public byte getVersion(). Sets the FlagReserved01 which is a datatype specified in the Flash Specification Parameters flagReserved01 Flag reserved. Sets the audioflag on whether this data contains audio Parameters flagAudio true if this FLV header contains audio data. Sets the data offset bytes Parameters data_offset Data offset 1.15.?flv return boolean true if this FLV header contains vide data.Package org. setDataOffset(int) public void setDataOffset(int data_offset). false otherwise 1. first 109 . setFlagAudio(boolean) public void setFlagAudio(boolean flagAudio). setFlagReserved01(byte) public void setFlagReserved01(byte flagReserved01).14.

setFlagVideo(boolean) public void setFlagVideo(boolean type_flags_video).Package org. setSignature(byte[]) public void setSignature(byte[] signature). setVersion(byte) public void setVersion(byte version). Sets the version byte Parameters version FLV version byte 1. false otherwise 1.?red5. setFlagReserved02(byte) public void setFlagReserved02(byte flagReserved02). 110 .20. toString() public String toString().?flv 1. setTypeFlags(byte) public void setTypeFlags(byte typeFlags).?io.19. Sets the Flag Reserved02 which is a datatype specified in the Flash Specification Parameters flagReserved02 FlagReserved02 1. Sets the type flags on whether this data is audio or video Parameters typeFlags Type flags determining data types (audio or video) 1.21. Sets the signature bytes Parameters signature Signature 1.23.22.24. Sets the audioflag on whether this data contains audio Parameters type_flags_video true if this FLV header contains video data.

server.?flv Overrides the toString method so that a FLVHeader can be represented by its datatypes Parameters return String String representation 2. public org.flv. public void setMetaService(org. } 2. public boolean hasMetaData(). public boolean hasKeyFrameData().io.IMetaService service).io.?red5.meta.Map getKeyFrameData().1.meta.ITagWriter writerFromNearestKeyFrame(int seekPoint).util. public void setKeyFrameData(java. public org.?io. public org.api. Synopsis public interface IFLV extends.2. flushHeaders() public void flushHeaders() throws IOException.Package org.flv. Interface IFLV Represents FLV file 2. public void setMetaData(org.cache.IMetaData getMetaData() throws FileNotFoundException.red5.ITagReader readerFromNearestKeyFrame(int seekPoint).io.io.?io.meta. IOException.red5. Flushes Header IOException Any I/O exception 111 .Map keyframedata).?IStreamableFile { // Public Methods public void flushHeaders() throws IOException. public java.flv.util.red5. public void setCache(org. public void refreshHeaders() throws IOException.red5.IMetaData metadata) throws FileNotFoundException.?red5. org.red5.red5.ICacheStore cache).io.

red5.meta.io.IMetaData getMetaData() throws FileNotFoundException.5. false otherwise 2.Package org. hasMetaData() public boolean hasMetaData().ITagReader readerFromNearestKeyFrame(int seekPoint). Returns a map of the metadata Parameters return FileNotFoundException metadata File metadata File not found 2.4.flv. hasKeyFrameData() public boolean hasKeyFrameData().7. false otherwise 2.?red5.6. Gets the keyframe data Parameters return keyframedata Keyframe metadata 2.io.Map getKeyFrameData().red5. readerFromNearestKeyFrame(int) public org. getMetaData() public org. Returns a boolean stating whether a flv has keyframedata Parameters return boolean true if file has keyframe metadata.3.?io.util. getKeyFrameData() public java.?flv 2. Returns a boolean stating whether the flv has metadata Parameters return boolean true if file has injected metadata. Returns a Reader closest to the nearest keyframe Parameters seekPoint Point in file we are seeking around 112 .

10. Sets the MetaService through Spring 113 .IMetaService service). setMetaData(IMetaData) public void setMetaData(org.Map keyframedata).meta.?flv return reader Tag reader closest to that point 2.cache.meta.io. Sets the keyframe data of a flv file Parameters keyframedata Keyframe metadata 2.?red5.12. setCache(ICacheStore) public void setCache(org.8. refreshHeaders() public void refreshHeaders() throws IOException.11.ICacheStore cache).9.Package org. setMetaService(IMetaService) public void setMetaService(org.flv.red5. Refreshes the headers. Usually used after data is added to the flv file IOException Any I/O exception 2.IMetaData metadata) throws FileNotFoundException.?io.io.util. setKeyFrameData(Map) public void setKeyFrameData(java.flv.server. Sets the caching implemenation Parameters cache 2. IOException.red5.api. Sets the metadata Parameters metadata FileNotFoundException Metadata object File not found IOException Any other I/O exception 2.red5.

Interface IKeyFrameDataAnalyzer 114 . Synopsis public interface IFLVService extends.red5.object.io.io.red5.?flv Parameters service Metadata service 2.object.ITagWriter writerFromNearestKeyFrame(int seekPoint). Interface IFLVService A FLVService sets up the service and hands out FLV objects to its callers 3. Returns a Writer based on the nearest key frame Parameters seekPoint return Point in file we are seeking around writer Tag writer closest to that point 3.red5. writerFromNearestKeyFrame(int) public org.red5.red5. setSerializer(Serializer) public void setSerializer(org.?IStreamableFileService { // Public Methods public void setDeserializer(org. public void setSerializer(org.?io.3.Deserializer deserializer). org.Serializer serializer).Package org. Sets the deserializer Parameters deserializer Deserializer object 3.object.io.2. setDeserializer(Deserializer) public void setDeserializer(org.Serializer serializer). } 3. Sets the serializer Parameters serializer Serializer object 4.13.object.io.?red5.Deserializer deserializer).?io.1.?red5.io.

Object: clone .?red5.Package org. notifyAll .IKeyFrameDataAnalyzer.?Serializable { // Public Fields public boolean audioOnly .KeyFrameMeta analyzeKeyFrames().1.?io.?io. java.KeyFrameMeta Keyframe metadata.io. wait 5. Synopsis public interface IKeyFrameDataAnalyzer { // Public Methods public org.1. public long[] positions .2.red5.flv. // Public Constructors public IKeyFrameDataAnalyzer. equals . Analyze and return keyframe metadata. analyzeKeyFrames() public org.red5. } 4. Synopsis public static class IKeyFrameDataAnalyzer.KeyFrameMeta analyzeKeyFrames().flv. Class IKeyFrameDataAnalyzer. toString .2. notify .?flv Analyzes key frame data.KeyFrameMeta(). Only audio frames? 115 . hashCode . public long duration . Parameters return Metadata object 5.KeyFrameMetaimplements. audioOnly public boolean audioOnly . finalize . public int[] timestamps .io.lang. } Methods inherited from java. getClass .IKeyFrameDataAnalyzer. 4. 5.

?flv 5.Package org.?io. timestamps public int[] timestamps .3.5. duration public long duration . Keyframe positions 5.?red5.4. positions public long[] positions . Keyframe timestamps 116 . Duration in milliseconds 5.

io.cache.io.ITagWriter getAppendWriter() throws IOException. public boolean hasMetaData(). public boolean hasKeyFrameData().?io.red5.util. public FLV(java.?IFLV { // Protected Fields protected static org. Class FLV A FLVImpl implements the FLV api 1.Logger log .ITagReader getReader() throws IOException.io.io.Map keyframedata).meta.red5. public void setCache(org.red5. // Public Constructors public FLV(). 117 .ICacheStore cache).io. public void refreshHeaders() throws IOException. public void setKeyFrameData(java.io. public void setMetaData(org. // Public Methods public void flushHeaders() throws IOException.IMetaData meta) throws IOException. public java.red5.File file.slf4j.Map getKeyFrameData(). public org.red5.flv.meta.server.IMetaData getMetaData() throws FileNotFoundException. Synopsis public class FLVimplements.red5.io.ITagReader readerFromNearestKeyFrame(int seekPoint).?red5. public org.1.?flv. public org.api.io. public org.File file).flv.util. org. boolean generateMetadata).flv. public org.red5.meta.1. public void setMetaService(org.IMetaService service). public FLV(java.ITagWriter getWriter() throws IOException.io.red5.

getKeyFrameData() public java.File file).io.io.?red5. 1.util. } Methods inherited from java.red5. FLV() public FLV(). wait 1.red5. FLV(File) public FLV(java.?io.ITagWriter writerFromNearestKeyFrame(int seekPoint).2.?impl public org. 1. FLV(File.Package org. hashCode . boolean) public FLV(java.?flv. finalize . flushHeaders() public void flushHeaders() throws IOException. notify .6.lang. Default constructor.io.5. toString . equals . 118 .Object: clone .7. used by Spring so that parameters may be injected.3. notifyAll . Create FLV from given file source and with specified metadata generation option Parameters file generateMetadata File source Metadata generation option 1.ITagWriter getAppendWriter() throws IOException. Create FLV from given file source Parameters file File source 1.File file. getAppendWriter() public org.io.4. boolean generateMetadata). getClass .Map getKeyFrameData(). Specified by: Method flushHeaders in interface IFLV Flushes Header 1.

ITagWriter getWriter() throws IOException. 1.14. Usually used after data is added to the flv file 119 .?red5.meta. hasMetaData() public boolean hasMetaData(). Specified by: Method hasKeyFrameData in interface IFLV Returns a boolean stating whether a flv has keyframedata 1. Specified by: Method hasMetaData in interface IFLV Returns a boolean stating whether the flv has metadata 1.io.ITagReader readerFromNearestKeyFrame(int seekPoint).10. 1.9.12.11.IMetaData getMetaData() throws FileNotFoundException.?impl Specified by: Method getKeyFrameData in interface IFLV Gets the keyframe data 1.13. Specified by: Method readerFromNearestKeyFrame in interface IFLV Returns a Reader closest to the nearest keyframe 1. refreshHeaders() public void refreshHeaders() throws IOException. readerFromNearestKeyFrame(int) public org.red5.?flv.io.red5. getWriter() public org. hasKeyFrameData() public boolean hasKeyFrameData(). Specified by: Method getMetaData in interface IFLV Returns a map of the metadata 1.?io.io.flv.8.red5. Specified by: Method refreshHeaders in interface IFLV Refreshes the headers.red5. getReader() public org.Package org. getMetaData() public org.io.ITagReader getReader() throws IOException.

IMetaService service).red5. 2. org. Parameters cache Cache store 1. Specified by: Method setMetaData in interface IFLV Sets the metadata 1.18.flv.?io.Package org.flv. Specified by: Method setCache in interface IFLV Sets the cache implementation to be used.meta.?flv.?io.red5. org.?ITagReader.ITagWriter writerFromNearestKeyFrame(int seekPoint). NOTE: This class is not implemented as threading-safe.?impl 1. writerFromNearestKeyFrame(int) public org.?io.19.api. The caller should make sure the threading-safety.?red5.?i // Public Constructors 120 .red5.io. setMetaData(IMetaData) public void setMetaData(org.17.?red5.15.io. setMetaService(IMetaService) public void setMetaService(org.16. Synopsis public class FLVReaderimplements.ICacheStore cache). Specified by: Method setMetaService in interface IFLV Sets the MetaService through Spring 1.server.util. setKeyFrameData(Map) public void setKeyFrameData(java. setCache(ICacheStore) public void setCache(org. Specified by: Method writerFromNearestKeyFrame in interface IFLV Returns a Writer based on the nearest key frame 2.io.?red5.meta.Map keyframedata).IMetaData meta) throws IOException. Class FLVReader A Reader is used to read the contents of a FLV file. Specified by: Method setKeyFrameData in interface IFLV Sets the keyframe data of a flv file 1.?IoConstants. org.cache.?red5.red5.1.

io.flv. public void decodeHeader().?io. public static void setBufferSize(int bufferSize). public static String getBufferType().?impl public FLVReader(java.red5.KeyFrameMeta analyzeKeyFrames(). public static long getDuration(java.mina. } 121 .common.IKeyFrameDataAnalyzer. public org.File f.red5. public long getTotalBytes(). public int getOffset().ITag readTag().io. // Public Methods public synchronized org. public boolean hasVideo().ByteBuffer getFileData().io. public boolean hasMoreTags().File flvFile). public org.io.IKeyFrameMetaCache keyframeCache).common.red5. public synchronized org.apache.?red5.?flv.io. public void close(). public void position(long pos).io.mina. public int getVideoCodecId(). public int getAudioCodecId(). public FLVReader(org. boolean generateMetadata) throws IOException.apache.Package org. public FLVReader(java.IStreamableFile getFile().File f) throws IOException. public void setKeyFrameCache(org.red5.ByteBuffer buffer. public static void setBufferType(String bufferType).io. public long getBytesRead(). // Public Static Methods public static int getBufferSize(). boolean generateMetadata). public long getDuration().

4. false otherwise Byte buffer 2. Accepts mapped file bytes to construct internal members.IKeyFrameDataAnalyzer. getClass . finalize . boolean) public FLVReader(org. Parameters generateMetadata buffer true if metadata generation required. equals .io.apache.io. boolean generateMetadata) throws IOException. false otherwise 2.3.?flv. notify .red5. analyzeKeyFrames() public synchronized org.Object: clone .2.?io. wait 2. Creates FLV reader from file input stream.?red5.mina. boolean) public FLVReader(java. FLVReader(File) public FLVReader(java.common.File f) throws IOException. FLVReader(File. sets up metadata generation flag. Parameters f File 2.io. boolean generateMetadata).?impl Methods inherited from java. Creates FLV reader from file input stream.lang.File f. Parameters f generateMetadata File input stream true if metadata generation required. Parameters return Keyframe metadata 122 .KeyFrameMeta analyzeKeyFrames().5. FLVReader(ByteBuffer.Package org. toString . hashCode .ByteBuffer buffer.flv. Specified by: Method analyzeKeyFrames in interface IKeyFrameDataAnalyzer Key frames analysis may be used as a utility method so synchronize it. notifyAll .

getBufferSize() public static int getBufferSize(). Parameters return Value for property 'bufferType' 2. Parameters return Value for property 'bufferSize' 2.?impl 2. 2.9.?io. Getter for buffer size. close() public void close().?flv.12. 2. 123 . getBytesRead() public long getBytesRead().io. Specified by: Method close in interface ITagReader Closes the reader and free any allocated memory. direct or heap). Specified by: Method getDuration in interface ITagReader Return length in seconds 2. getDuration() public long getDuration().11.6.red5. decodeHeader() public void decodeHeader().Package org.7.10.IStreamableFile getFile(). getBufferType() public static String getBufferType(). Specified by: Method getBytesRead in interface ITagReader Returns the amount of bytes read 2. Getter for buffer type (auto.8.?red5. getFile() public org. Specified by: Method decodeHeader in interface ITagReader Decode the header of the stream.

14. Specified by: Method getTotalBytes in interface ITagReader Get the total readable bytes in a file or ByteBuffer. 2. Specified by: Method position in interface ITagReader 124 .common. hasVideo() public boolean hasVideo(). Specified by: Method hasVideo in interface ITagReader Check if the reader also has video tags.16. Parameters return File contents as byte buffer 2. Returns the file buffer.Package org.mina. 2.ByteBuffer getFileData().apache. Specified by: Method hasMoreTags in interface ITagReader Returns a boolean stating whether the FLV has more tags 2. Specified by: Method getOffset in interface ITagReader Returns the offet length 2.?flv. Parameters return Total readable bytes 2.17. position(long) public void position(long pos).?impl Specified by: Method getFile in interface ITagReader Return the file that is loaded. getOffset() public int getOffset().?red5.13.?io. getFileData() public org.15.18. hasMoreTags() public boolean hasMoreTags(). getTotalBytes() public long getTotalBytes().

Specified by: Method readTag in interface ITagReader Returns a Tag object 2. 125 .?red5.ITag readTag().19. 2. org. not sit in the middle of a frame). Class FLVService A FLVServiceImpl sets up the service and hands out FLV objects to its callers.MAX_VALUE to seek to end of file. The caller must ensure the pos is a valid one (eg. public String getExtension().?red5.?flv. Pass Long.?flv.red5.?impl Put the current position to pos.object.red5. Synopsis public class FLVService extends.1.21.?io. 3.?IFLVService { // Public Constructors public FLVService().io. setBufferSize(int) public static void setBufferSize(int bufferSize).Package org. org. // Public Methods public org. Parameters bufferType Value to set for property 'bufferType' 3. readTag() public synchronized org. public String getPrefix(). Setter for property 'bufferSize'.20. Parameters bufferSize Value to set for property 'bufferSize' 2.?io.io. setBufferType(String) public static void setBufferType(String bufferType).?red5.?io. Parameters pos New position in file.Deserializer getDeserializer(). Setter for buffer type.?BaseStreamableFileService implements.

red5.object. public void setSerializer(org.red5.Package org. 3.IStreamableFile getStreamableFile(java.io. getDeserializer() public org.object.io. getExtension . public void setGenerateMetadata(boolean generate). 126 . prepareFilename Methods inherited from java.red5. getPrefix . getStreamableFile .io.File file) throws IOException.io. public org.2.Serializer serializer).object.?impl public org. getClass . toString .File file) throws IOException. getPrefix() public String getPrefix().io.4.red5.red5.Deserializer deserializer). Getter for deserializer Parameters return Deserializer 3. 3. hashCode . equals .red5.object. public void setDeserializer(org.io. getSerializer() public org.Serializer getSerializer(). notify . notifyAll .red5.Serializer getSerializer().io.?red5.red5.BaseStreamableFileService: canHandle . } Methods inherited from org. getStreamableFile(File) public org.6.3. finalize . Getter for serializer Parameters return Serializer 3.io.io. getExtension() public String getExtension().Deserializer getDeserializer().?flv. wait 3.5.Object: clone .IStreamableFile getStreamableFile(java.?io.io.lang.object.

7.9.object. public void writeHeader() 127 . Specified by: Method setSerializer in interface IFLVService Sets the serializer 4.1.flv. public FLVWriter(java. setSerializer(Serializer) public void setSerializer(org.?red5.FileOutputStream fos.io.?red5. public void setFLV(org.red5.red5. false otherwise 3.io. public void setOffset(int offset).IStreamableFile getFile().?impl 3. boolean append).io. setGenerateMetadata(boolean) public void setGenerateMetadata(boolean generate).red5. // Public Methods public void close(). public long getBytesWritten().io. boolean append).Package org.io. setDeserializer(Deserializer) public void setDeserializer(org.Deserializer deserializer). Generate metadata or not Parameters generate true if there's need to generate metadata.File file.?io. org.8. public org.?io. Class FLVWriter A Writer is used to write the contents of a FLV file 4.Serializer serializer).?flv. Specified by: Method setDeserializer in interface IFLVService Sets the deserializer 3.io.IFLV flv).?ITagWriter { // Public Constructors public FLVWriter(java. public int getOffset(). Synopsis public class FLVWriterimplements.object.red5.

5.io. 128 . toString .io.?io. Specified by: Method close in interface ITagWriter Closes a Writer 4. finalize . boolean) public FLVWriter(java. } Methods inherited from java. FLVWriter(File.java uses this constructor so we have access to the file object Parameters file lastTag File output stream Last tag 4.3. boolean append).ITag tag) throws IOException. hashCode . getClass .FileOutputStream fos. getBytesWritten() public long getBytesWritten().red5.io.common. public boolean writeTag(org.File file. wait 4.?flv. boolean) public FLVWriter(java.Package org. boolean append).?impl throws IOException. Creates writer implementation with given file and last tag FLV. public boolean writeStream(byte[] b). Creates writer implementation with given file output stream and last tag Parameters fos lastTag File output stream Last tag 4.?red5. notifyAll . equals .Object: clone .ByteBuffer data) throws IOException. org. notify . public boolean writeTag(byte type.mina.apache.2.4. FLVWriter(FileOutputStream.lang. close() public void close().

129 .Package org. Setter for offset Parameters offset Value to set for offset 4.?flv.11.7.?red5.IStreamableFile getFile(). Specified by: Method writeHeader in interface ITagWriter Writes the header bytes IOException Any I/O exception 4.red5. Specified by: Method getOffset in interface ITagWriter Return the offset 4. Specified by: Method getFile in interface ITagWriter Return the file that is written.flv.IFLV flv).?io. getFile() public org. 4. setFLV(IFLV) public void setFLV(org. getOffset() public int getOffset().6.?impl Specified by: Method getBytesWritten in interface ITagWriter Return the bytes written 4. setOffset(int) public void setOffset(int offset).9.8.red5. writeStream(byte[]) public boolean writeStream(byte[] b). Setter for FLV object Parameters flv FLV source 4. writeHeader() public void writeHeader() throws IOException.10.io.io.

1. public int getTimestamp(). ByteBuffer) public boolean writeTag(byte type. 5.apache.13.?impl Specified by: Method writeStream in interface ITagWriter Write a Stream to disk using bytes 4.common. writeTag(byte.?red5. public org. public Tag(byte dataType.apache. 130 . public int getBodySize(). int bodySize.ByteBuffer body.?io. org.ByteBuffer getBody(). public int getPreviousTagSize().ByteBuffer getData(). Class Tag A Tag represents the contents or payload of a FLV file.common.common.io.common.mina. org.?flv.apache.mina. Specified by: Method writeTag in interface ITagWriter Writes a Tag object 5. public int getPreviuosTagSize(). public org.ITag tag) throws IOException.?ITag { // Public Constructors public Tag(). int previousTagSize). org.apache. Specified by: Method writeTag in interface ITagWriter Write a Tag using bytes 4. writeTag(ITag) public boolean writeTag(org.ByteBuffer data) throws IOException.mina. Synopsis public class Tagimplements.red5.12.?io. int timestamp.?red5.Package org. public byte getDataType().mina. // Public Methods public byte getBitflags().

notify . int) public Tag(byte dataType. } Methods inherited from java.Package org. TagImpl Constructor Parameters dataType timestamp bodySize Tag data type Timestamp Tag body size 131 . public void setDataType(byte dataType).3.?impl public byte getType().apache.Object: clone .ByteBuffer body. public void setBitflags(byte bitflags). 5.lang. finalize .?flv. int timestamp. public void setBody(org. public void setType(byte type). toString . notifyAll . int.org/flv#flv_tag] 5. int previousTagSize). Tag() public Tag().mina.?io. public void setTimestamp(int timestamp). getClass . int. public void setPreviuosTagSize(int previuosTagSize). public void setData().common.?red5.ByteBuffer body). public String toString().apache. org. equals . ByteBuffer.common.2. Tag(byte. public void setPreviousTagSize(int size). int bodySize. hashCode . wait See Also OSFlash (external) [http://osflash. Constructs a new Tag. public void setBodySize(int bodySize).mina.

Getter for bit flags Parameters return Value for bit flags 5. Specified by: Method getDataType in interface ITag Get the data type 132 . getData() public org. getDataType() public byte getDataType().mina.4. Specified by: Method getData in interface ITag Returns the data as a ByteBuffer 5.ByteBuffer getBody().8.?impl body previousTagSize Tag body Previous tag size information 5. Specified by: Method getBody in interface ITag Return the body ByteBuffer Parameters return Tag body 5. getBitflags() public byte getBitflags().?red5. getBody() public org.?flv.common.common.mina. Specified by: Method getBodySize in interface ITag Return the size of the body Parameters return Tag body size 5.apache.5. getBodySize() public int getBodySize().apache.ByteBuffer getData().7.?io.Package org.6.

?flv. Getter for previous tag size Parameters return Value for previous tag size 5.?red5. Setter for bit flags 133 . getPreviousTagSize() public int getPreviousTagSize().9. getPreviuosTagSize() public int getPreviuosTagSize().13.?io. Specified by: Method getTimestamp in interface ITag Return the timestamp Parameters return Tag timestamp 5.Package org.12.?impl Parameters return Tag data type 5. getType() public byte getType(). setBitflags(byte) public void setBitflags(byte bitflags). Getter for tag type Parameters return Tag type 5.11.10. Specified by: Method getPreviousTagSize in interface ITag Return previous tag size Parameters return Previous tag size 5. getTimestamp() public int getTimestamp().

Specified by: Method setBodySize in interface ITag Set the size of the body.16. 5. setBodySize(int) public void setBodySize(int bodySize).?io. 5. Specified by: Method setDataType in interface ITag Set the data type. Specified by: Method setPreviousTagSize in interface ITag Set the size of the previous tag.common.?flv.mina.20. 5.?red5.Package org. 5.ByteBuffer body). Specified by: Method setBody in interface ITag Set the body ByteBuffer. Setter for previous tag size Parameters previuosTagSize Value to set for previous tag size 5. setPreviousTagSize(int) public void setPreviousTagSize(int size). Setter for tag data. 134 . setBody(ByteBuffer) public void setBody(org.15. setPreviuosTagSize(int) public void setPreviuosTagSize(int previuosTagSize).14. 5.18. setData() public void setData().19.apache. setDataType(byte) public void setDataType(byte dataType).17. setTimestamp(int) public void setTimestamp(int timestamp).?impl Parameters bitflags Bit flags 5. Empty method.

5.22.21. Setter for tag type Parameters type Tag type 5. setType(byte) public void setType(byte type).?flv. Prints out the contents of the tag Parameters return Tag contents 135 .Package org.?red5.?impl Specified by: Method setTimestamp in interface ITag Set the timestamp. toString() public String toString().?io.

public double getTime().?Comparable { // Public Methods public String getName(). } 1.?IMeta.2. Synopsis public interface IMeta extends. java.?lang. Cue point type of navigation 2.1. NAVIGATION public static final String NAVIGATION = "navigation".?flv.?io. Interface IMetaCue ICuePoint defines contract methods for use with cuepoints 3. public static final String NAVIGATION = "navigation". Synopsis public interface ICueType { // Public Static Fields public static final String EVENT = "event".?io. Interface IMeta IMeta is a Marker Interface CuePoint and MetaData both implement this interface 2.?red5. EVENT public static final String EVENT = "event".3. Cue point type of event 1.1. java.?meta. Synopsis public interface IMetaCue extends.1.?Serializable { } 3. Interface ICueType Cue point type 1. 136 .1. org.

4.6.?io. Gets the type Parameters return type Cue point type 3. getType() public String getType().2.?meta public String getType(). setTime(double) public void setTime(double d). getName() public String getName().3. setName(String) public void setName(String name). 137 . Sets the name Parameters name Cue point name 3.5. } 3. getTime() public double getTime(). public void setTime(double d).?flv. public void setName(String name). Gets the time Parameters return time Timestamp 3.Package org.?red5. Gets the name Parameters return name Cue point name 3. public void setType(String type).

1.?io. org. public int getVideoCodecId(). Synopsis public interface IMetaData<K. public void setDuration(double d).?meta. setType(String) public void setType(String type).7. public void setFrameRate(double rate). public int getHeight(). public IMetaCue[] getMetaCue(). public void setHeight(int h). Sets the type type can be "event" or "navigation" Parameters type Cue point type 4.?flv.?flv.?red5.?IMeta { // Public Methods public int getAudioCodecId().?meta Sets the time Parameters d Timestamp 3. 138 . public void setCanSeekToEnd(boolean b).Package org. public void setMetaCue(IMetaCue[] metaCue). public void setAudioCodecId(int id). Interface IMetaData FLV MetaData interface 4.?red5. public double getFrameRate().V> extends.?io. public int getVideoDataRate(). public int getWidth(). public boolean getCanSeekToEnd(). public double getDuration().

getFrameRate() public double getFrameRate(). Parameters return duration Video duration in seconds 4. Returns the framerate.6. getCanSeekToEnd() public boolean getCanSeekToEnd().Package org. public void setWidth(int w).5. } 4. Returns the height Parameters return height Video height 4. getHeight() public int getHeight().?red5.?meta public void setVideoCodecId(int id).?flv. Gets the cue points 139 . getDuration() public double getDuration(). public void setVideoDataRate(int rate). getMetaCue() public IMetaCue[] getMetaCue(). Parameters return FLV framerate in frames per second 4. Returns a boolean depending on whether the video can seek to end Parameters return true if file is seekable to the end.?io. false otherwise 4.2. Returns the duration.4.3.

getVideoDataRate() public int getVideoDataRate().Package org. Sets the duration.7. Returns the video codec id Parameters return Video codec id 4.?flv.11. Returns the videodatarate Parameters return Video data rate 4. Returns the width Video width Parameters return width 4.?red5. getWidth() public int getWidth().9. setCanSeekToEnd(boolean) public void setCanSeekToEnd(boolean b). getVideoCodecId() public int getVideoCodecId(). Sets whether a video can seek to end Parameters b true if file is seekable to the end.10. setDuration(double) public void setDuration(double d).?io.8. Parameters d Video duration in seconds 140 . false otherwise 4.?meta Parameters return Cue points 4.

17. Parameters rate FLV framerate in frames per second 4.?meta 4. Sets the framerate.16.?red5.Package org. Sets the video codec id Parameters id Video codec id 4.14. Sets the cue points Parameters metaCue Cue points 4. setWidth(int) public void setWidth(int w).15. setFrameRate(double) public void setFrameRate(double rate). setMetaCue(IMetaCue[]) public void setMetaCue(IMetaCue[] metaCue). setVideoDataRate(int) public void setVideoDataRate(int rate).12.?flv. Sets the videodatarate Parameters rate Video data rate 4.13. setVideoCodecId(int) public void setVideoCodecId(int id).?io. 141 . setHeight(int) public void setHeight(int h). Sets the height Parameters h Video height 4.

io. public void writeMetaCue(). Synopsis public interface IMetaService { // Public Methods public IMetaCue[] readMetaCue().1.io. public void setOutStream(java.apache.mina. public MetaData readMetaData(org.?io. public void writeMetaData(IMetaData metaData).apache. Read the Meta Cue Points Parameters return Meta cue points 5.?flv.Package org. Interface IMetaService IMetaService Defines the MetaData Service API 5. Read the MetaData Parameters buffer return Byte buffer source metaData Metadata 142 .?red5.common.common. } 5.3. readMetaData(ByteBuffer) public MetaData readMetaData(org.ByteBuffer buffer).ByteBuffer buffer).FileOutputStream fos).2. readMetaCue() public IMetaCue[] readMetaCue().FileInputStream fis).mina.?meta Sets the width Parameters w Video width 5. public void write(IMetaData meta) throws IOException. public void setInStream(java.

FileOutputStream fos).io. Setter for input stream Parameters fis File input stream 5.7.?meta 5. Setter for output stream Parameters fos File output stream 5.4. Writes the Meta Cue Points 5.?io. write(IMetaData) public void write(IMetaData meta) throws IOException.?flv. writeMetaCue() public void writeMetaCue(). Initiates writing of the MetaData Parameters meta IOException Metadata I/O exception 5. setOutStream(FileOutputStream) public void setOutStream(java.6.Package org.8. Interface IResolver Merge metadata objects 143 . Writes the MetaData Parameters metaData Metadata 6.5.io. writeMetaData(IMetaData) public void writeMetaData(IMetaData metaData).FileInputStream fis). setInStream(FileInputStream) public void setInStream(java.?red5.

V> extends. IMeta) public IMeta resolve(IMeta m1.Package org. Cue points are of two types: • Embedded into FLV or SWF • External.?HashMap implements.?IMetaCue { // Public Constructors public MetaCue(). To add cue point trigger event listener at client-side in Flex/Flash application. IMeta m2).?util. Cue points are usually used as event triggers down video flow or navigation points in a file. timestamp.?io. Each cue point have at least one attribute. Synopsis public class MetaCue<K. IMeta m2). use NetStream. with FLVPlayback component or ActionScript) on both server-side and client-side. 7. Synopsis public interface IResolver { // Public Methods public IMeta resolve(IMeta m1. java. or added on fly (e. Timestamp specifies position of cue point in FLV file.?meta 6. public String getName().onCuePoint event handler.?red5.1.1.2.?meta. org. Class MetaCue Cue point is metadata marker used to control and accompany video playback with clientside application events.?red5.?flv. resolve(IMeta. 144 .g. } 6. Merges the two Meta objects Parameters m1 m2 return IMeta Meta 7. // Public Methods public int compareTo(Object arg0).?flv.?io.

6. entrySet . keySet . putAll . hashCode .?meta public double getTime().?red5.util. remove . put . public void setType(String type). public String toString(). CuePoint constructor 7. Specified by: Method getName in interface IMetaCue Gets the name 7. 7.AbstractMap: equals . get .Package org. notify .HashMap: clear . getName() public String getName().2.?io. getTime() public double getTime().4. public String getType(). getClass .Object: finalize .?flv. containsKey .lang. Specified by: Method getTime in interface IMetaCue Gets the time 7. MetaCue() public MetaCue().3. clone .5. isEmpty . getType() public String getType(). toString Methods inherited from java. Specified by: Method getType in interface IMetaCue Gets the type 145 . public void setTime(double d). } Methods inherited from java. containsValue . notifyAll . public void setName(String name). compareTo(Object) public int compareTo(Object arg0). values Methods inherited from java. wait 7. size .util.

setType(String) public void setType(String type).Package org. public int getVideoCodecId().?meta. // Public Methods public int getAudioCodecId(). org. toString() public String toString().7. public int getHeight().?HashMap implements. setName(String) public void setName(String name).?red5.?IMetaData { // Public Constructors public MetaData().8.?red5. Class MetaData MetaData Implementation 8. setTime(double) public void setTime(double d). Specified by: Method setType in interface IMetaCue Sets the type type can be "event" or "navigation" 7.V> extends.?flv.?io. public double getDuration(). public IMetaCue[] getMetaCue().9. Specified by: Method setTime in interface IMetaCue Sets the time 7.?flv. Synopsis public class MetaData<K.?util.?meta 7.10. public double getFrameRate(). 8. Specified by: Method setName in interface IMetaCue Sets the name 7. java.?io. public boolean getCanSeekToEnd().1. 146 .

putAll .lang.4. values Methods inherited from java.HashMap: clear . } Methods inherited from java. keySet . public void setVideoCodecId(int id). public void setFrameRate(double rate).?meta public int getVideoDataRate().?io.3. public void setMetaCue(IMetaCue[] cuePoints). containsValue . public void setCanSeekToEnd(boolean b). Specified by: Method getCanSeekToEnd in interface IMetaData Returns a boolean depending on whether the video can seek to end 8. public String toString(). size . public void setDuration(double d). put .util. getClass . isEmpty . hashCode . public int getWidth(). 147 . remove .AbstractMap: equals . public void setAudioCodecId(int id).Package org. toString Methods inherited from java.util. entrySet .2. getDuration() public double getDuration(). Specified by: Method getDuration in interface IMetaData Returns the duration. MetaData() public MetaData(). clone . MetaData constructor 8.?red5. get . public void setVideoDataRate(int rate). public void setHeight(int h). notifyAll . getCanSeekToEnd() public boolean getCanSeekToEnd(). public void setWidth(int w). notify .Object: finalize . wait 8.?flv. containsKey .

8.Package org. 148 .9. getVideoCodecId() public int getVideoCodecId().8. Specified by: Method getFrameRate in interface IMetaData Returns the framerate. Specified by: Method getHeight in interface IMetaData Returns the height 8.7.5. getVideoDataRate() public int getVideoDataRate().11. Specified by: Method getVideoCodecId in interface IMetaData Returns the video codec id 8.?meta 8.?io. Specified by: Method getVideoDataRate in interface IMetaData Returns the videodatarate 8. getMetaCue() public IMetaCue[] getMetaCue(). Specified by: Method getWidth in interface IMetaData Returns the width Video width 8.?flv. getWidth() public int getWidth(). Specified by: Method getMetaCue in interface IMetaData Return array of cue points Parameters return Array of cue points 8.?red5. getFrameRate() public double getFrameRate().10. setCanSeekToEnd(boolean) public void setCanSeekToEnd(boolean b).6. getHeight() public int getHeight().

?flv.Package org.?red5. Specified by: Method setMetaCue in interface IMetaData Sets the Meta Cue Points Parameters cuePoints The cuePoints to set.17. 8. Specified by: Method setVideoDataRate in interface IMetaData Sets the videodatarate 149 .12. Specified by: Method setVideoCodecId in interface IMetaData Sets the video codec id 8. 8. 8.13.15.14. Specified by: Method setDuration in interface IMetaData Sets the duration.?meta Specified by: Method setCanSeekToEnd in interface IMetaData Sets whether a video can seek to end 8. setFrameRate(double) public void setFrameRate(double rate).?io. setHeight(int) public void setHeight(int h). setDuration(double) public void setDuration(double d). setMetaCue(IMetaCue[]) public void setMetaCue(IMetaCue[] cuePoints). Specified by: Method setHeight in interface IMetaData Sets the height 8. setVideoDataRate(int) public void setVideoDataRate(int rate). Specified by: Method setFrameRate in interface IMetaData Sets the framerate. setVideoCodecId(int) public void setVideoCodecId(int id).16.

9. public void writeMetaCue().?flv.Deserializer getDeserializer(). public void setDeserializer(org.object.FileInputStream fis). public void setInStream(java.object. Specified by: Method setWidth in interface IMetaData Sets the width 8.io.io. public void setSerializer(org.ByteBuffer buffer). public void write(IMetaData meta) throws IOException.io. public java.?io.File getFile().red5. // Public Methods public org.apache.red5.?meta 8.?flv.?red5.object. public Resolver getResolver().common.red5.1.io.mina.io. public MetaData readMetaData(org.object.18. public void setOutStream(java. public void setFile(java.Serializer serializer).?red5.io. Synopsis public class MetaServiceimplements.io.File file).io. toString() public String toString(). public void setResolver(Resolver resolver). setWidth(int) public void setWidth(int w).FileOutputStream fos).File poFil).?IMetaService { // Public Constructors public MetaService().red5. Class MetaService MetaService represents a MetaData service in Spring 9.Serializer getSerializer(). public org. public MetaService(java.Package org. public IMetaCue[] readMetaCue().19. 150 .?meta. org.io.Deserializer deserializer).?io.

io. notifyAll . 9. MetaService() public MetaService().5. equals .?red5. Parameters return Returns the resolver. MetaService constructor 9. hashCode .Serializer getSerializer(). Parameters return Returns the file. toString . Parameters return Returns the deserializer. getClass .io. Parameters return Returns the serializer. 9.3.io.2.red5. getResolver() public Resolver getResolver().?flv. notify . Specified by: Method readMetaCue in interface IMetaService 151 . 9.7. 9.object.File getFile(). readMetaCue() public IMetaCue[] readMetaCue().object.red5.Deserializer getDeserializer(). getDeserializer() public org. } Methods inherited from java. wait 9.Package org.?io. finalize .?meta public void writeMetaData(IMetaData metaData). getSerializer() public org.Object: clone . getFile() public java.6.lang.4.

Parameters resolver The resolver to set. setFile(File) public void setFile(java.io.12.?red5.9.red5.Package org. setSerializer(Serializer) public void setSerializer(org.red5. readMetaData(ByteBuffer) public MetaData readMetaData(org.11. 9.io.io.object.13.?flv. setDeserializer(Deserializer) public void setDeserializer(org.io.?io.mina.?meta Read the Meta Cue Points 9. setResolver(Resolver) public void setResolver(Resolver resolver).ByteBuffer buffer).File file). Specified by: Method setOutStream in interface IMetaService Setter for output stream 9.Serializer serializer). Specified by: Method readMetaData in interface IMetaService Read the MetaData 9.10.Deserializer deserializer).14. 9.common. Parameters deserializer The deserializer to set. setInStream(FileInputStream) public void setInStream(java.8.object. 9.FileOutputStream fos). setOutStream(FileOutputStream) public void setOutStream(java.io.FileInputStream fis). Specified by: Method setInStream in interface IMetaService Setter for input stream 9. 152 . Parameters file The file to set.apache.

notify . write(IMetaData) public void write(IMetaData meta) throws IOException. org.?flv. Class Resolver Metadata resolver implementation. } Methods inherited from java.2.?meta. 153 .?red5.Package org. 9. // Public Methods public IMeta resolve(IMeta m1. hashCode . writeMetaData(IMetaData) public void writeMetaData(IMetaData metaData).1. getClass . wait 10.15. equals . Synopsis public class Resolverimplements. IMeta m2). Specified by: Method write in interface IMetaService Initiates writing of the MetaData 9.?io. Specified by: Method writeMetaData in interface IMetaService Writes the MetaData 10.lang. finalize .?IResolver { // Public Constructors public Resolver(). Resolver() public Resolver().17.?red5.Object: clone . notifyAll .?meta Parameters serializer The serializer to set. toString .16.?io.?flv. Specified by: Method writeMetaCue in interface IMetaService Writes the Meta Cue Points 9. merges metadata objects 10. writeMetaCue() public void writeMetaCue().

Specified by: Method resolve in interface IResolver Merges the two Meta objects 154 . IMeta) public IMeta resolve(IMeta m1. resolve(IMeta.?io. IMeta m2).?flv.?red5.3.?meta Creates resolver object 10.Package org.

1. Class Input
public class Input extends, org.?red5.?io.?object.?BaseInput implements, org.?red5.?io.?object.?Input { // Protected Fields protected int idx ;

protected java.util.List<java.lang.Object> list ;

protected static org.slf4j.Logger log ; // Public Constructors public Input(java.util.List<java.lang.Object> list); // Public Methods public String getString();

public Object readArray(org.red5.io.object.Deserializer deserializer);

public Boolean readBoolean();

public org.red5.io.amf3.ByteArray readByteArray();

public Object readCustom();

public byte readDataType();

public java.util.Date readDate();

public java.util.Map<java.lang.String, java.lang.Object> readKeyValues(org.red5.io.object.Deserial

public Object readMap(org.red5.io.object.Deserializer deserializer);

public Object readNull();

public Number readNumber();

public Object readObject(org.red5.io.object.Deserializer deserializer);

public Object readReference();

public String readString();

public org.w3c.dom.Document readXML(); // Protected Methods protected Object getNext(); }

Methods inherited from org.red5.io.object.BaseInput: clearReferences , getReference , storeReference

155

Package org.?red5.?io.?mock Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait Fields inherited from org.red5.io.object.BaseInput: referenceMode , refId , refMap

1.1. getNext()
protected Object getNext();

Getter for property 'next'. Parameters return Value for property 'next'.

1.2. getString()
public String getString();

Specified by: Method getString in interface Input Read a string without the string type header.

1.3. readArray(Deserializer)
public Object readArray(org.red5.io.object.Deserializer deserializer);

Specified by: Method readArray in interface Input Read an array. This can result in a List or Map being deserialized depending on the array type found.

1.4. readBoolean()
public Boolean readBoolean();

Specified by: Method readBoolean in interface Input Read Boolean value

1.5. readByteArray()
public org.red5.io.amf3.ByteArray readByteArray();

Specified by: Method readByteArray in interface Input Read ByteArray object.

1.6. readCustom()
public Object readCustom();

Specified by: Method readCustom in interface Input

156

Package org.?red5.?io.?mock Read custom object

1.7. readDataType()
public byte readDataType();

Specified by: Method readDataType in interface Input Read type of data

1.8. readDate()
public java.util.Date readDate();

Specified by: Method readDate in interface Input Read date object

1.9. readKeyValues(Deserializer)

public java.util.Map<java.lang.String, java.lang.Object> readKeyValues(org.red5.io.object.Deserializ

Specified by: Method readKeyValues in interface Input Read key - value pairs. This is required for the RecordSet deserializer.

1.10. readMap(Deserializer)
public Object readMap(org.red5.io.object.Deserializer deserializer);

Specified by: Method readMap in interface Input Read a map containing key - value pairs. This can result in a List or Map being deserialized depending on the map type found.

1.11. readNull()
public Object readNull();

Specified by: Method readNull in interface Input Read Null data type

1.12. readNumber()
public Number readNumber();

Specified by: Method readNumber in interface Input Read Number object

1.13. readObject(Deserializer)
public Object readObject(org.red5.io.object.Deserializer deserializer);

157

Package org.?red5.?io.?mock Specified by: Method readObject in interface Input Read an object.

1.14. readReference()
public Object readReference();

Specified by: Method readReference in interface Input Read reference to Complex Data Type. Objects that are collaborators (properties) of other objects must be stored as references in map of id-reference pairs.

1.15. readString()
public String readString();

Specified by: Method readString in interface Input Read String object

1.16. readXML()
public org.w3c.dom.Document readXML();

Specified by: Method readXML in interface Input Read XML document

2. Class Mock
public class Mock { // Public Static Fields public static final byte TYPE_ELEMENT_SEPARATOR = 35;

public static final byte TYPE_END_OF_ARRAY = 34;

public static final byte TYPE_END_OF_MAP = 38;

public static final byte TYPE_END_OF_OBJECT = 33;

public static final byte TYPE_ITEM_SEPARATOR = 37;

public static final byte TYPE_PROPERTY_SEPARATOR = 36; // Public Constructors public Mock(); // Public Static Methods public static String listToString(java.util.List<java.lang.Object> list);

public static String toStringValue(byte dataType);

158

Package org.?red5.?io.?mock
}

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

3. Class Output
public class Output extends, org.?red5.?io.?object.?BaseOutput implements, org.?red5.?io.?object.?Output { // Protected Fields protected java.util.List<java.lang.Object> list ;

protected static org.slf4j.Logger log ; // Public Constructors public Output(java.util.List<java.lang.Object> list); // Public Methods public boolean isCustom(Object custom);

public void putString(String string);

public boolean supportsDataType(byte type);

public void writeArray(Object array, org.red5.io.object.Serializer serializer);

public void writeArray(Object[] array, org.red5.io.object.Serializer serializer);

public void writeArray(java.util.Collection<?> array, org.red5.io.object.Serializer serializer);

public void writeBoolean(Boolean bol);

public void writeByteArray(org.red5.io.amf3.ByteArray array);

public void writeCustom(Object custom);

public void writeDate(java.util.Date date);

public void writeMap(java.util.Collection<?> array, org.red5.io.object.Serializer serializer);

public void writeMap(java.util.Map<java.lang.Object, java.lang.Object> map, org.red5.io.object.Serializer serializer);

public void writeNull();

public void writeNumber(Number num);

public void writeObject(Object object,

159

Package org.?red5.?io.?mock
org.red5.io.object.Serializer serializer);

public void writeObject(java.util.Map<java.lang.Object, java.lang.Object> map, org.red5.io.object.Serializer serializer);

public void writeRecordSet(org.red5.io.object.RecordSet recordset, org.red5.io.object.Serializer serializer);

public void writeReference(Object obj);

public void writeString(String string);

public void writeXML(org.w3c.dom.Document xml); }

Methods inherited from org.red5.io.object.BaseOutput: clearReferences , getReferenceId , hasReference , storeReference Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait Fields inherited from org.red5.io.object.BaseOutput: refId , refMap

3.1. isCustom(Object)
public boolean isCustom(Object custom);

Specified by: Method isCustom in interface Output Whether object is custom

3.2. putString(String)
public void putString(String string);

Specified by: Method putString in interface Output

3.3. supportsDataType(byte)
public boolean supportsDataType(byte type);

Specified by: Method supportsDataType in interface Output

3.4. writeArray(Collection<?>, Serializer)
public void writeArray(java.util.Collection<?> array, org.red5.io.object.Serializer serializer);

Specified by: Method writeArray in interface Output Write array.

160

Package org.?red5.?io.?mock

3.5. writeArray(Object[], Serializer)
public void writeArray(Object[] array, org.red5.io.object.Serializer serializer);

Specified by: Method writeArray in interface Output Write array.

3.6. writeArray(Object, Serializer)
public void writeArray(Object array, org.red5.io.object.Serializer serializer);

Specified by: Method writeArray in interface Output Write primitive array.

3.7. writeBoolean(Boolean)
public void writeBoolean(Boolean bol);

Specified by: Method writeBoolean in interface Output Write boolean

3.8. writeByteArray(ByteArray)
public void writeByteArray(org.red5.io.amf3.ByteArray array);

Specified by: Method writeByteArray in interface Output Write ByteArray object (AMF3 only).

3.9. writeCustom(Object)
public void writeCustom(Object custom);

Specified by: Method writeCustom in interface Output Write custom (user) object

3.10. writeDate(Date)
public void writeDate(java.util.Date date);

Specified by: Method writeDate in interface Output Write date

3.11. writeMap(Collection<?>, Serializer)
public void writeMap(java.util.Collection<?> array, org.red5.io.object.Serializer serializer);

Specified by: Method writeMap in interface Output

161

Package org.?red5.?io.?mock Write array as map.

3.12. writeMap(Map<Object, Object>, Serializer)
public void writeMap(java.util.Map<java.lang.Object, java.lang.Object> map, org.red5.io.object.Serializer serializer);

Specified by: Method writeMap in interface Output Write map.

3.13. writeNull()
public void writeNull();

Specified by: Method writeNull in interface Output

3.14. writeNumber(Number)
public void writeNumber(Number num);

Specified by: Method writeNumber in interface Output Write number

3.15. writeObject(Map<Object, Object>, Serializer)
public void writeObject(java.util.Map<java.lang.Object, java.lang.Object> map, org.red5.io.object.Serializer serializer);

Specified by: Method writeObject in interface Output Write map as object.

3.16. writeObject(Object, Serializer)
public void writeObject(Object object, org.red5.io.object.Serializer serializer);

Specified by: Method writeObject in interface Output Write object.

3.17. writeRecordSet(RecordSet, Serializer)
public void writeRecordSet(org.red5.io.object.RecordSet recordset, org.red5.io.object.Serializer serializer);

Specified by: Method writeRecordSet in interface Output Write recordset.

3.18. writeReference(Object)
public void writeReference(Object obj);

162

Package org.?red5.?io.?mock Specified by: Method writeReference in interface Output Write reference to complex data type

3.19. writeString(String)
public void writeString(String string);

Specified by: Method writeString in interface Output Write string

3.20. writeXML(Document)
public void writeXML(org.w3c.dom.Document xml);

Specified by: Method writeXML in interface Output Write XML object

163

1. Interface IMP3
Informations about a MP3 file. Marker interface by now.

1.1. Synopsis
public interface IMP3 extends, org.?red5.?io.?IStreamableFile { }

2. Interface IMP3Service
Provide access to MP3 objects. Marker interface.

2.1. Synopsis
public interface IMP3Service extends, org.?red5.?io.?IStreamableFileService { }

164

1. Class MP3
Represents MP3 file

1.1. Synopsis
public class MP3implements, org.?red5.?io.?mp3.?IMP3 { // Public Constructors public MP3(java.io.File file); // Public Methods public org.red5.io.ITagWriter getAppendWriter() throws IOException;

public org.red5.io.ITagReader getReader() throws IOException;

public org.red5.io.ITagWriter getWriter() throws IOException; }

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

1.2. MP3(File)
public MP3(java.io.File file);

Creates MP3 object using given file Parameters file File object to use

1.3. getAppendWriter()
public org.red5.io.ITagWriter getAppendWriter() throws IOException;

1.4. getReader()
public org.red5.io.ITagReader getReader() throws IOException;

1.5. getWriter()
public org.red5.io.ITagWriter getWriter() throws IOException;

2. Class MP3Header
165

Package org.?red5.?io.?mp3.?impl

Header of a MP3 frame.

2.1. Synopsis
public class MP3Header { // Public Constructors public MP3Header(int data) throws Exception; // Public Methods public double frameDuration();

public int frameSize();

public int getBitRate();

public int getData();

public int getSampleRate();

public boolean isProtected();

public boolean isStereo(); }

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait See Also File format [http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm]

2.2. MP3Header(int)
public MP3Header(int data) throws Exception;

Creates MP3 header from frame sync value Parameters data
Exception

Frame sync data

On invalid frame synchronization

2.3. frameDuration()
public double frameDuration();

Return the duration of the frame for this header.

166

Package org.?red5.?io.?mp3.?impl Parameters return The duration in milliseconds

2.4. frameSize()
public int frameSize();

Calculate the size of a MP3 frame for this header. Parameters return size of the frame including the header

2.5. getBitRate()
public int getBitRate();

Getter for bitrate Parameters return File bitrate

2.6. getData()
public int getData();

Getter for frame sync word data Parameters return Frame sync word data

2.7. getSampleRate()
public int getSampleRate();

Getter for sample rate Parameters return Sampling rate

2.8. isProtected()
public boolean isProtected();

Whether MP3 has protection bit Parameters

167

Package org.?red5.?io.?mp3.?impl return
true

if MP3 has protection bit, false otherwise

2.9. isStereo()
public boolean isStereo();

Whether stereo playback mode is used Parameters return
true

if stereo mode is used, false otherwise

3. Class MP3Reader
Read MP3 files

3.1. Synopsis

public class MP3Readerimplements, org.?red5.?io.?ITagReader, org.?red5.?io.?flv.?IKeyFrameDataAnalyze // Protected Fields protected static org.slf4j.Logger log ; // Public Constructors public MP3Reader(java.io.File file) throws FileNotFoundException; // Public Methods public synchronized org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta analyzeKeyFrames();

public void close();

public void decodeHeader();

public long getBytesRead();

public long getDuration();

public org.red5.io.IStreamableFile getFile();

public int getOffset();

public long getTotalBytes();

public boolean hasMoreTags();

public boolean hasVideo();

public void position(long pos);

public synchronized org.red5.io.ITag readTag();

public void searchNextFrame();

168

Package org.?red5.?io.?mp3.?impl
public void setFrameCache(org.red5.io.IKeyFrameMetaCache frameCache); }

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

3.2. MP3Reader(File)
public MP3Reader(java.io.File file) throws FileNotFoundException;

Creates reader from file input stream Parameters stream File input stream source

3.3. log
protected static org.slf4j.Logger log ;

Logger

3.4. analyzeKeyFrames()
public synchronized org.red5.io.flv.IKeyFrameDataAnalyzer.KeyFrameMeta analyzeKeyFrames();

Specified by: Method analyzeKeyFrames in interface IKeyFrameDataAnalyzer Analyze and return keyframe metadata.

3.5. close()
public void close();

Specified by: Method close in interface ITagReader Closes the reader and free any allocated memory.

3.6. decodeHeader()
public void decodeHeader();

Specified by: Method decodeHeader in interface ITagReader Decode the header of the stream;

3.7. getBytesRead()
public long getBytesRead();

169

Package org.?red5.?io.?mp3.?impl Specified by: Method getBytesRead in interface ITagReader Returns the amount of bytes read

3.8. getDuration()
public long getDuration();

Specified by: Method getDuration in interface ITagReader Return length in seconds

3.9. getFile()
public org.red5.io.IStreamableFile getFile();

Specified by: Method getFile in interface ITagReader Return the file that is loaded.

3.10. getOffset()
public int getOffset();

Specified by: Method getOffset in interface ITagReader Returns the offet length

3.11. getTotalBytes()
public long getTotalBytes();

Specified by: Method getTotalBytes in interface ITagReader Get the total readable bytes in a file or ByteBuffer. Parameters return Total readable bytes

3.12. hasMoreTags()
public boolean hasMoreTags();

Specified by: Method hasMoreTags in interface ITagReader Returns a boolean stating whether the FLV has more tags

3.13. hasVideo()
public boolean hasVideo();

Specified by: Method hasVideo in interface ITagReader A MP3 stream never has video.

170

Package org.?red5.?io.?mp3.?impl Parameters return always returns false

3.14. position(long)
public void position(long pos);

Specified by: Method position in interface ITagReader Move the reader pointer to given position in file.

3.15. readTag()
public synchronized org.red5.io.ITag readTag();

Specified by: Method readTag in interface ITagReader Returns a Tag object

3.16. searchNextFrame()
public void searchNextFrame();

Search for next frame sync word. Sync word identifies valid frame.

4. Class MP3Service
Streamable file service extension for MP3

4.1. Synopsis
public class MP3Service extends, org.?red5.?io.?BaseStreamableFileService implements, org.?red5.?io.?mp3.?IMP3Service { // Public Constructors public MP3Service(); // Public Methods public String getExtension();

public String getPrefix();

public org.red5.io.IStreamableFile getStreamableFile(java.io.File file) throws IOException; }

Methods inherited from org.red5.io.BaseStreamableFileService: canHandle , getExtension , getPrefix , getStreamableFile , prepareFilename Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

171

Package org.?red5.?io.?mp3.?impl

4.2. getExtension()
public String getExtension();

4.3. getPrefix()
public String getPrefix();

4.4. getStreamableFile(File)
public org.red5.io.IStreamableFile getStreamableFile(java.io.File file) throws IOException;

172

1. Class BaseInput
BaseInput represents a way to map input to a HashMap. This class is meant to be extended.

1.1. Synopsis
public class BaseInput { // Protected Fields protected int refId ;

protected java.util.Map<java.lang.Integer, java.lang.Object> refMap ;

protected org.red5.io.object.BaseInput.ReferenceMode referenceMode ; // Public Constructors public BaseInput(); // Public Methods public void clearReferences(); // Protected Methods protected Object getReference(int id);

protected void storeReference(int refId, Object newRef);

protected int storeReference(Object obj); }

Direct known subclasses: org.?red5.?io.?amf.?Input , org.?red5.?io.?mock.?Input Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

1.2. referenceMode
protected org.red5.io.object.BaseInput.ReferenceMode referenceMode ;

Mode how to handle references.

1.3. refId
protected int refId ;

References id

1.4. refMap

173

Package org.?red5.?io.?object

protected java.util.Map<java.lang.Integer, java.lang.Object> refMap ;

References map

1.5. clearReferences()
public void clearReferences();

Clears the map

1.6. getReference(int)
protected Object getReference(int id);

Returns the object with the parameters id Parameters id return Object reference id Object Object reference with given id

1.7. storeReference(int, Object)
protected void storeReference(int refId, Object newRef);

Replace a referenced object with another one. This is used by the AMF3 deserializer to handle circular references. Parameters refId newRef

1.8. storeReference(Object)
protected int storeReference(Object obj);

Store an object into a map Parameters obj Object to store

2. Class BaseInput.ReferenceMode
Mode how references should be handled.

2.1. Synopsis
public static final class BaseInput.ReferenceMode extends, java.?lang.?Enum {

174

Package org.?red5.?io.?object
// Public Static Fields public static final org.red5.io.object.BaseInput.ReferenceMode MODE_REMOTING ;

public static final org.red5.io.object.BaseInput.ReferenceMode MODE_RTMP ; // Public Static Methods public static org.red5.io.object.BaseInput.ReferenceMode valueOf(String name);

public static org.red5.io.object.BaseInput.ReferenceMode[] values(); }

Methods inherited from java.lang.Enum: clone , compareTo , equals , finalize , getDeclaringClass , hashCode , name , ordinal , toString , valueOf Methods inherited from java.lang.Object: getClass , notify , notifyAll , wait

3. Class BaseOutput
BaseOutput represents a way to map input to a HashMap. This class is meant to be extended.

3.1. Synopsis
public class BaseOutput { // Protected Fields protected short refId ;

protected java.util.Map<org.red5.io.object.BaseOutput.IdentityWrapper, java.lang.Short> refMap ; // Protected Constructors protected BaseOutput(); // Public Methods public void clearReferences(); // Protected Methods protected short getReferenceId(Object obj);

protected boolean hasReference(Object obj);

protected void storeReference(Object obj); }

Direct known subclasses: org.?red5.?io.?amf.?Output , org.?red5.?io.?mock.?Output Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

175

Package org.?red5.?io.?object

3.2. BaseOutput()
protected BaseOutput();

BaseOutput Constructor

3.3. refId
protected short refId ;

Reference id

3.4. refMap
protected java.util.Map<org.red5.io.object.BaseOutput.IdentityWrapper, java.lang.Short> refMap ;

References map

3.5. clearReferences()
public void clearReferences();

Clears the map

3.6. getReferenceId(Object)
protected short getReferenceId(Object obj);

Returns the reference id based on the parameter obj Parameters obj return Object short Reference id

3.7. hasReference(Object)
protected boolean hasReference(Object obj);

Returns a boolean stating whether the map contains an object with that key Parameters obj return Object boolean true if it does contain it, false otherwise

3.8. storeReference(Object)
protected void storeReference(Object obj);

176

Package org.?red5.?io.?object Store an object into a map Parameters obj Object to store

4. Class DataTypes
The core datatypes supported by red5, I have left out undefined (this is up for debate). If a codec returns one of these datatypes its handled by the base serializer.

4.1. Synopsis
public class DataTypes { // Public Static Fields public static final byte CORE_ARRAY = 6;

public static final byte CORE_BOOLEAN = 2;

public static final byte CORE_BYTEARRAY = 16;

public static final byte CORE_DATE = 5;

public static final byte CORE_MAP = 7;

public static final byte CORE_NULL = 1;

public static final byte CORE_NUMBER = 3;

public static final byte CORE_OBJECT = 9;

public static final byte CORE_SKIP = 0;

public static final byte CORE_STRING = 4;

public static final byte CORE_XML = 8;

public static final byte CUSTOM_AMF_MASK = 48;

public static final byte CUSTOM_JSON_MASK = 80;

public static final byte CUSTOM_MOCK_MASK = 32;

public static final byte CUSTOM_RTMP_MASK = 64;

public static final byte CUSTOM_XML_MASK = 96;

public static final byte OPT_REFERENCE = 17; // Public Constructors public DataTypes(); // Public Static Methods

177

public static boolean isCustomType(byte type). } Methods inherited from java. 178 .4.Package org. Null type marker 4. CORE_MAP public static final byte CORE_MAP = 7.?red5. finalize .5. hashCode .?object public static boolean isBasicType(byte type). Map type marker 4. CORE_NUMBER public static final byte CORE_NUMBER = 3. notify . ByteArray type marker (AMF3 only) 4. wait 4.7. CORE_DATE public static final byte CORE_DATE = 5. CORE_BOOLEAN public static final byte CORE_BOOLEAN = 2. CORE_ARRAY public static final byte CORE_ARRAY = 6.6. notifyAll .2. Array type marker 4. Date type marker 4.3. public static boolean isComplexType(byte type).8.?io. getClass . Boolean type marker 4. toString .Object: clone .lang. equals . CORE_NULL public static final byte CORE_NULL = 1. CORE_BYTEARRAY public static final byte CORE_BYTEARRAY = 16. public static String toStringValue(byte dataType).

CUSTOM_XML_MASK public static final byte CUSTOM_XML_MASK = 96.13. Custom datatype AMF mask 4.12.?object Number type marker 4. Custom datatype mock mask marker 4. CUSTOM_RTMP_MASK public static final byte CUSTOM_RTMP_MASK = 64. CUSTOM_MOCK_MASK public static final byte CUSTOM_MOCK_MASK = 32. CORE_OBJECT public static final byte CORE_OBJECT = 9.?io.17.10. Padding marker 4. String type marker 4.15.?red5.16. CORE_STRING public static final byte CORE_STRING = 4. CUSTOM_JSON_MASK public static final byte CUSTOM_JSON_MASK = 80. 179 . CORE_SKIP public static final byte CORE_SKIP = 0.14. CORE_XML public static final byte CORE_XML = 8.Package org. Object (Hash) type marker 4. XML type marker 4.9. CUSTOM_AMF_MASK public static final byte CUSTOM_AMF_MASK = 48. Custom datatype JSON mask 4.11. Custom datatype RTMP mask 4.

22. this is optional for codecs to support 4. false otherwise 4.18. Reference type. Returns whether it is a custom data type Parameters type return Data type as byte boolean Whether given type is of custom type 4. Returns whether it is a complex data type Parameters type return Data type as byte boolean true if data type is complex (non-primitive). isBasicType(byte) public static boolean isBasicType(byte type). isCustomType(byte) public static boolean isCustomType(byte type). false otherwise 4.?red5.19.20. isComplexType(byte) public static boolean isComplexType(byte type).?io.Package org.?object Custom datatype XML mask 4.21. Returns whether it is a basic data type Parameters type return Data type as byte boolean true if data type is primitive. toStringValue(byte) public static String toStringValue(byte dataType). Returns the string value of the data type Parameters 180 . OPT_REFERENCE public static final byte OPT_REFERENCE = 17.

slf4j.Package org.?io. Class target). Class Deserializer The Deserializer class reads data input and handles the data according to the core data types 5.?red5. notifyAll .?object dataType return AS data type as byte String String value of given ActionScript data type 5. // Public Methods public T deserialize(Input in. // Protected Methods protected Object postProcessExtension(Object result. } Methods inherited from java. wait 5.lang. deserialize(Input. Class) protected Object postProcessExtension(Object result. Class<T> target).3. hashCode . Synopsis public class Deserializer { // Protected Fields protected static org. notify . // Public Constructors public Deserializer(). Class<T>) public T deserialize(Input in. Class<T> target). 181 . getClass .1. toString . equals . Deserializes the input parameter and returns an Object which must then be cast to a core data type Parameters in target return Object 5.Logger log .Object: clone .2. finalize . postProcessExtension(Object.

Synopsis public interface ICustomSerializable { // Public Methods public void serialize(Output output.1. Post processes the result TODO Extension Point Parameters result target return 6. Class Flag Serial flag options 6.?red5. Synopsis public final class Flag extends.lang.Object: getClass . notifyAll . equals . } Methods inherited from java. compareTo .Enum: clone . finalize . wait 7.1. public static Flag[] values(). Serializer serializer). hashCode . notify . ordinal . // Public Static Methods public static Flag valueOf(String name). 7. java.?lang. NOTE: This is only used for AMF0 encoding and you should not need to implement this in your own objects.?object Class target).lang. Interface ICustomSerializable Interface for objects that know how to serialize their contents. public static final Flag Enabled . valueOf Methods inherited from java. name . getDeclaringClass .?Enum { // Public Static Fields public static final Flag Default .?io.Package org. public static final Flag Disabled . } 182 . toString .

io.?io.lang. serialize(Output. Synopsis public interface Input { // Public Methods public void clearReferences(). public String readString(). public Object readMap(Deserializer deserializer). Input object provides ways to read primitives. public Number readNumber().amf3.Package org. public org. public Object readReference(). 8. java. public Object readObject(Deserializer deserializer).?red5.ByteArray readByteArray().Map<java. public java. public Object readArray(Deserializer deserializer). complex object and object references from byte buffer. public String getString().2. public Object readCustom().1. 183 .Date readDate(). Serializer) public void serialize(Output output. Interface Input Interface for Input which defines the contract methods which are to be implemented.lang. Parameters output serializer 8.util.red5. public Boolean readBoolean(). public byte readDataType().String. Serializer serializer). public Object readNull().Object> readKeyValues(Deserializer deserializer).util. public java.?object 7. Serialize this object to the given output stream.

readBoolean() public Boolean readBoolean().3. Clears all references 8.Document readXML().5.io. clearReferences() public void clearReferences(). readByteArray() public org.?io.Package org.w3c. readArray(Deserializer) public Object readArray(Deserializer deserializer). Read a string without the string type header. } 8.ByteArray readByteArray().dom. Read ByteArray object.2. Parameters return String 8.amf3. getString() public String getString(). Read Boolean value Parameters return Boolean 8.6.?red5.4.?object public org. Parameters return array 8. This can result in a List or Map being deserialized depending on the array type found. Read an array.red5. Parameters return ByteArray object 184 .

lang.11.?io.util.9. This can result in a List or Map being deserialized depending on the map type found. readMap(Deserializer) public Object readMap(Deserializer deserializer).7. Read Null data type 185 .lang.?object 8. readNull() public Object readNull(). Parameters return Map 8.String.?red5.value pairs. readCustom() public Object readCustom().12.Date readDate(). java. readDataType() public byte readDataType().value pairs. This is required for the RecordSet deserializer.util.Map<java.10. Read a map containing key .8.Package org. Read key . Read date object Parameters return Date 8. Read custom object Parameters return Custom object 8. Read type of data Parameters return Type of data as byte 8. readDate() public java.Object> readKeyValues(Deserializer deserializer). readKeyValues(Deserializer) public java. 8.

readObject(Deserializer) public Object readObject(Deserializer deserializer).Document readXML(). Parameters return object 8. Interface Output 186 .13.?object Parameters return Null datatype (AS) 8. Read XML document Parameters return XML DOM document 9.Package org. 8.dom.15.?red5. readXML() public org.17.16.w3c. Read Number object Parameters return Number 8.14. readString() public String readString(). Read reference to Complex Data Type. Objects that are collaborators (properties) of other objects must be stored as references in map of id-reference pairs. Read an object. readNumber() public Number readNumber(). Read String object Parameters return String 8. readReference() public Object readReference().?io.

Serializer serializer). public void writeRecordSet(RecordSet recordset. 187 . public void writeByteArray(org. public void writeObject(java. Serializer serializer). public void writeObject(Object object. Serializer serializer).dom.util. public void putString(String string).red5.Document xml). public void writeDate(java.util.ByteArray array).util. public void writeNumber(Number num).io. java. public boolean supportsDataType(byte type).Object. java. public void writeMap(java.lang.util.Date date).lang. Serializer serializer).lang. Serializer serializer).Object.?object Output interface which defines contract methods to be implemented 9.Package org. public boolean isCustom(Object custom).?red5. public void writeString(String string). Serializer serializer). public void writeArray(java.Object> map. public void writeArray(Object array.?io. Synopsis public interface Output { // Public Methods public void clearReferences(). public void writeReference(Object obj).util. public void writeXML(org.Map<java.w3c. public void writeNull().Collection<?> array.lang.Map<java. Serializer serializer). public void writeArray(Object[] array. public void writeMap(java.Object> map. public void writeBoolean(Boolean bol). public void writeCustom(Object custom).amf3.Collection<?> array.1. Serializer serializer).

Package org. Whether object is custom Parameters custom return Object true if object is of user type. Serializer) public void writeArray(Object[] array. Serializer serializer). Serializer serializer). Serializer to use for subobjects.5. writeArray(Object[].2.3. clearReferences() public void clearReferences().Collection<?> array. Parameters array serializer Array to write. writeArray(Object. false otherwise 9.?object } 9.4. isCustom(Object) public boolean isCustom(Object custom).?io. Write array. Write primitive array. Write array. Clear references 9. Parameters array serializer Array to write. Parameters 188 . Serializer) public void writeArray(java. Serializer serializer). Serializer) public void writeArray(Object array. 9. Serializer to use for subobjects.?red5.util.6. 9. writeArray(Collection<?>.

writeDate(Date) public void writeDate(java.11.io. writeCustom(Object) public void writeCustom(Object custom).amf3. Write array as map. Parameters array object to write 9. Write boolean Parameters bol Boolean 9.10.?object array serializer Array to write. Serializer to use for subobjects. 9. writeMap(Collection<?>.Collection<?> array.Package org.util.red5.?io. writeByteArray(ByteArray) public void writeByteArray(org.8.ByteArray array).7.9. Parameters array Array to write 189 . writeBoolean(Boolean) public void writeBoolean(Boolean bol). Write date Parameters date Date 9.Date date).util. Serializer serializer).?red5. Write ByteArray object (AMF3 only). Write custom (user) object Parameters custom Custom data type object 9. Serializer) public void writeMap(java.

Serializer serializer). Serializer serializer). Serializer) public void writeMap(java. 9.?io. Serializer serializer). Parameters map serializer Map to write Serializer to use for subobjects. writeRecordSet(RecordSet. Write object. Write map as object. Serializer) public void writeObject(Object object. 9.lang. writeNumber(Number) public void writeNumber(Number num). Write number Parameters num Number 9. java.lang.13.util.14. Serializer serializer). 9.Object> map.lang. writeObject(Map<Object.?object serializer Serializer to use for subobjects. 9. Serializer) public void writeRecordSet(RecordSet recordset.lang.Object.Object> map.Package org.Object.15.util.12. 190 .Map<java. writeMap(Map<Object. writeObject(Object. java. Write map.?red5.16.Map<java. Parameters map serializer Map to write Serializer to use for subobjects. Object>. Object>. Parameters object serializer Object to write Serializer to use for subobjects. Serializer) public void writeObject(java.

writeXML(Document) public void writeXML(org.18.?object Write recordset. Class RecordSet Read only RecordSet object that might be received through remoting calls.?red5. writeString(String) public void writeString(String string).?io. writeReference(Object) public void writeReference(Object obj).17.dom. 9.Document xml). Write reference to complex data type Parameters obj Referenced object 9.Package org.1. Write XML object Parameters xml XML document 10.19. use page size property to specify maximum number of rows on one page 10. Synopsis public class RecordSet { 191 . There are 3 types of data fetching: • On demand (used by default) • Fetch all at once • Page-by-page fetching For last mode. Serializer to use for subobjects. Write string Parameters string String 9.w3c. Parameters recordset serializer Recordset to write.

Object> serialize().red5. getClass .remoting. public boolean isFullyPopulated().List<java.org/amf/recordset] 10. Parameters 192 .?red5.lang.Map<java.2.Object> getItemAt(int index). public void setRemotingClient(org.osflash. wait See Also osflash. public void setDeliveryMode(String mode). toString .org documentation [http://www. finalize .Package org. int pageSize).server.util.lang.lang. int prefetchCount). notify .?io. int pageSize. java. Return a list containing the names of the columns in the recordset.String.util. // Public Methods public java. public void setDeliveryMode(String mode.lang.net.?object // Public Constructors public RecordSet(Input input).String> getColumnNames().lang.util. public java. hashCode .List<java.3. } Methods inherited from java.List<java.RemotingClient client). public int getLength(). public java.String> getColumnNames(). public void setDeliveryMode(String mode.Object: clone . equals . getColumnNames() public java. notifyAll .lang.util. public int getNumberAvailable(). RecordSet(Input) public RecordSet(Input input). Creates recordset from Input object Parameters input 10.

If the item is not available yet. Parameters return number of available items 10.lang. Check if all items are available on the client.Map<java. Parameters return Nsumber of received items 10. java.7. Parameters return serializable informations 193 .Object> serialize().lang.5. Get the number of items already received from the server.4. getNumberAvailable() public int getNumberAvailable().String.util. Return a specified item from the recordset. getItemAt(int) public java.8. Get the total number of items.?red5.util.?object return Column names set 10.?io.lang.Package org. serialize() public java.Object> getItemAt(int index). Return Map that can be serialized as result. Parameters return Number of items 10. isFullyPopulated() public boolean isFullyPopulated(). it will be received from the server. Parameters index return Item index Item from recordset 10.List<java. getLength() public int getLength().6.

10.RemotingClient client). int) public void setDeliveryMode(String mode. setDeliveryMode(String.remoting. Class RecordSetPage Result of pageable request. setRemotingClient(RemotingClient) public void setRemotingClient(org. Parameters mode pageSize Mode for fetching of results Max page size 10. Parameters mode pageSize prefetchCount Mode for fetching of results Max page size Number of prefetched pages (not implemented yet) 10.red5. setDeliveryMode(String. Set the mode for fetching paged results with given max page size.net.12. int.?object 10. int prefetchCount). int pageSize.?red5.9. Parameters client Remoting client that works with this Recordset 11. one page of data. setDeliveryMode(String) public void setDeliveryMode(String mode). Parameters mode Mode for fetching of results 10.11.?io. 194 . Set the mode for fetching paged results with given max page size and number of prefetched pages. int pageSize).Package org.server. Set the remoting client to use for retrieving of paged results. int) public void setDeliveryMode(String mode. Set the mode for fetching paged results.

Package org.Object>> getData(). RecordSetPage(Input) public RecordSetPage(Input input).?io.lang.Object: clone . hashCode . toString . Synopsis public class RecordSetPage { // Public Constructors public RecordSetPage(Input input).2. // Protected Methods protected int getCursor().osflash.org documentation [http://www. getData() protected java.List<java.util.4. equals . Getter for page data Parameters return Page data as unmodifiable list 12.util.?object 11. getCursor() protected int getCursor().3. Class Serializer 195 .Object>> getData().lang. notifyAll .List<java. } Methods inherited from java. notify . wait See Also osflash. Getter for recordset cursor Parameters return Recordset cursor 11. protected java.util. getClass .List<java.lang. finalize .org/amf/recordset] 11.List<java.util.?red5. Creates recordset page from Input object Parameters input Input object to use as source for data that has to be deserialized 11.1.

lang. protected void writeIterator(Output out.lang. // Protected Methods protected boolean writeArrayType(Output out.Package org. hashCode . Object any). protected boolean writeXMLType(Output out. equals .?object The Serializer class writes data output and handles the data according to the core data types 12. Synopsis public class Serializer { // Protected Fields protected static org. notifyAll . toString . java. protected void writeList(Output out. Object arrType).Logger log . Object obj).util. // Public Constructors public Serializer(). Object listType). getClass . protected boolean writeBasic(Output out. Object xml). public boolean writeComplex(Output out.w3c. protected boolean writeObjectType(Output out.Object> it).List<?> list).Iterator<java. public void serialize(Output out. // Public Methods public Object preProcessExtension(Object any). protected boolean writeListType(Output out. protected boolean writeCustomType(Output out. java.util.1. Object obj). Object basic). } Methods inherited from java. Object complex).?io.dom. finalize .?red5. protected void writeDocument(Output out.Document doc). wait 196 . org.Object: clone . notify .slf4j.

preProcessExtension(Object) public Object preProcessExtension(Object any). writeArrayType(Output. etc Parameters out arrType return Output object Array or collection type true if the object has been written. serialize(Output. otherwise false 12.5. log protected static org.slf4j. Writes array (or collection) out as output Arrays.4.Package org. Object) protected boolean writeBasic(Output out.2. Object) protected boolean writeArrayType(Output out. Object any). Serializes output to a core data type object Parameters out any Output writer Object to serialize 12. Object) public void serialize(Output out. Logger 12.Logger log .6.?io. writeBasic(Output. Collections.?object 12.3. Pre processes an object TODO // must be implemented Parameters any return Object to preprocess Prerocessed object 12. Object basic). Writes a primitive out as an object Parameters out Output writer 197 . Object arrType).?red5.

Object> it). org. false otherwise 12. writeIterator(Output.?io.7. writeCustomType(Output. otherwise false 12. Writes a complex type object out Parameters out complex return Output writer Complex datatype object boolean true if object was successfully serialized.util. Document) protected void writeDocument(Output out.w3c.9. false otherwise 12. writeComplex(Output. Writes a document to the output Parameters out doc Output writer Document to write 12.Package org.8. java. Writes an iterator out to the output Parameters 198 . Object complex).Iterator<java. Object) protected boolean writeCustomType(Output out.10.?red5. Object obj). Object) public boolean writeComplex(Output out.?object basic return Primitive boolean true if object was successfully serialized. Writes a custom data to the output Parameters out obj return Output writer Custom data true if the object has been written.dom. Iterator<Object>) protected void writeIterator(Output out. writeDocument(Output.lang.Document doc).

java. writeList(Output. List<?>) protected void writeList(Output out. Object) protected boolean writeObjectType(Output out.14. Write typed object to the output Parameters out obj return Output writer Object type to write true if the object has been written. Writes Lists out as a data type Parameters out listType return Output write List type boolean true if object was successfully serialized.List<?> list). false otherwise 12. Object) protected boolean writeListType(Output out.util. Object) protected boolean writeXMLType(Output out.13.11. writeObjectType(Output. Object listType).?io. writeListType(Output. otherwise false 12. Object obj).?object out it Output writer Iterator to write 12. Object xml).?red5. Writes an xml type out to the output Parameters 199 . writeXMLType(Output. Writes a List out as an Object Parameters out list Output writer List to write as Object 12.12.Package org.

?object out xml return Output writer XML boolean true if object was successfully written. false otherwise 200 .Package org.?io.?red5.

apache.mina. public static void writeMediumInt(org. int numBytesMax).common.2. Puts input buffer stream to output buffer and returns number of bytes written Parameters out in numBytesMax return Output buffer Input buffer Number of bytes max int Number of bytes written 1.common.apache.mina. public static int readMediumInt(org. int) public static int put(org. int numBytesMax). Synopsis public class BufferUtils { // Public Constructors public BufferUtils().ByteBuffer out.common. public static int readUnsignedMediumInt(org.ByteBuffer in).apache. org. org. equals .lang.apache.ByteBuffer in). hashCode .Object: clone . int value). // Public Static Methods public static int put(org.apache.common.ByteBuffer out. toString .mina.ByteBuffer in.common.common. notifyAll . finalize .mina.1. Class BufferUtils Buffer Utility class which reads/writes intergers to the input/output buffer 1. getClass .ByteBuffer out. put(ByteBuffer.3. wait 1.apache. readMediumInt(ByteBuffer) public static int readMediumInt(org.mina.common.apache. notify .mina.mina.1.ByteBuffer in).common. ByteBuffer.ByteBuffer in.apache. } Methods inherited from java. Reads a Medium Int to the in buffer Parameters 201 .mina.

finalize .?io.0 2. toString . } Methods inherited from java.mina. Note: Paul added this back in for use with Mina due to its removal from Mina 2.ByteBuffer out. Class DOM2Writer 202 .mina.5.common. getClass .?utils in return Source int Medium int 1.apache. readUnsignedMediumInt(ByteBuffer) public static int readUnsignedMediumInt(org.ByteBuffer in).Object: clone . int value).common.lang. wait 3. notifyAll . Reads an unsigned Medium Int from the in buffer Parameters in return Source int Integer value 1.?red5.Package org.apache. writeMediumInt(ByteBuffer.4. int) public static void writeMediumInt(org. hashCode . Class ByteBufferUtil ByteBuffer utility. Synopsis @Deprecated public class ByteBufferUtil { // Public Static Methods public static void acquireIfPossible(Object message). equals . Writes a Medium Int to the output buffer Parameters out value Container to write to Integer to write 2.1. notify . public static void releaseIfPossible(Object message).

Synopsis public class DOM2Writer { // Public Constructors public DOM2Writer().w3c. hashCode . public java. } Methods inherited from java.lang.?io. This class uses the DOM Level 2 APIs. wait 3. finalize .w3c.nio. serializeAsXML(Node.?nio.2. Class HexCharset This was borrowed from the Soupdragon base64 library.Package org. java. 4. notifyAll .Node node.charset.io.nio.dom. public HexCharset(boolean caps.io. toString .Charset cs).charset.Object: clone . Serialize this node into the writer as XML. The main difference between this class and DOMWriter is that this class generates and prints out namespace declarations. java.?Charset { // Public Constructors public HexCharset(boolean caps).CharsetEncoder newEncoder().nio.Writer writer). Writer) public static void serializeAsXML(org. public java.dom.Writer writer). int measure).CharsetDecoder newDecoder(). Parameters writer node Writer object DOM node 4.1. 203 . 3. Synopsis public class HexCharset extends. getClass . notify . java.Node node.charset. equals .1. // Public Static Methods public static void serializeAsXML(org. // Public Methods public boolean contains(java.?charset.?utils This class is a utility to serialize a DOM node as XML.?red5.

compareTo . getClass . canEncode . getClass .?CharsetEncoder { // Public Methods public java.Decoder extends. implReset .CharBuffer in. isAutoDetecting .CharsetDecoder: averageCharsPerByte .charset.?utils } Methods inherited from java.Encoder extends.charset. protected void implReset(). java. detectedCharset . isSupported . onMalformedInput .nio. implReset .?charset. // Protected Methods protected void implReset().?CharsetDecoder { // Public Methods public java.nio. notifyAll . malformedInputAction . decode . implFlush . finalize .nio. implFlush . isRegistered .?charset. 204 . toString . } Methods inherited from java.Encoder public class HexCharset. finalize . isLegalReplacement . encodeLoop . decode . equals .CharsetEncoder: averageBytesPerChar . isCharsetDetected . implReplaceWith . replaceWith . hashCode . Class HexCharset. displayName . java. onUnmappableCharacter . implOnUnmappableCharacter .nio.Decoder public class HexCharset. defaultCharset .?nio. toString Methods inherited from java.CoderResult decodeLoop(java.Charset: aliases .Object: clone . charset .nio. newDecoder .nio. encode .ByteBuffer in. charset . notifyAll .nio.nio.nio. notify . wait 6. flush . decodeLoop .CoderResult implFlush(java. // Protected Methods protected java.?red5. reset . implOnUnmappableCharacter . java. notify .nio.?io. implOnMalformedInput .charset.Object: clone .Package org. flush . implOnMalformedInput . replacement .nio.lang. maxCharsPerByte . Class HexCharset. implReplaceWith .ByteBuffer out). contains . wait 5. hashCode . encode . name .charset. equals . unmappableCharacterAction Methods inherited from java.?nio.charset. availableCharsets . java. canEncode .charset.CharBuffer out). forName .ByteBuffer out). } Methods inherited from java. newEncoder .lang.CoderResult encodeLoop(java.

Synopsis public class HexDump { // Public Constructors public HexDump(). replacement . int length). finalize . public static String formatHexDump(String in).?io.1.Package org. reset . public static String prettyPrintHex(String sToConvert). public static String toBinaryString(byte[] ba). replaceWith .lang. notify . toString . maxBytesPerChar . int offset. hashCode . public static String prettyPrintHex(java. unmappableCharacterAction malformedInputAction Methods inherited from java. public static String toBinaryString(byte b).nio. notifyAll . 205 . public static void setBitDigits(char[] bd) throws Exception. public static String stringToHexString(String in).?red5. public static void setByteSeparator(char bs). onMalformedInput .Object: clone . // Public Static Methods public static String byteArrayToBinaryString(byte[] block).?utils . public static String prettyPrintHex(byte[] baToConvert). char oneBit). getClass . public static void setWithByteSeparator(boolean bs). Class HexDump Hexadecimal byte dumper 7. onUnmappableCharacter . wait 7. public static void setBitDigits(char zeroBit. public static String byteArrayToHexString(byte[] block. public static String byteArrayToHexString(byte[] block). equals . public static byte[] hexStringToByteArray(String strA).ByteBuffer bbToConvert). public static void main(String[] args).

lang. wait 7. finalize . public static final byte[] toByteArray(short s). public static String toString(byte b).Package org. public static String toBinaryString(long l). public static String toHexString(short s).3. byteArrayToHexString(byte[]) public static String byteArrayToHexString(byte[] block).?io. public static final byte[] toByteArray(int i).2. getClass . hashCode . int offset.Object: clone .?red5. public static String toHexString(long l). equals . public static String toBinaryString(short s). public static String toHexString(int i). notifyAll .?utils public static String toBinaryString(int i). public static String toHexString(byte[] ba. int length). public static String toHexString(byte b). public static String toHexString(byte[] ba). Description of the Method Parameters block return Description of Parameter Description of the Returned Value 7. public static final byte[] toByteArray(long l). Description of the Method 206 . notify . public static String toString(byte[] ba). toString . byteArrayToBinaryString(byte[]) public static String byteArrayToBinaryString(byte[] block). } Methods inherited from java.

?io. byteArrayToHexString(byte[]. test and demo for the Convert class Parameters args none needed 7. int.6. prettyPrintHex(byte[]) public static String prettyPrintHex(byte[] baToConvert).4. main(String[]) public static void main(String[] args).5. int) public static String byteArrayToHexString(byte[] block.7. Method prettyPrintHex Parameters 207 . int offset.?utils Parameters block return Description of Parameter Description of the Returned Value 7. hexStringToByteArray(String) public static byte[] hexStringToByteArray(String strA). Converts readable hex-String to byteArray Parameters strA return the hexadecimal string as byte array 7. Description of the Method Parameters block offset length return Description of Parameter Description of Parameter Description of Parameter Description of the Returned Value 7.Package org.?red5. int length).

?red5.?io. Method prettyPrintHex Parameters bbToConvert return ByteBuffer to encode Hexdump string 7. Method setBitDigits Parameters zeroBit oneBit 208 .10. prettyPrintHex(String) public static String prettyPrintHex(String sToConvert).11.nio. Sets the BitDigits attribute of the Convert class Parameters bd Exception The new BitDigits value Description of Exception 7.Package org.ByteBuffer bbToConvert).?utils baToConvert return Array of bytes to encode Hexdump string 7. Method prettyPrintHex Parameters sToConvert return hexdump string 7.9. char) public static void setBitDigits(char zeroBit. prettyPrintHex(ByteBuffer) public static String prettyPrintHex(java. setBitDigits(char[]) public static void setBitDigits(char[] bd) throws Exception. setBitDigits(char.8. char oneBit).

16.13. setByteSeparator(char) public static void setByteSeparator(char bs). stringToHexString(String) public static String stringToHexString(String in). Method toBinaryString Parameters b return the binary representation of the byte 7.?utils 7.Package org. Sets the WithByteSeparator attribute of the Convert class Parameters bs The new WithByteSeparator value 7. Method toBinaryString Parameters ba return the binary representation of the byte array 209 . Sets the ByteSeparator attribute of the Convert class Parameters bs The new ByteSeparator value 7. toBinaryString(byte[]) public static String toBinaryString(byte[] ba). setWithByteSeparator(boolean) public static void setWithByteSeparator(boolean bs).?io.?red5. Description of the Method Parameters in return string to be converted String in readable hex encoding 7.12. toBinaryString(byte) public static String toBinaryString(byte b).14.15.

?red5. toByteArray(long) public static final byte[] toByteArray(long l). toBinaryString(short) public static String toBinaryString(short s). toBinaryString(long) public static String toBinaryString(long l).21. Method toByteArray Parameters i return the int as array of bytes 7. toBinaryString(int) public static String toBinaryString(int i). toByteArray(int) public static final byte[] toByteArray(int i).18.17. Method toByteArray Parameters 210 .Package org. Method toBinaryString Parameters s return the binary representation of the short 7.?io. Method toBinaryString Parameters l return the binary representation of the long 7.19. Method toBinaryString Parameters i return the binary representation of the int 7.20.?utils 7.

int) public static String toHexString(byte[] ba. toHexString(byte[]) public static String toHexString(byte[] ba). toByteArray(short) public static final byte[] toByteArray(short s).24. Parameters ba return Description of Parameter Description of the Returned Value 7. Method toByteArray Parameters s return the short as array of bytes 7. converts String to Hex String.22. toHexString(byte[]. Each byte is converted to 2 hex symbols. int.25.Package org.?io.?utils l return the long as array of bytes 7.23. Returns a string of hexadecimal digits from a byte array. Method toHexString Parameters b return the hexadecimal representation of the byte 7. toHexString(byte) public static String toHexString(byte b).?red5. int offset. Example: niko ->6E696B6F Parameters ba offset Description of Parameter Description of Parameter 211 . int length).

toString(byte[]) public static String toString(byte[] ba). toHexString(short) public static String toHexString(short s).30. Method toHexString Parameters i return the hexadecimal representation of the int 7. Description of the Method Parameters s return Description of the Returned Value 7.Package org.?io.28. 212 . Method toHexString Parameters l return the hexadecimal representation of the long 7. toHexString(long) public static String toHexString(long l). toString(byte) public static String toString(byte b). toHexString(int) public static String toHexString(int i).?red5.27.26.29.?utils length return Description of Parameter Description of the Returned Value 7. Method toString Parameters b return the byte as string 7.

common. UTF-8 is used 213 .apache. public static int readMediumInt(org.apache.apache. int value).mina.apache.?red5. org. int value).common.common.apache. public static int readMediumInt2(org.ByteBuffer buf).ByteBuffer buf).ByteBuffer out.apache. equals .2. public static int readReverseInt(org.nio.common.mina.1.lang.ByteBuffer in).Package org. String msg. // Public Static Methods public static void debug(org.common. Class IOUtils Misc I/O util methods 8.ByteBuffer in). Synopsis public class IOUtils { // Public Static Fields public static final java.common.nio.mina.Charset CHARSET .mina.charset.ByteBuffer in).charset. public static String toString(org.mina.mina. wait 8.apache. notify .Object: clone .apache. finalize . // Public Constructors public IOUtils(). public static void writeReverseInt(org. public static void writeMediumInt(org.ByteBuffer out. notifyAll . toString . } Methods inherited from java.?io.Charset CHARSET . CHARSET public static final java. getClass .mina.slf4j.common.ByteBuffer in). hashCode .?utils Method toString Parameters ba return the byte array as string 8.mina.Logger log.common. public static int readUnsignedMediumInt(org.

6.ByteBuffer in). Alternate method for reading medium int Parameters in return Source int value 8.mina.common.Package org.apache. readMediumInt2(ByteBuffer) public static int readMediumInt2(org.ByteBuffer in).apache. String msg. readMediumInt(ByteBuffer) public static int readMediumInt(org.mina.mina.apache.Logger log. readUnsignedMediumInt(ByteBuffer) public static int readUnsignedMediumInt(org.7. Reads medium int Parameters in return Source int value 8.mina.ByteBuffer in).?io. readReverseInt(ByteBuffer) public static int readReverseInt(org.ByteBuffer in).common.slf4j.4.common. org. Reads reverse int Parameters in return Source int 8. ByteBuffer) public static void debug(org. debug(Logger.apache.mina.3.?utils 8. String.common. Format debug message Parameters log msg buf Logger Message Byte buffer to debug 8.5.?red5.ByteBuffer buf).apache. 214 .common.

8.apache. Class ObjectMap Map that should be transmitted as object through RTMP.ByteBuffer buf).common. String representation of byte buffer Parameters buf return Byte buffer String representation 8.?red5.V> extends.apache. 9. int value). Writes integer in reverse order Parameters out value Data buffer to fill Integer 9.Package org.ByteBuffer out. int value).10. writeMediumInt(ByteBuffer. java.common.?io.?util.9.apache.mina.common.mina. toString(ByteBuffer) public static String toString(org. int) public static void writeReverseInt(org. writeReverseInt(ByteBuffer. int) public static void writeMediumInt(org.ByteBuffer out.1.?HashMap { // Public Constructors 215 . Synopsis public class ObjectMap<K.mina. Writes medium integer Parameters out value Output buffer Integer to write 8.?utils Reads unsigned medium integer Parameters in return Unsigned medium int source int value 8.

?utils public ObjectMap(). notifyAll . containsValue . Class RandomGUID public class RandomGUID { // Public Fields public String valueAfterMD5 . } Methods inherited from java. // Public Constructors public XMLUtils(). hashCode .?red5. keySet . wait 10. notifyAll . entrySet . 216 . public RandomGUID(boolean secure).AbstractMap: equals .lang.util. finalize . values Methods inherited from java. public String valueBeforeMD5 . equals .?io. toString . getClass . Class XMLUtils Misc XML utils 11.slf4j. remove .Logger log . isEmpty . notify .Package org.HashMap: clear . size .lang. } Methods inherited from java. Synopsis public class XMLUtils { // Protected Fields protected static org.util. // Public Methods public String toString(). containsKey . getClass . hashCode . putAll . toString Methods inherited from java.Object: finalize .1. clone . // Public Static Methods public static void main(String[] args).Object: clone . // Public Constructors public RandomGUID(). put . get . wait 11. notify .

lang.w3c.dom. Convert a DOM tree into a String using transform 217 . Converts doc to String Parameters dom return DOM object to convert XML as String 11.dom.Object: clone . public static String docToString1(org. finalize . Logger 11.Package org.w3c. docToString2(Document) public static String docToString2(org.w3c.slf4j.Document stringToDoc(String str) throws IOException.dom. } Methods inherited from java.dom.Logger log .Document domDoc) throws IOException.w3c. docToString(Document) public static String docToString(org. hashCode .Document domDoc) throws IOException. getClass .w3c.?io.3.Document dom).4. equals .5. toString . docToString1(Document) public static String docToString1(org. wait 11.Document dom). notifyAll . notify .?red5.w3c.dom.dom.?utils // Public Static Methods public static String docToString(org.w3c. Convert a DOM tree into a String using Dom2Writer Parameters dom return DOM object to convert XML as String 11.Document dom).dom. log protected static org.2.Document dom). public static String docToString2(org. public static org.

stringToDoc(String) public static org. Converts string representation of XML into Document Parameters str return IOException String representation of XML DOM object I/O exception 218 .?io.6.Package org.Document stringToDoc(String str) throws IOException.dom.?red5.io.w3c.IOException DOM object XML as String I/O exception 11.?utils Parameters domDoc return java.

Class ContextLoggingListener A servlet context listener that puts this contexts LoggerContext into a static map of logger contexts within an overall singleton log context selector. Synopsis public class ContextLoggingListenerimplements. hashCode . wait 2. // Public Methods public void destroy(). // Public Methods public void contextDestroyed(javax. notify . notifyAll .ServletContextEvent event). It removes it after the request is processed.servlet. public void contextInitialized(javax.xml file <listener> <listener-class>org.?Filter { // Public Constructors public LoggerContextFilter().servlet.lang.ContextLoggingListener</liste\ ner-class> </listener> 1.logging.?servlet.red5. Class LoggerContextFilter A servlet filter that puts this contexts LoggerContext into a Threadlocal variable. toString .1.logging. add the following lines to a web. Synopsis public class LoggerContextFilterimplements.?servlet. finalize .1. 219 .ServletContextEvent event). javax. javax. } Methods inherited from java. getClass .Object: clone . To use it.xml file <filter> <filter-name>LoggerContextFilter</filter-name> <filter-class>org. add the following line to a web.?ServletContextListener { // Public Constructors public ContextLoggingListener().1. To use it.LoggerContextFilter</filter-cla\ ss> </filter> <filter-mapping> <filter-name>LoggerContextFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> 2. equals .red5.

ch. hashCode . public void removeLocalContext().classic.servlet. public ch.classic.?logback. public ch. public void setLocalContext(ch.servlet. public int getCount(). public void setContextName(String contextName).List<java.red5.util.logback. Class LoggingContextSelector A class that allows the LoggerFactory to access an web context based LoggerContext. javax. ServletException. public void init(javax. // Public Methods public void attachLoggerContext(String contextName. notifyAll . wait 220 .logback.logging.?ContextSelector { // Public Constructors public LoggingContextSelector(ch.qos.?logging public void doFilter(javax. Add this java option -Dlogback.?selector.classic.?qos.qos. finalize .servlet. ch. notify . public java.classic. equals . getClass .qos.LoggerContext getLoggerContext().classic.qos.servlet. notifyAll . finalize .classic.ServletRequest request. equals . public void setContextConfigFile(String contextConfigFile).qos. Synopsis public class LoggingContextSelectorimplements. public ch.classic.LoggerContext loggerContext). } Methods inherited from java.logback.LoggerContext detachLoggerContext(String loggerContextName).logback. } Methods inherited from java.lang. toString .LoggerContext context).logback.?classic.String> getContextNames(). notify . hashCode .lang.?red5.ServletResponse response.LoggerContext context).ContextSelector=org.FilterChain chain) throws IOException. public ch. toString . getClass . javax. wait 3.qos.Package org.qos.FilterConfig config) throws ServletException.LoggerContext getDefaultLoggerContext().logback.Object: clone .1.lang.LoggingContextSelector 3.logback.LoggerContext getLoggerContext(String name).Object: clone .

qos.core. setLocalContext(LoggerContext) public void setLocalContext(ch. 4. Synopsis public class W3CAppender extends. They provide a way to tell the selector which context to use. getEncoding . createWriter .?qos.WriterAppender: append . public void setFields(String fields). getLayout . Parameters context 4. setImmediateFlush .qos.logback. setBufferSize . Returns the number of managed contexts Used for testing purposes Parameters return the number of managed contexts 3. setBufferedIO .qos. stop .logback.?logging 3. closeWriter . ch.qos. public String getFields(). public void setEvents(String events).classic. start Methods inherited from ch. // Public Methods public synchronized void doAppend(ch. setAppend . isBufferedIO .?core. These methods are used by the LoggerContextFilter.logback.?FileAppender { // Public Constructors public W3CAppender(). getBufferSize . thus saving the cost of a JNDI call at each new request.?red5. setLayout . setFile .Package org.classic. public String getEvents(). getCount() public int getCount().FileAppender: getAppend . } Methods inherited from ch.?logback.spi.1.2.LoggingEvent event).logback. setWriter . subAppend 221 .3. setEncoding .LoggerContext context). getFile . Class W3CAppender Logback appender for the Extended W3C format.core. getImmediateFlush .

isStarted .WriterAppender: encoding .w3. hashCode . addWarn .logback.spi.logback. immediateFlush . getClass .core.ContextAwareBase: context See Also http://www.qos. getFirstFilter .?logging Methods inherited from ch. clearAllFilters . notify . layout . fileName Fields inherited from ch.core. bufferedIO . getFilterChainDecision .AppenderBase: name .core.logback.Package org. toString Methods inherited from ch.qos.core. addStatus . getName . getStatusManager .org/TR/WD-logfile.logback.Object: clone .core.AppenderBase: addFilter .spi.qos.logback.core. wait Fields inherited from ch.ContextAwareBase: addError . getContext . started Fields inherited from ch.logback.qos.FileAppender: append . equals . notifyAll . doAppend . setContext Methods inherited from java. bufferSize . addInfo .?red5. setName . finalize . writer Fields inherited from ch.qos.qos.html 222 .lang.

connectionClosed(RTMPConnection.?red5.server.?net.rtmp. org.1. // Public Static Methods public static void main(String[] args). public void messageSent(org.red5. org.net.RTMP state). Object message).codec. wait See Also http://mirror1. hashCode .3.rtmp. getClass .server.RTMP state).RTMP state). connectionOpened(RTMPConnection.rtmp.server.red5.net. // Public Methods public void connectionClosed(org. RTMP) public void connectionOpened(org.net.server. } Methods inherited from java.server. Synopsis public class SimpleClientimplements.red5.red5.RTMPConnection conn.RTMPConnection conn.lang.cvsdude.net. RTMP) public void connectionClosed(org.Object: clone .protocol.server. toString . equals . Specified by: Method connectionOpened in interface IRTMPHandler 223 .red5.codec.rtmp.red5.RTMPConnection conn.net. finalize .server. Class SimpleClient Sample class that uses the client mode of the RTMP library to connect to the "oflaDemo" application on the current server.net.RTMP state).rtmp.net. public void messageReceived(org.rtmp. notifyAll .rtmp. notify .codec.RTMPConnection conn.red5.red5.net. Object message) throws Exception.RTMPConnection conn.com/trac/osflash/red5/ticket/94 1.rtmp.server.net.ProtocolState state.?IRTMPHandler { // Public Constructors public SimpleClient().?rtmp.rtmp.2.red5.codec.server. org. org.rtmp. 1.RTMPConnection conn. org.1.server.net.net.server. public void connectionOpened(org.red5. org.?server.red5. Specified by: Method connectionClosed in interface IRTMPHandler Connection closed 1.

rtmp.Package org.net.ProtocolState state.4.server.server.protocol.RTMPConnection conn.rtmp.net.?samples.server.red5.?client Connection open event 1. Object message) throws Exception.RTMPConnection conn.5. Specified by: Method messageReceived in interface IRTMPHandler Message recieved 1.red5. Object message). messageSent(RTMPConnection. Object) public void messageReceived(org.red5. Specified by: Method messageSent in interface IRTMPHandler Message sent 224 . ProtocolState.net.?red5. Object) public void messageSent(org. messageReceived(RTMPConnection. org.

notifyAll . toString . boolean persistent).2. Parameters scope username uid scope the client connected to name of the user that connected the unique id of the user that connected 225 . This adds the username to the shared object of the passed scope. finalize .red5. 1.server. Parameters name persistent name of the shared object to use should the shared object be persistent 1.server.red5. getClass .api.IScope scope. notify . String username. Class ClientManager Class that keeps a list of client names in a SharedObject. String uid). addClient(IScope. Synopsis public class ClientManager { // Public Constructors public ClientManager(String name. boolean persistent).IScope scope. // Public Methods public void addClient(org.Object: clone . } Methods inherited from java. wait 1. hashCode . A new client connected. public String removeClient(org. boolean) public ClientManager(String name. String. equals .red5.3.1.1. String) public void addClient(org.api. String username. Create a new instance of the client manager.lang.server. ClientManager(String. String uid).api.IScope scope. String uid).

String uid). A client disconnected. Parameters scope uid return scope the client disconnected from unique id of the user that disconnected the username of the disconnected user 226 .Package org. String) public String removeClient(org.server. removeClient(IScope.?samples.?components 1.?red5.red5.IScope scope.4.api. This removes the username from the shared object of the passed scope.

util.util.server.util. echoArray(Object[]) public Object[] echoArray(Object[] array).?samples.Date echoDate(java. public java.Object> returnDistinctObjects(Object any). java. public double echoNumber(double number). wait 1.dom.w3c.Map team.util. public String echoString(String string).dom.util. notify .Map obj).2.List<java. public java. 1.List echoList(java. public boolean echoBoolean(boolean bool). Class EchoService The Echo service is used to test all of the different datatypes and to make sure that they are being returned properly.List words. 227 .?services.Map echoObject(java.lang.lang.IConnection returnConnection(Object any).Object: clone .1. } Methods inherited from java.1. public java. org.Object> returnSameObjects(Object any).?red5. notifyAll .util.?IEchoService { // Public Constructors public EchoService().red5.util. public org. String str). public Object[] echoArray(Object[] array).lang.Document xml).Document echoXML(org.api. public Object[] echoMultiParam(java.w3c.util. public java.List list). toString . equals . Synopsis public class EchoServiceimplements. getClass .util. public java.util. public void startUp().List<java. // Public Methods public Object echoAny(Object any). finalize .Date date). public org. hashCode .

List list).util. 228 . Specified by: Method echoDate in interface IEchoService Verifies that a Date that is passed in returns correctly.?red5.Date date).Object[]) input value Description copied from interface: echoArray 1.Date echoDate(java. Parameters bool return See Also echoBoolean(boolean) input value Description copied from interface: echoBoolean 1.?samples.5.lang.3. Specified by: Method echoBoolean in interface IEchoService Verifies that a boolean that is passed in returns correctly. echoDate(Date) public java.4.util. Flash simple Array = Object[] Parameters array return See Also echoArray(java.util.util.util.Date) input value Description copied from interface: echoDate 1. Parameters date return See Also echoDate(java. echoList(List) public java.List echoList(java. echoBoolean(boolean) public boolean echoBoolean(boolean bool).?services Specified by: Method echoArray in interface IEchoService Verifies that a Flash simple Array that is passed in returns correctly.Package org.

? extends V>) 1. echoObject(Map) public java.7.String) input value Description copied from interface: echoString 1. echoNumber(double) public double echoNumber(double number).6. See Also echoObject(java.Document echoXML(org. echoString(String) public String echoString(String string).?services See Also echoList(java. Parameters string return See Also echoString(java.Map<? extends K. Flash Number = double Parameters num return See Also echoNumber(double) input value Description copied from interface: echoNumber 1.util.lang.?red5.w3c.Package org. echoXML(Document) public org.util. Specified by: Method echoXML in interface IEchoService 229 .util.w3c.Document xml).util.8. Specified by: Method echoString in interface IEchoService Verifies that a String that is passed in returns correctly.dom.?samples. Specified by: Method echoNumber in interface IEchoService Verifies that a Number that is passed in returns correctly.dom.List<? extends T>) 1.Map echoObject(java.Map obj).9.

Flash XML = org.10.Object> returnDistinctObjects(Object any). Test returning of internal objects. returnConnection(Object) public org.Object> returnSameObjects(Object any). Specified by: Method startUp in interface IEchoService 230 .12. Parameters any return list containing same objects 1.Document) input value Description copied from interface: echoXML 1. startUp() public void startUp().lang.server. Test references.api.lang. Test serialization of arbitrary objects. returnSameObjects(Object) public java.dom.w3c.Document Parameters xml return See Also echoXML(org.13.List<java. Parameters any return list containing distinct objects 1.w3c. Parameters any return the current connection 1.Package org.IConnection returnConnection(Object any).?services Verifies that Flash XML that is passed in returns itself.11.util.?red5.?samples.dom. returnDistinctObjects(Object) public java.red5.List<java.util.

Package org. // Public Constructors public EchoService. public int value2 . Synopsis public interface IEchoService { // Public Methods public Object[] echoArray(Object[] array).Document xml). public java. 3.util. 2. Interface IEchoService The Echo service is used to test all of the different datatypes and to make sure that they are being returned properly.Map<? extends K.SampleObject(). public String echoString(String string). toString .util. notifyAll .util. public java.1. wait 3.lang. Synopsis public class EchoService. public org.SampleObject { // Public Fields public String value1 .util.w3c. public double echoNumber(double num).w3c.?services Used to verify that Spring has loaded the bean.Date echoDate(java. } Methods inherited from java. getClass . finalize . Class EchoService.Map<K.util.dom. // Protected Fields protected int value4 . hashCode . 231 .?red5.List<T> echoList(java.List<? extends T> list).util. public java. ? extends V> obj).SampleObject Sample object that contains attributes with all access possibilities. V> echoObject(java.Document echoXML(org. equals . public boolean echoBoolean(boolean bool).dom.1. 2.Object: clone .?samples. notify . This will test the serializer of arbitrary objects.Date date).

Verifies that a Flash multi-dimensional Array that is passed in returns itself.5.4.util. Flash multidimensional Array = java.Package org.3. } 3.?services public void startUp().List<T> echoList(java.?red5.List<? extends T> list).List Parameters list return input value 232 . Verifies that a Date that is passed in returns correctly. echoDate(Date) public java. Parameters bool return input value 3. Flash simple Array = Object[] Parameters array return input value 3.?samples.2.util.Date date). echoArray(Object[]) public Object[] echoArray(Object[] array). Verifies that a Flash simple Array that is passed in returns correctly.util. echoList(List<? extends T>) public java. echoBoolean(boolean) public boolean echoBoolean(boolean bool). Parameters date return input value 3.utils.Date echoDate(java.util. Verifies that a boolean that is passed in returns correctly.

Parameters string return input value 3. Verifies that a String that is passed in returns correctly.Map Parameters obj return input value 3. echoNumber(double) public double echoNumber(double num). echoObject(Map<? extends K. 233 .dom.8. Used to verify that Spring has loaded the bean. V> echoObject(java.Document xml).?samples.dom.Map<? extends K.Package org. Verifies that a Flash Object that is passed in returns correctly. ? extends V> obj).?red5.util.w3c. Flash Object = java.Document echoXML(org.?services 3.7. Flash XML = org. Verifies that a Number that is passed in returns correctly.util.utils. ? extends V>) public java.10.Map<K.dom.Document Parameters xml return input value 3.6.9. echoXML(Document) public org. Verifies that Flash XML that is passed in returns itself.w3c.w3c. startUp() public void startUp(). Flash Number = double Parameters num return input value 3. echoString(String) public String echoString(String string).

public String getStringAttribute(String name).util. Class AttributeStore public class AttributeStoreimplements.IAttributeStore values).util.util.Map<java. java.util. public Boolean getBoolAttribute(String name). Object defaultValue). // Public Methods public Object getAttribute(String name).red5.server. public Double getDoubleAttribute(String name). public java. java.String.Object> values).lang.util.api. public AttributeStore(java.lang.?api.String. // Public Constructors public AttributeStore(). public java. Object value).Map<java. java.Map getMapAttribute(String name).Set getSetAttribute(String name). public AttributeStore(org.1. public Object getAttribute(String name. public Integer getIntAttribute(String name). public boolean hasAttribute(String name).lang.lang.List getListAttribute(String name). public void removeAttributes(). public java. 234 .?ICastingAttributeStore { // Protected Fields protected java.lang.ConcurrentMap<java.Object> getAttributes(). org.concurrent.String. public Short getShortAttribute(String name). public java. public boolean removeAttribute(String name).Object> attributes . public java. public Long getLongAttribute(String name).?server.Set<java.lang.util.lang.String> getAttributeNames().util. public Byte getByteAttribute(String name).?red5. public boolean setAttribute(String name.

server. equals .util.?PersistableAttributeStore .Map<java.String.util. Parameters values the map to filter 235 .1.lang.Map<java.?red5.4.ConcurrentMap<java.?server. java.Object: clone .lang.lang.5.lang.util. Creates attribute store with initial values. notify . 1.Map<java.Map<java.String.String.3.lang.Str } Direct known subclasses: org.concurrent.Strin Filter null keys and values from given map.Package org. Object is not associated with a persistence storage.lang.api. finalize .util.lang. getClass .lang.red5. java.lang. Map for attributes 1. org. 1. org. notifyAll .Object> values).?red5.lang.IAttributeStore values).lang. 1.?server.util. filterNull(Map<String.?red5.?so. Object is not associated with a persistence storage. // Protected Methods protected java.Object> values).server.Object> attributes .?BaseConnection . Object>) protected java. java. attributes protected java.Object> filterNull(java. hashCode .Map<java.? Client .IAttributeStore values).red5.Object> filterNull(java.lang. java.util. AttributeStore() public AttributeStore(). Creates attribute store with initial values.? SharedObject Methods inherited from java.?server.String. wait 1.String. AttributeStore(IAttributeStore) public AttributeStore(org.?red5. org. Object>) public AttributeStore(java.?server public void setAttributes(java. public void setAttributes(org.lang. java. toString .api.?server.?red5.Map<java. Creates empty attribute store.util.2. AttributeStore(Map<String. Object is not associated with a persistence storage.

lang.Package org.String> getAttributeNames(). Parameters return map containing all attributes 1.7. Parameters name defaultValue return the name of the attribute to get the value of the attribute to set if the attribute doesn't exist the attribute value 1. Object defaultValue). Return the value for a given attribute.10.6.9.?server return filtered map 1. The resulting set will be read-only.Map<java. The resulting map will be read-only. getBoolAttribute(String) public Boolean getBoolAttribute(String name). getAttributeNames() public java. Get the attributes.String. getAttribute(String. Parameters name return the name of the attribute to get the attribute value or null if the attribute doesn't exist 1. getAttribute(String) public Object getAttribute(String name). Object) public Object getAttribute(String name.8.?red5.util. Get the attribute names.lang.lang.Object> getAttributes(). Return the value for a given attribute and set it if it doesn't exist. Parameters return set containing all attribute names 1. 236 . java.Set<java. getAttributes() public java.util.

Specified by: Method getDoubleAttribute in interface ICastingAttributeStore Get Double attribute by name Parameters name return Attribute name Attribute 1.13. getByteAttribute(String) public Byte getByteAttribute(String name). Specified by: Method getIntAttribute in interface ICastingAttributeStore Get Integer attribute by name Parameters name return Attribute name Attribute 237 .12. getDoubleAttribute(String) public Double getDoubleAttribute(String name). getIntAttribute(String) public Integer getIntAttribute(String name). Specified by: Method getByteAttribute in interface ICastingAttributeStore Get Byte attribute by name Parameters name return Attribute name Attribute 1.?red5.?server Specified by: Method getBoolAttribute in interface ICastingAttributeStore Get Boolean attribute by name Parameters name return Attribute name Attribute 1.Package org.11.

util.15. getSetAttribute(String) public java.Map getMapAttribute(String name).14. getLongAttribute(String) public Long getLongAttribute(String name).Package org. Specified by: Method getLongAttribute in interface ICastingAttributeStore Get boolean attribute by name Parameters name return Attribute name Attribute 1.17. Specified by: Method getMapAttribute in interface ICastingAttributeStore Get Long attribute by name Parameters name return Attribute name Attribute 1. Specified by: Method getSetAttribute in interface ICastingAttributeStore Get Set attribute by name Parameters name Attribute name 238 .List getListAttribute(String name).16.?server 1.util.?red5. Specified by: Method getListAttribute in interface ICastingAttributeStore Get List attribute by name Parameters name return Attribute name Attribute 1. getMapAttribute(String) public java.util. getListAttribute(String) public java.Set getSetAttribute(String name).

19. Parameters name return the name of the attribute to check true if the attribute exists otherwise false 1. Specified by: Method getShortAttribute in interface ICastingAttributeStore Get Short attribute by name Parameters name return Attribute name Attribute 1. removeAttribute(String) public boolean removeAttribute(String name). Check the object has an attribute.18.?server return Attribute 1. Remove an attribute.21. getStringAttribute(String) public String getStringAttribute(String name). getShortAttribute(String) public Short getShortAttribute(String name).?red5. Parameters name the name of the attribute to remove 239 . hasAttribute(String) public boolean hasAttribute(String name).Package org.20. Specified by: Method getStringAttribute in interface ICastingAttributeStore Get String attribute by name Parameters name return Attribute name Attribute 1.

api.lang.?server. setAttribute(String. Synopsis public abstract class BaseConnection extends. org.?AttributeStore implements. setAttributes(IAttributeStore) public void setAttributes(org. org. java.?red5.?server return true if the attribute was found and removed otherwise false 1. Parameters values the attributes to set 1. Class BaseConnection Base abstract class for connections. Object value).server.?api.String. Object) public boolean setAttribute(String name.IAttributeStore values).24.22.Package org.?red5.Map<java.?IConnection { 240 .Object> values). Set multiple attributes on this object.util. setAttributes(Map<String.25. Set an attribute on this object.red5. 1. Remove all attributes. removeAttributes() public void removeAttributes().?server. Adds connection specific functionality like work with clients to AttributeStore. Set multiple attributes on this object. Object>) public void setAttributes(java. Parameters values the attributes to set 2.1.lang.23.?red5. 2. Parameters name value return the name of the attribute to change the new value of the attribute true if the attribute value changed otherwise false 1.

241 . protected String remoteAddress . protected String type . protected String sessionId .Map<java.IBasicScope> basicScopes .List<java. protected String host .api.red5.util. java.server.api. Object[] params).red5.red5.api.event.util.IScope newScope).red5. protected boolean closed .Logger log . protected static org. String path.server.server.api.lang.util.api.server.String> remoteAddresses .lang. String host. protected String path .util.Object> params). protected Scope scope .IBasicScope> getBasicScopes(). public boolean connect(org. java. public boolean connect(org. public org. protected java.api.server.String. // Public Methods public void close().red5. public java.server.?red5.red5.Map<java.api.util. // Public Constructors public BaseConnection(String type. protected org.Set<org.lang.red5.IEvent event).Package org. java. protected int remotePort . int remotePort.IClient client .lang.Object> params .server.lang.Iterator<org. protected long droppedMessages .IScope newScope. String remoteAddress. protected java.?server // Protected Fields protected java.IClient getClient().slf4j. protected long writtenMessages . String sessionId. protected long readMessages . public void dispatchEvent(org.String.

public abstract long getWrittenBytes().?red5. public String getSessionId(). getMapAttribute .?rtmp.Map<java. getIntAttribute .api. } Direct known subclasses: org.server.server. public long getWrittenMessages(). setAttributes 242 . public void initialize(org.String> getRemoteAddresses(). getStringAttribute . getAttributeNames .Object> getConnectParams().?net.red5.event. public String getHost(). public void notifyEvent(org. java. setAttribute . public void unregisterBasicScope(org. getShortAttribute . getAttributes . public void registerBasicScope(org. public java.lang. public boolean handleEvent(org.lang.red5.?server public long getClientBytesRead().red5. public long getPendingMessages().IEvent event). public long getDroppedMessages(). getSetAttribute . removeAttribute .api.red5.server. hasAttribute .AttributeStore: filterNull . getByteAttribute . public long getPendingVideoMessages(int streamId).IBasicScope basicScope).api.server. public boolean isConnected(). public java.red5.List<java. getDoubleAttribute . getLongAttribute . public int getRemotePort(). removeAttributes .IBasicScope basicScope). getBoolAttribute .red5.red5.api.IEvent event).?red5. public abstract long getReadBytes().event.server.lang.?RTMPConnection Methods inherited from org.api.server.?server.util.api. public String getType(). public org.util. getListAttribute .String. public long getReadMessages(). getAttribute .server.Package org. public String getPath().IClient client).IScope getScope(). public String getRemoteAddress().

getClass .util.server. String remoteAddress.IBasicScope> basicScopes .lang.server. droppedMessages protected long droppedMessages . String.server.?server Methods inherited from java.lang. Number of dropped messages 243 .Object: clone .Set<org. Is the connection closed? 2. java.util. java. Set of basic scopes.red5. toString .lang. Object>) public BaseConnection(String type.String. basicScopes protected java.Map<java. wait Fields inherited from org. String. BaseConnection(String.AttributeStore: attributes 2.Object> params).IClient client .2. closed protected boolean closed .6.4. finalize . String. 2. client protected org.Package org.api. notify . String sessionId.5. String host. Map<String.?red5. Parameters type host remoteAddress remotePort path sessionId params Connection type Host Remote address Remote port Scope path on server Session id Params passed from client 2.red5. int. hashCode . String path. int remotePort. Client bound to connection 2.3.red5. equals . notifyAll .api. String.

com/ fms/2/docs/00000570. Connection remote address 2.Logger log .String. Remote port 2.util.?server 2. params protected java.14. host protected String host . log protected static org. Logger 2.12. remoteAddresses protected java. Connection host 2.8.?red5. path protected String path . See Also NetConnection in Flash Media Server docs (external) ['http://livedocs.List<java.10.15.7.Map<java.html'] Connection params passed from client with NetConnection.lang. Number of read messages 2.String> remoteAddresses . java.adobe.util.13.11. remoteAddress protected String remoteAddress .lang.connect call 2. Path of scope client connected to 2. readMessages protected long readMessages .Object> params .9. Connection remote addresses 2. remotePort protected int remotePort .lang.slf4j.Package org. scope 244 .

19. Specified by: Method connect in interface IConnection Connect to another scope on server with given parameters Parameters newScope New scope 245 .server.IScope newScope.?red5.red5.api. Scope that connection belongs to 2.16.Package org. Object[] params). Connection type 2. Specified by: Method close in interface IConnection Closes connection 2.api. close() public void close(). Specified by: Method connect in interface IConnection Connect to another scope on server Parameters newScope return New scope true on success.20. writtenMessages protected long writtenMessages . connect(IScope) public boolean connect(org. Object[]) public boolean connect(org. sessionId protected String sessionId .21. false otherwise 2.IScope newScope).?server protected Scope scope .red5.server.17.18. connect(IScope. Number of written messages 2. Connection session identifier 2. type protected String type .

server.event.lang. getClientBytesRead() public long getClientBytesRead().util. Specified by: Method getClient in interface IConnection Get the client object associated with this connection. Specified by: Method getBasicScopes in interface IConnection Get the basic scopes this connection has subscribed.25.Iterator<org.IClient getClient().red5.Map<java. This list will contain the shared objects and broadcast streams the connection connected to. Dispatches event Parameters event Event 2.22. getBasicScopes() public java. Parameters return List of basic scopes Description copied from interface: getBasicScopes 2.?red5.IEvent event). false otherwise 2.api.Package org.String.server.24.api.red5.red5. Specified by: Method getClientBytesRead in interface IConnection Return number of written bytes the client reports to have received. 246 . This is the last value of the BytesRead message received from a client. getClient() public org.server. java.Object> getConnectParams().lang.api.26.IBasicScope> getBasicScopes(). getConnectParams() public java. dispatchEvent(IEvent) public void dispatchEvent(org.23.?server params return Parameters to connect with true on success.util. Parameters return Client object Description copied from interface: getClient 2. 2.

247 .?server Specified by: Method getConnectParams in interface IConnection Return connection parameters Parameters return 2. Parameters return Number of dropped messages Description copied from interface: getDroppedMessages 2. Parameters return path Connection path Description copied from interface: getPath 2. getPath() public String getPath().Package org.28. If they are connected to an IP.27. Specified by: Method getDroppedMessages in interface IConnection Total number of messages that have been dropped. getPendingMessages() public long getPendingMessages(). getDroppedMessages() public long getDroppedMessages(). getHost() public String getHost(). Specified by: Method getPath in interface IConnection Get the path for this connection. Parameters return String containing the hostname Description copied from interface: getHost 2. Specified by: Method getHost in interface IConnection Get the hostname that the client is connected to.?red5.30. the IP address will be returned as a String. This is not updated if you switch scope.29.

Package org. getRemoteAddress() public String getRemoteAddress(). Parameters return Number of read bytes Description copied from interface: getReadBytes 2. getReadMessages() public long getReadMessages(). Specified by: Method getRemoteAddress in interface IConnection Get the IP address the client is connected from. getReadBytes() public abstract long getReadBytes().34.32.?red5.31. Specified by: Method getReadBytes in interface IConnection Total number of bytes read from the connection. 248 .?server Specified by: Method getPendingMessages in interface IConnection Total number of messages that are pending to be sent to the connection. Parameters return Number of read messages Description copied from interface: getReadMessages 2. Specified by: Method getReadMessages in interface IConnection Total number of messages read from the connection. Parameters streamId return 2. getPendingVideoMessages(int) public long getPendingVideoMessages(int streamId). Parameters return Number of pending messages Description copied from interface: getPendingMessages 2.33.

getSessionId() public String getSessionId().server.String> getRemoteAddresses().35. Specified by: Method getSessionId in interface IConnection 249 . Parameters return The IP addresses of the client Description copied from interface: getRemoteAddresses 2.red5.IScope getScope().36.37. If a client is connected through RTMPT and uses a proxy to connect.api.lang. Specified by: Method getScope in interface IConnection Get the scope this is connected to.List<java.?server Parameters return The IP address of the client Description copied from interface: getRemoteAddress 2. getScope() public org.38. Parameters return The port of the client Description copied from interface: getRemotePort 2. Specified by: Method getRemoteAddresses in interface IConnection Get the IP addresses the client is connected from. getRemoteAddresses() public java. getRemotePort() public int getRemotePort(). Parameters return The connected scope Description copied from interface: getScope 2.Package org.util.?red5. Specified by: Method getRemotePort in interface IConnection Get the port the client is connected from. this will contain all hosts the client used to connect to the server.

getWrittenBytes() public abstract long getWrittenBytes().server.Package org. this may be null.?server Get the session id. Parameters return Number of written messages Description copied from interface: getWrittenMessages 2.42.event.41. handleEvent(IEvent) public boolean handleEvent(org.red5. Specified by: Method getWrittenMessages in interface IConnection Total number of messages written to the connection. Specified by: Method getWrittenBytes in interface IConnection Total number of bytes written to the connection. Parameters return Number of written bytes Description copied from interface: getWrittenBytes 2.40.api.IEvent event). Handles event 250 . Parameters return string containing one of connection types Description copied from interface: getType 2. Parameters return Session id Description copied from interface: getSessionId 2. getWrittenMessages() public long getWrittenMessages().39.?red5. Specified by: Method getType in interface IConnection Get the connection type. getType() public String getType().

registerBasicScope(IBasicScope) public void registerBasicScope(org. Registers basic scope Parameters basicScope Basic scope to register 2.server. Specified by: Method initialize in interface IConnection Initializes client Parameters client Client bound to connection 2.red5.45. Notified on event Parameters event Event 2.red5. 251 . isConnected() public boolean isConnected(). Specified by: Method isConnected in interface IConnection Check whether connection is alive Parameters return true if connection is bound to scope.?server Parameters event return Event true if associated scope was able to handle event.api.IEvent event).server.server.IClient client).api. notifyEvent(IEvent) public void notifyEvent(org. false otherwise 2.44.46.api.?red5.IBasicScope basicScope).event.server.red5.IBasicScope basicScope).Package org. initialize(IClient) public void initialize(org.47. false otherwise 2.43.api. unregisterBasicScope(IBasicScope) public void unregisterBasicScope(org.red5.

// Public Methods public void addEventListener(org.?red5.red5.red5.api.event.?PersistableAttributeStore implements.?server.server.red5.IEventListener listener).IEvent event).api.?IBasicScope { // Protected Fields protected boolean keepOnDisconnect .server.util.event. String type.IScope parent . String name.server.event.red5. Basic scope is a persistable attribute store with event handling functionality 3.util. public java.api. public boolean hasParent().server. public boolean handleEvent(org. Scope. // Public Constructors public BasicScope(org.util.?server Unregister basic scope Parameters basicScope Unregister basic scope 3.IScope parent.server. public void dispatchEvent(org.red5.IBasicScope> iterator().api. org. public void notifyEvent(org.Iterator<org.server.server.event.api.api.server. public java.1.red5.server.IScope getParent().red5. Class BasicScope Generalizations of one of main Red5 object types.?red5.api.event.Iterator<org.api.red5.server. } 252 . public org.IEvent event).red5. public void removeEventListener(org. boolean persistent). Synopsis public abstract class BasicScope extends. protected java.red5. protected String persistenceClass .IEventListener> listeners .?red5.Package org.api.server. protected org.api. public String getPath().Set<org.event.event.?api.IEvent event).IEventListener> getEventListeners(). org.api.?server. public int getDepth().IEventListener listener).red5.

String type.red5. getIntAttribute . hasAttribute Methods inherited from java.4.util. String. getDoubleAttribute . getClass .?so. removeAttributes .Package org.IScope parent. Set to true to prevent the scope from being freed upon disconnect.IScope .red5. String. removeAttribute .Set<org.?red5.server. getAttributes . getSetAttribute .server. serialize .server. 253 .server. getAttribute . boolean persistent). getListAttribute . getMapAttribute . boolean) public BasicScope(org.api. store .red5.?server.api.?server.red5. getLongAttribute . equals . getShortAttribute . wait Fields inherited from org.lang. setAttribute . BasicScope(IScope. getAttributeNames .IEventListener> listeners .?server Direct known subclasses: org. must be unique among scopes of one level Whether scope is persistent persistent 3. modified .?red5. getName . hashCode .AttributeStore: filterNull . setAttributes . getStore .2.PersistableAttributeStore: lastModified .server. notifyAll .?server.Scope 3. getLastModified . getStringAttribute .? SharedObjectScope .?stream.AttributeStore: attributes See Also org. Constructor for basic scope Parameters parent type name Parent scope Scope type Scope name. setStore Methods inherited from org. notify . type Fields inherited from org.red5. setName . setPath .server. Used to identify scopes in application.?red5. 3.PersistableAttributeStore: deserialize .?BroadcastScope Methods inherited from org.red5.red5. getPath . keepOnDisconnect protected boolean keepOnDisconnect . getType . isPersistent . setPersistent .Object: clone . org.3.api. path . org.?red5. listeners protected java.server. finalize . getBoolAttribute .red5. toString . String name. getByteAttribute .?Scope . persistent .server. org. name .event.

IScope Parent scope. getEventListeners() public java.server.api. 3.10.server. The lowest depth is 0x00.event. Scopes can be nested.8.red5.server.util. 0x03 and so forth.9. Room depth is 0x02. Return listeners list iterator Parameters 254 . parent protected org.api.red5.api.red5. getDepth() public int getDepth(). the depth of Global scope. Specified by: Method getDepth in interface IBasicScope Get the scopes depth.server. See Also org.IEvent event).IScope parent .red5.?red5.IEventListener> getEventListeners().5. Scope persistence storate type 3.api. Dispatches event (notifies all listeners) Parameters event Event to dispatch 3.event. 3.7. how far down the scope tree is it. Application scope depth is 0x01. addEventListener(IEventListener) public void addEventListener(org.event.server.6.?server List of event listeners 3.Iterator<org. dispatchEvent(IEvent) public void dispatchEvent(org.Package org. Add event listener to list of notified objects Parameters listener Listening object 3.api. persistenceClass protected String persistenceClass .red5.IEventListener listener).

Specified by: Method getPath in interface IBasicScope Get the full absolute path. hasParent() public boolean hasParent(). 3.api.red5. 3. Notifies listeners on event.11. getPath() public String getPath().IBasicScope> iterator(). notifyEvent(IEvent) public void notifyEvent(org.IEvent event).?red5. host/myapp/someroom. To be implemented in subclass realization Parameters event return Event context Event handling result 3.red5.14. Eg.IEvent event).server.event.red5.server.api. iterator() public java. To be implemented in subclass realization 255 .api.util.api. Returns null because this is a base implementation Parameters return Iterator for subscopes 3.16.event. Specified by: Method hasParent in interface IBasicScope Does this scope have a parent? You can think of scopes as of tree items where scope may have a parent and children (child). Current implementation is empty.?server return Listeners list iterator 3.13. 3. Getter for subscopes list iterator.Iterator<org.server. Specified by: Method getParent in interface IBasicScope Get this scopes parent.12. handleEvent(IEvent) public boolean handleEvent(org.IScope getParent().Package org.15. getParent() public org. Handles event.server.red5.

public void remove().?Iterator { // Public Constructors public BasicScope.lang. Class BasicScope.api. Specified by: Method hasNext in interface Iterator 4.Object: clone . public org.EmptyBasicScopeIteratorimplements.Package org.red5.server.server. equals .server. remove() public void remove().IBasicScope next(). toString .EmptyBasicScopeIterator Iterator for basic scope 4.?util. wait 4. next() public org.1.3. java.17.IEventListener listener). 256 .IBasicScope next(). finalize .api.EmptyBasicScopeIterator().2.?server Parameters event Event to broadcast 3. hasNext() public boolean hasNext().event. getClass . } Methods inherited from java. notifyAll . // Public Methods public boolean hasNext(). Specified by: Method next in interface Iterator 4. Synopsis public class BasicScope.api. notify . Remove event listener from list of listeners Parameters listener Listener to remove 4.red5.red5.4. removeEventListener(IEventListener) public void removeEventListener(org. hashCode .?red5.

?red5. org. 5. notify . toString . wait 6.?IClient.?api.util.red5.?ClientMBean { // Protected Fields protected static final String PERMISSIONS = "_transient_red5_permissions".net. org. protected ClientRegistry registry .concurrent. Synopsis public class Client extends.api. protected String id .lang.server.1. protected java. protected long creationTime . // Public Static Methods public static void launch(java.ConcurrentMap<org.?server. notifyAll . finalize .?red5.server. hashCode .?red5.api.Object: clone .Logger log .slf4j. 257 .?red5. Class Client Client is an abstraction representing user connected to Red5 application.1. equals . } Methods inherited from java.URLClassLoader loader). protected static org.?server Specified by: Method remove in interface Iterator 5.home/lib directory. org. ClientRegistry registry). // Public Constructors public Client().Package org. public static void main(String[] args) throws Exception.?AttributeStore implements.IConnection.red5. Clients are tied to connections and registred in ClientRegistry 6. public Client(String id. getClass . Class Bootstrap Boot-straps Red5 using the latest available jars found in red5. Synopsis public class Bootstrap { // Public Constructors public Bootstrap().?server.?server. org.

api.String> iterateScopeNameList(). getByteAttribute .Set<org.IScope sc public long getCreationTime().util.server.red5. getAttribute .api.IBandwidthConfigure getBandwidthConfigure().lang. public boolean equals(Object obj).lang.red5.api. hasAttribute .api.server. public java. public int hashCode().red5. } Methods inherited from org.IBandwidthConfigure config).api.server.?server // Public Methods public void disconnect().IConnection conn) public java. getIntAttribute .AttributeStore: filterNull .lang.server.server.util. getBoolAttribute .IScope> getScopes().red5. public java.IConnection> getConnections(). public org.Collection<org. protected void unregister(org.Set<org. getListAttribute .red5. getMapAttribute .IConnection conn). wait Fields inherited from org.IConnection conn.IConnection conn).server.server.red5.api.server. getDoubleAttribute . String permissionName).util. getLongAttribute . getAttributeNames . setAttribute .server. // Protected Methods protected void register(org. getShortAttribute .api.IConnection> getConnections(org.Object: clone . toString .lang.Collection<java.Collection<java.api. setAttributes Methods inherited from java.String> permissions). java.Package org. public void setBandwidthConfigure(org. public java.red5.red5.server.red5. notify . public java.red5. finalize .api.util. notifyAll . public String getId(). getStringAttribute .api.red5. removeAttributes . hashCode .util. equals .String> getPermissions(org. getClass .red5.api.server.api.server. public void setPermissions(org.red5.red5.server. removeAttribute .?red5.util.List<java. getAttributes . public org. public boolean hasPermission(org.IBWControllable getParentBWControllable(). getSetAttribute . public String toString().IConnection conn.server.AttributeStore: attributes 258 .

3.concurrent.?server 6.8. creationTime protected long creationTime . registry protected ClientRegistry registry . Logger 6. Client registry where Client is registred 6.server. Name of connection attribute holding the permissions. Specified by: Method disconnect in interface IClient 259 .api.server. Creation time as Timestamp 6. Client(String.7.6.red5. ClientRegistry) public Client(String id.slf4j.api.Package org. sets creation time and registers it in ClientRegistry Parameters id registry Client id ClientRegistry 6. PERMISSIONS protected static final String PERMISSIONS = "_transient_red5_permissions".5.ConcurrentMap<org.util.9. 6. id protected String id .IConnection.Logger log . org. log protected static org. disconnect() public void disconnect(). Clients identificator 6. connToScope protected java. Creates client.IS Scopes this client connected to 6.4. ClientRegistry registry).2.red5.?red5.

api.api.red5.11.server.api. getBandwidthConfigure() public org.server.Set<org.util. broadcasting bandwidth and quality settings for this client Parameters return Bandwidth configuration context 6.IScope scop Specified by: Method getConnections in interface IClient Return client connections to given scope Parameters scope return Scope Set of connections for that scope 6.red5. getConnections() public java.12.IConnection> getConnections(org.server. getConnections(IScope) public java. getCreationTime() public long getCreationTime().10.api.red5.server.util.red5.Package org.Set<org. Specified by: Method getConnections in interface IClient Return set of connections for this client Parameters return Set of connections 6. Check clients equality by id Parameters obj return Object to check against true if clients ids are the same. Return bandwidth configuration context.?server Disconnects client from Red5 application 6. false otherwise 6. that is. equals(Object) public boolean equals(Object obj).14.IBandwidthConfigure getBandwidthConfigure(). 260 .?red5.13.IConnection> getConnections().

Collection<java.red5. Object[] params ){ try { connection.Collection<org. Specified by: Method getId in interface IClient Get the unique ID for this client.?server Specified by: Method getCreationTime in interface IClient Get the creation time for this client object.lang. getId() public String getId(). 6. } } Parameters return client id Description copied from interface: getId 6. Parameters return IFlowControllable instance 6.connect( "http://localhost/killerapp/".api.red5. Parameters return Creation time in milliseconds Description copied from interface: getCreationTime 6.IConnection.getClient().error("{}".lang. getParentBWControllable() public org.Package org. then at server side: public boolean appConnect( IConnection connection.IConnection conn).setStreamId( params[0] ). that contains 2nd all the rest values you pass to NetConnection. In case of base Client class parent is host. java.String> getPermissions(org.util.server.api.IScope> getScopes(). This will be generated by the server if not passed upon connection from client-side Flex/Flash app. Specified by: Method getPermissions in interface IClient Return the permissions in a given context.util.17.server.server.18. parent object that is used to determine client broadcast bandwidth settings. Parent flow controllable object. } catch(Exception e){ log.red5. getPermissions(IConnection) public java. "user123" ).?red5. that is. To assign a custom ID to the client use params object of appConnect(org.red5.Object[]) method.IBWControllable getParentBWControllable().server. e).api. Example: At client side: NetConnection. getScopes() public java. 261 .connect method.16.15.api.

6.server.23. setBandwidthConfigure(IBandwidthConfigure) public void setBandwidthConfigure(org. String permissionName).?server Specified by: Method getScopes in interface IClient Get a set of scopes the client is connected to.lang.api. if overriding equals then also do hashCode Parameters return 6. String) public boolean hasPermission(org. Used by JMX Parameters return list of scope attributes 6.20.red5.Package org. Specified by: Method hasPermission in interface IClient Check if the client has a permission in the given context.String> iterateScopeNameList().server. hasPermission(IConnection.?red5.IConnection conn).19. Parameters return Set of scopes Description copied from interface: getScopes 6. 262 .22.21. Specified by: Method iterateScopeNameList in interface ClientMBean Iterate through the scopes and their attributes. Associate connection with client Parameters conn Connection object 6.api.IBandwidthConfigure config).red5. iterateScopeNameList() public java.IConnection conn. hashCode() public int hashCode().List<java.util.red5.server.api. register(IConnection) protected void register(org.

ensureCapacity .Collection<java.red5. java.Package org.?red5. toArray .AbstractList: equals . java. 6. Class ClientList public class ClientList<E> extends. toString Methods inherited from java.server. clear . trimToSize Methods inherited from java. addAll . contains .red5.Object: finalize . get .?ListMBean { // Public Constructors public ClientList(). Specified by: Method setPermissions in interface IClient Set the permissions for this client in a given context. retainAll .util. org. unregister(IConnection) protected void unregister(org.util. size . set .?server.String> permissions). remove .?util.util. Collection<String>) public void setPermissions(org. indexOf . lastIndexOf . subList Methods inherited from java. } Methods inherited from java. notify .IConnection conn. removeRange . setPermissions(IConnection.server.26.?ArrayList implements. iterator . Parameters return 6. clone .AbstractCollection: containsAll . getClass . toString() public String toString(). wait 263 . isEmpty .24.?server Set new bandwidth configuration context Parameters config Bandwidth configuration context 6.api. hashCode . Removes client-connection association for given connection Parameters conn Connection object 7.lang.api.?red5. listIterator . removeAll .lang.ArrayList: add .25. notifyAll .IConnection conn).util.

8.String> iterateScopeNameList(). public org.AbstractList: modCount 8. public long getCreationTime().api.red5. 264 .red5.red5.server. org.1.Client> getClientList().?api.ClientList<org. // Public Methods public Client getClient(String id) throws ClientNotFoundException.?red5. public java. public ClientRegistry(String name).red5.?red5.server.Package org.lang.IClient newClient(Object[] params) throws ClientNotFoundException. } 9. Synopsis public class ClientRegistryimplements.?server.api. public org.1.util.Set<org.util. Interface ClientMBean MBean for Client. 9.?red5.IConnection> getConnections(). ClientRejectedException. public org.server.server. public String getId().?Cl // Public Constructors public ClientRegistry(). Synopsis public interface ClientMBean { // Public Methods public void disconnect().?server. Associates client with it's id so it's possible to get client by id from whenever we need.server. Class ClientRegistry Registry for clients. org.red5.?IClientRegistry.util.?server Fields inherited from java.IClient lookupClient(String id) throws ClientNotFoundException. public java. public boolean hasClient(String id).api.List<java.

red5. getClass . getClientList() public org.server.red5. // Protected Methods protected void addClient(org. protected java.server.IClient client). finalize .server.red5.Collection<org.api.red5.server. addClient(IClient) protected void addClient(org. 9. public String previousId(). } Methods inherited from java. wait 9.api. protected void removeClient(org.4. Specified by: Method hasClient in interface IClientRegistry 265 .?red5.IClient client).server.util. hashCode .Client> getClientList().5.red5. getClients() protected java. hasClient(String) public boolean hasClient(String id). Specified by: Method getClientList in interface ClientRegistryMBean Returns a list of Clients.api. Return collection of clients Parameters return Collection of clients 9.Object: clone .Package org.red5.util. notify .server.api. notifyAll .2.lang.IClient client). toString . Add client to registry Parameters client Client to add 9.3.ClientList<org.red5.Collection<org.server.?server public String nextId().IClient> getClients().api.IClient> getClients(). protected boolean hasClients(). equals .

red5. lookupClient(String) public org. false otherwise 9.?server Check whether registry has client with given id Parameters id return Client id true if client with given id was register with this registry.7.server.red5.6.IClient newClient(Object[] params) throws ClientNotFoundException. otherwise False 9. hasClients() protected boolean hasClients().8. newClient(Object[]) public org. Check if client registry contains clients. ClientRejectedException.api. Parameters return True if clients exist. Specified by: Method newClient in interface IClientRegistry Return client from next id with given params Parameters params return Client params Client object ClientNotFoundException Client not found 266 .api. Specified by: Method lookupClient in interface IClientRegistry Return client by id Parameters id return Client id Client object associated with given id ClientNotFoundException Client not found 9.?red5.server.Package org.IClient lookupClient(String id) throws ClientNotFoundException.

public boolean hasClient(String id).util. previousId() public String previousId(). Specified by: Method previousId in interface ClientRegistryMBean Return previous client id Parameters return Previous client id 9.?server ClientRejectedException The client is not allowed to connect.red5. Interface ClientRegistryMBean An MBean interface for the client registry.red5.Client> getClientList().10.server. 9. 267 . removeClient(IClient) protected void removeClient(org.1.server.11. Specified by: Method nextId in interface ClientRegistryMBean Return next client id Parameters return Next client id 9.IClient client).Package org.?red5. Synopsis public interface ClientRegistryMBean { // Public Methods public Client getClient(String id) throws ClientNotFoundException.api.9. public java. 10. Removes client from registry Parameters client Client to remove 10.List<org. nextId() public String nextId(). public String nextId().

core.?IContext.springframework.?springframework.api. Synopsis public class Contextimplements.core.Logger logger . org.Package org.IScopeResolver getScopeResolver().?api.server.api.io.IServiceInvoker getServiceInvoker().red5.?server.io. } 11.red5.red5. String contextPath).springframework.server.ApplicationContext getApplicationContext(). public Object getCoreService(String beanId). public org.?red5.?Appl // Public Static Fields public static org. public org.server.IScopeHandler lookupScopeHandler(String contextPath).IMappingStrategy getMappingStrategy().api. public Object lookupService(String serviceName).api.server.?server public String previousId(). public org.context.red5.Resource[] getResources(String pattern) throws IOException. // Public Constructors public Context(). public org.api.persistence.context. public org.Resource getResource(String path). 11.server.api.springframework. org.1.server. public Context(org. public org.api. // Public Methods public org.service. public org.ApplicationContext context. 268 . public Object getBean(String beanId).IPersistenceStore getPersistanceStore().IGlobalScope getGlobalScope().IClientRegistry getClientRegistry().server.red5.red5. Class Context This is basic context implementation used by Red5.slf4j.springframework.IScope getScope().red5. public org. public org.?red5.server.api.red5. public org. public ClassLoader getClassLoader().?context.

ApplicationContext context.server.red5. getClass . public void setPersistanceStore(org.api.red5.core bean factory from red5.?server public org.ApplicationContext context).red5.red5.api.IScope resolveScope(String path).IMappingStrategy mappingStrategy).red5. public org. toString . Context(ApplicationContext.BeanFactory core). String) public Context(org.4. Specified by: Method getApplicationContext in interface IContext 269 .server.beans. Context() public Context().api.context. public void setContextPath(String contextPath).Package org. hashCode .IScope root.springframework. public void setMappingStrategy(org. public void setCoreBeanFactory(org.IScopeResolver scopeResolver).lang. notify .IPersistenceStore persistanceStore public void setScopeResolver(org.springframework.api.context. } Methods inherited from java.IScope resolveScope(String host.api.red5. notifyAll .api.context. public org. Initializes core context bean factory using red5. String path).api.Object: clone . public void setClientRegistry(org.springframework. equals .server.red5.2.server.server. String path). getApplicationContext() public org. wait 11.IClientRegistry clientRegistry). public void setServiceInvoker(org.xml context 11. Initializes app context and context path from given parameters Parameters context contextPath Application context Context path 11.red5.server.?red5.api.service. public void setApplicationContext(org.factory.server.IServiceInvoker serviceInvoker). String contextPath).server.ApplicationContext getApplicationContext().3.red5.api.persistence. finalize .server.springframework.IScope resolveScope(org.

red5. getBean(String) public Object getBean(String beanId).springframework. Specified by: Method getBean in interface IContext Return bean instantiated by bean factory Parameters beanId return Bean name Instantiated bean See Also org.server. getClassLoader() public ClassLoader getClassLoader().factory.8.Package org.?red5. getCoreService(String) public Object getCoreService(String beanId).beans. Specified by: Method getCoreService in interface IContext Return core Red5 service instantiated by core context bean factory Parameters 270 . Specified by: Method getClientRegistry in interface IContext Return client registry Parameters return Client registry 11.IClientRegistry getClientRegistry().6. getClientRegistry() public org.BeanFactory 11.7.?server Return application context Parameters return App context 11. Return current thread's context classloader Parameters return Classloder context of current thread 11.api.5.

Specified by: Method getMappingStrategy in interface IContext Return mapping strategy used by this context.IMappingStrategy getMappingStrategy(). Specified by: Method getGlobalScope in interface IContext Return global scope Parameters return Global scope 11. etc) for all named objects in context.server.red5.springframework. getGlobalScope() public org.red5.red5.IPersistenceStore getPersistanceStore(). getPersistanceStore() public org.server.beans.api.?red5.core.io. postfixes. getMappingStrategy() public org.springframework. Mapping strategy define naming rules (prefixes. Specified by: Method getPersistanceStore in interface IContext Return persistence store Parameters return Persistence store 11.IGlobalScope getGlobalScope().api. getResource(String) public org.Resource getResource(String path).factory.?server beanId return Bean name Core Red5 service instantiated See Also org.12.11. Specified by: Method getResource in interface ContextMBean Return resouce by path Parameters 271 .persistence.server.api.10.9.BeanFactory 11.Package org. Parameters return Mapping strategy 11. default application name.

IScope getScope().server.14.springframework.IScopeResolver getScopeResolver().red5.io.16.red5.?red5.service. getResources(String) public org.server. Specified by: Method getResources in interface ContextMBean Return array or resournce that match given pattern Parameters pattern return IOException Pattern to check against Array of Resource objects On I/O exception See Also org.core.Resource 11.springframework. getScopeResolver() public org.Resource 11.IServiceInvoker getServiceInvoker(). Specified by: Method getScope in interface ContextMBean Return scope Parameters return null 11.api.server.api.io. Return scope resolver Parameters return scope resolver 11. getServiceInvoker() public org.red5.io.core.api.Resource[] getResources(String pattern) throws IOException. Specified by: Method getServiceInvoker in interface IContext 272 .15.?server path return Resource path Resource See Also org. getScope() public org.core.13.springframework.Package org.

lookupScopeHandler(String) public org. Specified by: Method resolveScope in interface IContext Resolves scope from given root using scope resolver. Parameters root Scope to start from.?server Return service invoker Parameters return Service invoker 11.18.server.19. 273 . String) public org. Specified by: Method lookupScopeHandler in interface IContext Look up scope handler for context path Parameters contextPath return Context path Scope handler ScopeHandlerNotFoundException If there's no handler for given context path 11.api.IScopeHandler lookupScopeHandler(String contextPath).IScope resolveScope(org.server.Package org.?red5. Specified by: Method lookupService in interface IContext Look up service by name Parameters serviceName return Service name Service object ServiceNotFoundException When service found but null NoSuchBeanDefinitionException When bean with given name doesn't exist 11. String path).17. lookupService(String) public Object lookupService(String serviceName).IScope root.red5.api. resolveScope(IScope.api.red5.server.red5.

String) public org.red5. 11.server. org.red5.server.server. Specified by: Method setApplicationContext in interface ApplicationContextAware Setter for application context Parameters context App context 11. resolveScope(String.api.api.ApplicationContext context).IScope resolveScope(String host.IScope resolveScope(String path).23.?red5. Setter for client registry 274 .22.red5. Scope resolution result. Specified by: Method resolveScope in interface IContext Resolves scope using scope resolver collaborator Parameters path return Path to resolve Scope resolution result 11.context.server.Scope 11.?server path return Path to resolve.api. setClientRegistry(IClientRegistry) public void setClientRegistry(org.red5.api. setApplicationContext(ApplicationContext) public void setApplicationContext(org. Specified by: Method resolveScope in interface ContextMBean Resolve scope from host and path Parameters host path return See Also org.springframework. resolveScope(String) public org.server.21.IScope Host Path Scope . String path).Package org.20.IClientRegistry clientRegistry).red5.

Setter for scope resolver Parameters scopeResolver Scope resolver used to resolve scopes 11. Adds slash at the end of path if there's no one Parameters contextPath Context path 11. setScopeResolver(IScopeResolver) public void setScopeResolver(org.IServiceInvoker serviceInvoker).Package org.red5.server. setServiceInvoker(IServiceInvoker) public void setServiceInvoker(org.IScopeResolver scopeResolver). setMappingStrategy(IMappingStrategy) public void setMappingStrategy(org.api.?server Parameters clientRegistry Client registry 11. Specified by: Method setContextPath in interface ContextMBean Setter for context path. setPersistanceStore(IPersistenceStore) public void setPersistanceStore(org.red5.24. Setter for service invoker Parameters 275 . Setter for mapping stategy Parameters mappingStrategy Mapping strategy 11.server.red5.api. setContextPath(String) public void setContextPath(String contextPath).persistence.api.25.IMappingStrategy mappingStrategy).?red5.server.api.28.27.26.red5. Setter for persistence store Parameters persistanceStore Persistence store 11.IPersistenceStore persistanceStore).server.service.

context. Class ContextLoader Red5 applications loader 12. equals .context. public void unloadContext(String name).springframework.ApplicationContext parentContext).context.springframework. org.springframework.ApplicationContext applicationContex throws BeansException. Synopsis public class ContextLoaderimplements. protected org. } Methods inherited from java. // Public Constructors public ContextLoader(). protected static org.?ApplicationContextAware. notify .springframework.?re // Protected Fields protected org.ApplicationContext applicationContext . public void uninit(). public void setContextsConfig(String contextsConfig).context.?context.lang. notifyAll . wait 276 . getClass .Logger log . public void init() throws Exception.slf4j. public void loadContext(String name.context.?springframework. String config). org.Applica protected String contextsConfig .ApplicationContext parentContext . finalize . org. toString .concurrent.1. // Public Methods public org.?server serviceInvoker Service invoker object 12.?red5. hashCode . protected java.Object: clone .ApplicationContext getContext(String name).lang.springframework.springframework.context.context. public String getContextsConfig().String.springframework.Package org.ConcurrentMap<java.ApplicationContext getParentContext(). public void setApplicationContext(org. public org.util. public void setParentContext(org.

org. Logger 12.2.6.springframework.String. applicationContext protected org.slf4j.3.springframework.springframework.ApplicationContext parentContext . getParentContext() public org.Applicati Context map 12. parentContext protected org.springframework.4. Specified by: Method getParentContext in interface ContextLoaderMBean Return parent context Parameters 277 .ApplicationContext getParentContext().5.8.ConcurrentMap<java. contextMap protected java.context. Specified by: Method getContext in interface ContextLoaderMBean Return context by name Parameters name return Context name Application context for given name 12. Context location files 12.concurrent.ApplicationContext getContext(String name).?red5.util.context.7.ApplicationContext applicationContext .?server 12. Spring Application context 12.Logger log . contextsConfig protected String contextsConfig .context. getContext(String) public org.springframework.context.Package org. log protected static org.context.lang. Spring parent app context 12.

context.ApplicationContext applicationContext) throws BeansException.11. Specified by: Method setContextsConfig in interface ContextLoaderMBean Setter for context config name Parameters contextsConfig Context config name 278 . String config).Package org. then adds it's beans to parent (that is. casting exception and others 12. in fact.10. beans factory) 12.?red5.?server return parent application context 12. setApplicationContext(ApplicationContext) public void setApplicationContext(org. Specified by: Method init in interface ContextLoaderMBean Loads context settings from ResourceBundle (. Red5) Parameters name config Context name Filename 12. loadContext(String.9. Specified by: Method setApplicationContext in interface ApplicationContextAware Parameters applicationContext BeansException Spring application context Top level exception for app context (that is.properties file) Exception I/O exception. setContextsConfig(String) public void setContextsConfig(String contextsConfig).12. Specified by: Method loadContext in interface ContextLoaderMBean Loads a context (Red5 application) and stores it in a context map.springframework. init() public void init() throws Exception. String) public void loadContext(String name.

Synopsis public interface ContextLoaderMBean { // Public Methods public org. public void unloadContext(String name).context.?server 12. unloadContext(String) public void unloadContext(String name). String config). Red5) Parameters name Context name 13.context. Interface ContextMBean 279 .14. public org. public void uninit().context. public void loadContext(String name. Interface ContextLoaderMBean Red5 applications loader 13.springframework.springframework. setParentContext(ApplicationContext) public void setParentContext(org.1.ApplicationContext getParentContext(). public void setContextsConfig(String contextsConfig).ApplicationContext parentContext).?red5.13. Setter for parent application context Parameters parentContext Parent Spring application context 12.springframework. Specified by: Method unloadContext in interface ContextLoaderMBean Unloads a context (Red5 application) and removes it from the context map.Package org. } 14. public void init() throws Exception. public String getContextsConfig().ApplicationContext getContext(String name). then removes it's beans from the parent (that is.

api.red5.server. public org.red5.red5. public void setContextPath(String contextPath).?CoreHan // Protected Fields 280 .?server.?IScopeHandler.api. } 15.springframework.IScope root. public org.?red5. public org.server.api.red5.?api. String path). public org.api.server.Resource getResource(String path). public Object getBean(String beanId).server. 14.springframework.service.red5.server.server.io.server.IServiceInvoker getServiceInvoker().springframework.io.api. org.api.Resource[] getResources(String pattern) throws IOException. Synopsis public class CoreHandlerimplements.red5. Class CoreHandler Base IScopeHandler implementation 15.IScope resolveScope(org.IMappingStrategy getMappingStrategy(). public org.red5.?red5.api.red5.core.persistence. public org.server. public org.server.server. public org.IScope resolveScope(String host. public Object getCoreService(String beanId).IScope resolveScope(String path). org.api.Package org.api.ApplicationContext getApplicationContext(). public Object lookupService(String serviceName).api. public org.?server This is basic context implementation used by Red5.1.IScope getScope(). String path).core.server.IScope getGlobalScope().api. public org.IClientRegistry getClientRegistry().1.context.red5.IPersistenceStore getPersistanceStore(). public org.red5.?server. public org.?red5.IScopeHandler lookupScopeHandler(String contextPath). Synopsis public interface ContextMBean { // Public Methods public org.red5.

server.2.red5.server. // Public Methods public boolean addChildScope(org.server.3.api.api.api.IScope scope).api. Specified by: Method connect in interface CoreHandlerMBean 281 . hashCode . finalize .IConnection conn.red5.api.IServiceCall call).red5. public boolean handleEvent(org.Logger log .api.red5. org. org. org. org.red5.server.api. public boolean connect(org.server. IScope) public boolean connect(org.Object: clone .api.IScope scope). notify .red5.red5.IEvent event).IScope scope).IConnection conn. org.lang.IScope scope).red5.server. org.IScope scope).server.red5.api.server.IScope scope).IConnection conn.api. public boolean start(org.server.api.red5.red5. Object[] params).red5.?server protected static org.server. toString .IScope scope).IBasicScope scope).api.server.api. equals . connect(IConnection.IClient client.server.slf4j. public boolean join(org.event.api.?red5.Package org. public void leave(org.IClient client.api.red5. 15.red5. public void disconnect(org.server.IConnection conn. // Public Constructors public CoreHandler().red5.IBasicScope scope).red5.red5.server.server.red5. public void removeChildScope(org.api.api.api.red5.server.service.red5.server. addChildScope(IBasicScope) public boolean addChildScope(org. getClass .server.IBasicScope scope). public void stop(org. public boolean connect(org. org.api.server. } Methods inherited from java. public boolean serviceCall(org.IScope scope.api. wait 15. notifyAll .IConnection conn. Specified by: Method addChildScope in interface IScopeHandler Called just before a child scope is added.server.

connect(IConnection. Specified by: Method join in interface IScopeHandler Called just before a client enters the scope.event.server.?red5.7.api. IScope) public void leave(org.server.IClient client.red5. Object[]) public boolean connect(org.?server Connects client to the scope Parameters conn scope return Client conneciton Scope true if client was registred within scope.api. 282 .api.5. org. Object[] params).server.api.api. IScope) public void disconnect(org.red5. join(IClient.server.IScope scope. IScope) public boolean join(org.Package org.IConnection conn.api. org. 15.server.red5. Specified by: Method disconnect in interface IScopeHandler Called just after the a connection is disconnected.IConnection conn.IEvent event).IScope scope). IScope. disconnect(IConnection. handleEvent(IEvent) public boolean handleEvent(org. leave(IClient.red5.IClient client.server.api. 15. false otherwise 15.8. Specified by: Method handleEvent in interface CoreHandlerMBean 15. org.red5. false otherwise 15.red5.server.red5.4.6. Specified by: Method connect in interface IScopeHandler Connects client to the scope Parameters conn scope params return Client conneciton Scope Params passed from client side with connect call true if client was registred within scope.IScope scope).server.red5.api.

stop(IScope) public void stop(org. IServiceCall) public boolean serviceCall(org. 15. serviceCall(IConnection. 16.api.api.server.server. org.1.11.IServiceCall call).red5.10. Specified by: Method leave in interface IScopeHandler Called just after the client leaves the scope. Specified by: Method start in interface IScopeHandler Called when a scope is created for the first time.api.IScope scope). removeChildScope(IBasicScope) public void removeChildScope(org.IBasicScope scope).red5. Specified by: Method serviceCall in interface IScopeHandler Remote method invokation Parameters conn call return Connection to invoke method on Service call context true on success 15.red5.server. 15.red5.?server org. Specified by: Method removeChildScope in interface IScopeHandler Called just after a child scope has been removed. Interface CoreHandlerMBean Base IScopeHandler implementation 16. Synopsis public interface CoreHandlerMBean { 283 . Specified by: Method stop in interface IScopeHandler Called just before a scope is disposed.12.service.red5. 15.server. start(IScope) public boolean start(org.api.api.IScope scope).Package org.9.server.?red5.red5.api.IScope scope).server.IConnection conn.

IScope scope).api.IScope scope). public void disconnect(org. public void stop(org.server.api.IEvent event). Class DebugPooledByteBufferAllocator A org.IBasicScope scope).IConnection conn. 17. public boolean connect(org. protected boolean saveStacks .?ByteBufferAllocator // Protected Fields protected static ThreadLocal local .slf4j.api.api.1. 284 .server.api.red5. public boolean join(org. 16. Synopsis public class DebugPooledByteBufferAllocatorimplements.api. The default timeout is 1 minute (60 seconds). public boolean handleEvent(org. org.server. 64.server.api.?apache.IScope scope).red5.server. To release these buffers periodically.api.event.api.common.server.Logger log .red5.red5. This allocator releases the buffers which have not been in use for a certain period.server.server.api.red5.?red5. public boolean start(org.ByteBufferAllocator which pools allocated buffers. } 17.IScope scope.IServiceCall call).red5.red5.?common..service. org.red5.server. org.apache.IClient client. All buffers are allocated with the size of power of 2 (e.IScope scope).api.red5. You can stop the thread by calling dispose() . public void removeChildScope(org.?server // Public Methods public boolean connect(org.red5. protected static org.red5.?mina. .red5. org.IScope scope).server.red5.mina. org. org.api.api. org.Package org.red5.red5.api.server.IClient client.server.IScope scope).red5.server.. 32. a daemon thread is started when a new instance of the allocator is created.IConnection conn.server.api.api. You can adjust the period by calling setTimeout(int) .server. Object[] params).g. public void leave(org.server.IConnection conn.) This means that you cannot simply assume that the actual capacity of the buffer and the capacity you requested are same. public boolean serviceCall(org.IConnection conn.

red5.Object: clone . public void dispose().3. DebugPooledByteBufferAllocator() public DebugPooledByteBufferAllocator(). Parameters 285 . Creates a new instance with the default timeout.apache.Package org. public int getTimeout().?red5. public void setTimeout(int timeout). public long getTimeoutMillis(). DebugPooledByteBufferAllocator(boolean) public DebugPooledByteBufferAllocator(boolean saveStacks).mina. notify . boolean direct). public DebugPooledByteBufferAllocator(int timeout).mina. public org. 17.util. public void printStacks(). finalize .common. boolean saveStacks).server. wait 17.ByteBuffer nioBuffer).nio.ByteBuffer wrap(java. equals .UnexpandableByteBuffer. public static void setCodeSection(String section). // Public Constructors public DebugPooledByteBufferAllocator().lang.apache. // Public Methods public org.common. getClass . public DebugPooledByteBufferAllocator(boolean saveStacks). // Public Static Methods public static String getCodeSection(). toString .?server protected java.DebugPooledByteBufferAllocator.HashMap<org. public DebugPooledByteBufferAllocator(int timeout. hashCode . public void resetStacks(). notifyAll . } Methods inherited from java.2.ByteBuffer allocate(int capacity.

boolean direct). allocate(int. Parameters timeout saveStacks 17.10.4. saveStacks protected boolean saveStacks .6.common.ByteBuffer allocate(int capacity. DebugPooledByteBufferAllocator(int) public DebugPooledByteBufferAllocator(int timeout). 17.8.HashMap<org. log protected static org.DebugPooledByteBufferAllocator.UnexpandableByteBuffer. local protected static ThreadLocal local . j Contains stack traces where buffers were allocated.Logger log .slf4j.?red5. 17.mina. boolean saveStacks).7.9.apache. DebugPooledByteBufferAllocator(int. boolean) public org. Specified by: Method allocate in interface ByteBufferAllocator Parameters 286 .red5. Logger 17. Parameters timeout 17.Package org.util. Save a stack trace for every buffer allocated? Warning: This slows down the Red5 a lot! 17.5. Creates a new instance with the specified timeout.?server saveStacks 17. stacks protected java.server. boolean) public DebugPooledByteBufferAllocator(int timeout.

getCodeSection() public static String getCodeSection(). Parameters return 17.12. Returns the timeout value of this allocator in seconds. dispose() public void dispose(). Parameters return 17.14. 17. Parameters section 17. Parameters return 17.?server capacity direct return 17.?red5.Package org.15.13. getTimeoutMillis() public long getTimeoutMillis(). 287 . setCodeSection(String) public static void setCodeSection(String section). getTimeout() public int getTimeout().16.11. Specified by: Method dispose in interface ByteBufferAllocator Stops the thread which releases unused buffers and make this allocator unusable from now on. Returns the timeout value of this allocator in milliseconds. setTimeout(int) public void setTimeout(int timeout).

red5. public void setServer(org. destroy . dispatchEvent .mina.?server. getParent .1. getPath .ByteBuffer nioBuffer). public org.?red5. getContextPath .?red5.apache.Scope: addChildScope . // Public Constructors public GlobalScope(). Class GlobalScope Global scope is a top level scope. 18. getHandler .IServer server). getActiveSubscopes . org.api. 17. getContext .IServer server . getActiveClients .api.server. Parameters timeout 0 or negative value to disable timeout.IServer getServer(). disconnect . getBasicScope . public void setPersistenceClass(String persistenceClass) throws Exception.?server. org. 288 .Package org. getClients .?server Sets the timeout value of this allocator in seconds.IPersistenceStore getStore().server. public void register(). getActiveConnections .?red5.red5.persistence.server. Specified by: Method wrap in interface ByteBufferAllocator Parameters nioBuffer return 18.?Scope implements. getClassLoader .red5. Server instance is meant to be injected with Spring before initialization (otherwise NullPointerException is thrown).red5.?IGlobalScope { // Protected Fields protected org.?api.server.17. getMaxClients . } Methods inherited from org.api. getMaxSubscopes . getDepth . getConnections .nio.red5. Synopsis public class GlobalScope extends. getEnabled .server. getMaxConnections .common.api.ByteBuffer wrap(java. wrap(ByteBuffer) public org. getResource . getBasicScopeNames . connect . getCreationTime . // Public Methods public org. createChildScope .

getClass .api. notify . getLongAttribute . listeners . getServiceHandler . getRunning . notifyEvent . getScopeNames . hasParent . getShortAttribute . getByteAttribute . getTotalConnections . setChildLoadPath . hasChildScope . isRunning .?red5. removeAttributes . subscopeStats Fields inherited from org. setName . setAttributes .api.3. setStore Methods inherited from org.PersistableAttributeStore: lastModified . lookupConnections . setPersistent . hasHandler .PersistableAttributeStore: deserialize .?server . isEnabled . getServiceHandlerNames . parent .red5. getStore() public org. path .server.server. getScope . oName . Specified by: Method getServer in interface IGlobalScope Return the server this global scope runs in.IServer getServer(). toString . getAttribute .red5. removeChildScope . setAutoStart . store . finalize .red5.server.Scope: clientStats .api.server. notifyAll . name . getTotalClients .server. 18. getName . getAttributes . type Fields inherited from org. start .server.red5.server. stop . equals . getStringAttribute . serialize . persistenceClass Fields inherited from org. handleEvent .red5. getStatistics . getLastModified .red5.BasicScope: keepOnDisconnect . log .persistence. getStore .server.red5.red5. getMapAttribute . getTotalSubscopes . Get persistence store for scope 289 . removeEventListener Methods inherited from org. iterator .server.IScope 18. getListAttribute . setPath .red5.server. hashCode . setParent . getServer() public org. getSetAttribute .IGlobalScope .Package org.BasicScope: addEventListener . init . getDoubleAttribute . org. wait Fields inherited from org. connectionStats . setDepth . uninit .AttributeStore: filterNull . getServer . hasAttribute Methods inherited from java. modified . removeAttribute . registerServiceHandler .red5. getServiceHandlers .red5.2. hasContext . getEventListeners .lang. unregisterServiceHandler getResources Methods inherited from org. getBoolAttribute . persistent . setContext . setEnabled . isPersistent . getType . setAttribute . setPersistenceClass .Object: clone .AttributeStore: attributes See Also org.server.IPersistenceStore getStore(). getAttributeNames . getIntAttribute . setHandler .api.

5.6.1. register() public void register().4. setPersistenceClass(String) public void setPersistenceClass(String persistenceClass) throws Exception. setServer(IServer) public void setServer(org. Interface ListMBean public interface ListMBean { // Public Methods public int size(). Setter for server Parameters server Server 19. } 20.Package org.red5.?context.IServer server). Parameters persistenceClass Exception Persistent class name Exception 18. then call initialization 18. Synopsis public class LoaderBaseimplements. 20.api.?server Parameters return Persistence store 18.?red5.?springframework.?ApplicationContextAware { // Public Static Fields 290 .server. org. Class LoaderBase Base class for all J2EE application loaders. Specified by: Method register in interface IGlobalScope Register global scope in server instance.

api.context.IApplicationContext context).springframework. notify .red5. public static void setRed5ApplicationContext(String path.?red5. public static void setApplicationLoader(org. notifyAll .red5. equals .?jetty.ApplicationContext getApplicationContext(). public void setWebappFolder(String webappFolder). finalize .util.server.IApplicationLoader getApplicationLoader().IApplicationContext> red5AppCtx // Protected Fields protected static org.api.server.?red5.IApplicationLoader> loader .3.red5. public static org.server.red5.?tomcat. 291 . protected String webappFolder .red5. public static org. applicationContext protected static org.api. public void setApplicationContext(org.api.server. org.server.red5.springframework. // Public Static Methods public static org. hashCode . // Public Constructors public LoaderBase(). protected static ThreadLocal<org.ApplicationContext applicationContext .?red5.IApplicationContext getRed5ApplicationContext(String path).?TomcatLoader Methods inherited from java.IApplicationLoader loader). We store the application context so we can access it later. } Direct known subclasses: org.Package org.server.lang. getClass . org.springframework.context.server.springframework.api. 20.?server public static java.api. wait 20.red5.api. loader protected static ThreadLocal<org.Map<java.context.?JettyLoader .IApplicationLoader> loader .server.ApplicationContext applicationContext .api. public static org.lang. toString .? server.String.IApplicationContext removeRed5ApplicationContext(String path).2.context.ApplicationContext context) throws BeansException.red5. org.Object: clone .?server. // Public Methods public void removeContext(String path).

?server Loader for new applications. Getter for the application loader.springframework.IApplicationContext getRed5ApplicationContext(String path). 20.IApplicationContext> red5AppCtx .String.server.IApplicationLoader getApplicationLoader(). Folder containing the webapps. set by the different loaders.9. getApplicationContext() public static org. Parameters return Red5 application context 20. Parameters path Path 292 .api.api.6. Parameters return Application loader 20. 20.8. org. getRed5ApplicationContext(String) public static org.Map<java.5. 20. Remove context from the current host.Package org. Current Red5 application context.api.server.red5.?red5.server. Getter for application context Parameters return Application context 20. removeContext(String) public void removeContext(String path).util. red5AppCtx public static java. webappFolder protected String webappFolder .4. Getter for a Red5 application context.ApplicationContext getApplicationContext().lang.red5.7.context.red5. getApplicationLoader() public static org.

api. Setter for the application loader.12.11. setApplicationContext(ApplicationContext) public void setApplicationContext(org. Parameters context Red5 application context 20. setRed5ApplicationContext(String. org.13. Parameters context BeansException Application context Abstract superclass for all exceptions thrown in the beans package and subpackages 20.10.api. Parameters loader Application loader 20. removeRed5ApplicationContext(String) public static org.red5.14.springframework.ApplicationContext context) throws BeansException.Package org.IApplicationContext context). setApplicationLoader(IApplicationLoader) public static void setApplicationLoader(org. IApplicationContext) public static void setRed5ApplicationContext(String path.server.server. Specified by: Method setApplicationContext in interface ApplicationContextAware Setter for application context.?server 20.red5. Parameters 293 . Setter for a Red5 application context.context. setWebappFolder(String) public void setWebappFolder(String webappFolder). Set the folder containing webapps.?red5. Remover for a Red5 application context.api.IApplicationLoader loader).server. Parameters return Red5 application context 20.IApplicationContext removeRed5ApplicationContext(String path).red5.

// Public Methods public String mapResourcePrefix(String path). '.2. Synopsis public interface LoaderMBean { // Public Methods public void init(). hashCode . public void shutdown(). Synopsis public class MappingStrategyimplements. getClass . } 22. finalize . Allows for init and shutdown.Package org. Class MappingStrategy Basic mapping strategy implementation. equals .?IMappingStrategy { // Public Constructors public MappingStrategy(). '.lang.?red5.handler' for handlers naming and 'default' string as default application name.?api.service' postfix for services naming. toString .1.Object: clone . 22. 294 . notify . public String mapScopeHandlerName(String path).?server. } Methods inherited from java. This one uses slash as filesystem path separator. Interface LoaderMBean Simple mbean interface for J2EE container loaders.?red5. wait 22. public void setDefaultApp(String defaultApp). public String mapServiceName(String name). public void removeContext(String path). org.1. mapResourcePrefix(String) public String mapResourcePrefix(String path). notifyAll .?server webappFolder 21. 21.

Default application used as root when path is specified Parameters path return Path Resource prefix according to this naming strategy 22.?red5. Specified by: Method mapServiceName in interface IMappingStrategy Resolves service filename name from name Parameters name return Service name Service filename according to this naming strategy 22. Setter for default application name ('default' by default).3. Specified by: Method mapScopeHandlerName in interface IMappingStrategy Resolves scope handler name for path& Default application used as root when path is specified Parameters path return Path Scope handler name according to this naming strategy 22. setDefaultApp(String) public void setDefaultApp(String defaultApp).5. mapScopeHandlerName(String) public String mapScopeHandlerName(String path).?server Specified by: Method mapResourcePrefix in interface IMappingStrategy Resolves resource prefix from path.Package org.4. mapServiceName(String) public String mapServiceName(String name). Parameters defaultApp Default application 23. Class PersistableAttributeStore Persistable attributes store. Server-side SharedObjects feature based on this class. 295 .

?AttributeStore implements. String name.object. protected boolean persistent .util.server.String.?red5.?server 23. public long getLastModified(). public String getType(). public void removeAttributes(). Synopsis public class PersistableAttributeStore extends. Object value). public boolean isPersistent(). org.Map<java.red5. public void serialize(org.api. public void setAttributes(java. public String getName().lang. 296 .?server. public org. public boolean setAttribute(String name. String path. protected String path . Object defaultValue).?IPersistable { // Protected Fields protected long lastModified .?server. // Public Methods public void deserialize(org.Object> values).Package org. org.?red5.red5. public boolean removeAttribute(String name).lang. protected org.red5. public void setAttributes(org.object.IPersistenceStore getStore(). protected String type .IPersistenceStore store .server. boolean persistent).Output output) throws IOException.persistence.?red5. // Public Constructors public PersistableAttributeStore(String type.red5.server.IAttributeStore values).Input input) throws IOException.?api. protected String name .io.1.red5.io.api.persistence. public String getPath().?persistence. public Object getAttribute(String name.api. java.

Last modified Timestamp 23. public void setPersistent(boolean persistent). } Direct known subclasses: org. getSetAttribute .Package org. String. lastModified protected long lastModified . getAttribute . getLongAttribute . notifyAll .server.AttributeStore: attributes 23.IPersistenceStore store). getAttributes . equals . getStringAttribute . PersistableAttributeStore(String. wait Fields inherited from org. hasAttribute . removeAttributes . hashCode . public void setStore(org.?server public void setName(String name). getDoubleAttribute .server. getClass . notify .3. boolean) public PersistableAttributeStore(String type. boolean persistent).persistence.red5.server. name 297 .?BasicScope Methods inherited from org. Creates persistable attribute store Parameters type name path persistent Attribute store type Attribute store name Attribute store path Whether store is persistent or not 23.AttributeStore: filterNull .red5.api.2. String name. // Protected Methods protected void modified(). toString .Object: clone . setAttribute .red5. finalize . removeAttribute .?red5. getMapAttribute . getIntAttribute . String path.?server. getByteAttribute . getBoolAttribute . getListAttribute . String.lang. getAttributeNames .?red5. setAttributes Methods inherited from java. public void setPath(String path).4. getShortAttribute .

path protected String path . 23.8. Attribute store type 23. Store object that deals with save/load routines 23.6.persistence.7.9.Input input) throws IOException.red5. Attribute store path (on local hard drive) 23. deserialize(Input) public void deserialize(org.Package org.api. Persistence flag 23. Object) public Object getAttribute(String name.11.red5. type protected String type .10. getAttribute(String.IPersistenceStore store . getLastModified() public long getLastModified().?red5.?server protected String name .5. store protected org. 298 . persistent protected boolean persistent .server.io. Specified by: Method deserialize in interface IPersistable Deserializes data from input to attributes Parameters input IOException Input object I/O exception 23.object. Object defaultValue). Attribute store name 23.

getType() public String getType().14. Specified by: Method getName in interface IPersistable Return store name Parameters return Store name 23.?server Specified by: Method getLastModified in interface IPersistable Returns last modification time as timestamp Parameters return Timestamp of last attribute modification 23. getName() public String getName(). getPath() public String getPath(). getStore() public org.IPersistenceStore getStore().?red5.api.persistence. Specified by: Method getType in interface IPersistable Return scope type 299 .12.13. Specified by: Method getPath in interface IPersistable Ruturn scope path Parameters return Path 23.Package org.server.15. Specified by: Method getStore in interface IPersistable Return persistent store Parameters return Persistence store 23.red5.

17. false otherwise 23.18. Set last modified flag to current system time 23.16. removeAttributes() public void removeAttributes().Output output) throws IOException. modified() protected void modified(). Specified by: Method serialize in interface IPersistable Serializes byte buffer output. isPersistent() public boolean isPersistent(). storing them to attributes Parameters output Output object 300 . Removes attribute Parameters name return Attribute name true if attribute was removed.?server Parameters return Scope type 23. Removes all attributes and sets modified flag 23. serialize(Output) public void serialize(org.red5.19. removeAttribute(String) public boolean removeAttribute(String name). false otherwise 23.20.io.?red5.Package org. Specified by: Method isPersistent in interface IPersistable Check whether object is persistent or not Parameters return true if object is persistent.object.

io.server.Package org.util. false otherwise 23. Bulk set of attributes from another attributes store Parameters values Attributes store 23.IAttributeStore values).21.Map<java. Specified by: Method setName in interface IPersistable Setter for name Parameters name Name 23. Set attribute by name and return success as boolean Parameters name value return Attribute name Attribute value true if attribute was set.25. setAttribute(String.lang. Object) public boolean setAttribute(String name. 301 . setName(String) public void setName(String name). setAttributes(Map<String.24.23.Object> values).IOException 23. setAttributes(IAttributeStore) public void setAttributes(org. Object>) public void setAttributes(java.22. java.lang.?server IOException java. Object value).String. setPath(String) public void setPath(String path).red5.api.?red5. Set attributes from Map Parameters values Attributes as Map 23.

api.?api.?IScope.?server.?server Specified by: Method setPath in interface IPersistable Setter for scope path Parameters path Path 23. 24.?BasicScope implements.StatisticsCounter connectionStats .server.?red5. A statefull object shared between a group of clients connected to the same context path. room.red5.?red5.?api. The scope object is used to access resources. Specified by: Method setStore in interface IPersistable Load data from another persistent store Parameters store Persistent store 24.red5. org. shared object.Package org.persistence.StatisticsCounter clientStats .slf4j. // Protected Fields protected final org.support.26. Scopes are arranged in a hierarchical way.ObjectName oName . protected static org. place.statistics. setPersistent(boolean) public void setPersistent(boolean persistent).management.server.1. 302 . org. Synopsis public class Scope extends. org.?statistics.statistics.?red5. setStore(IPersistenceStore) public void setStore(org.27. etc.server.Logger log .red5.?server.api. The following are all names for scopes: application.?IScopeStatistics. If a client is connect to a scope then they are also connected to its parent scope.IPersistenceStore store).?server. Specified by: Method setPersistent in interface IPersistable Set for persistence Parameters persistent Persistence flag value 23. protected final org.api.?red5. so its possible for a scope to have a parent. protected javax.support. Class Scope The scope object. lobby. streams.

util.IConnection> getConnections(). public java. public String getContextPath(). public ClassLoader getClassLoader().server.api.red5.api.IConnection conn).red5.util.Package org. public java.api.String> getBasicScopeNames(String type).lang. public boolean connect(org.IClient> getClients().StatisticsCounter subscopeStats .api.red5.?red5.red5. // Public Constructors public Scope().red5.event.api.IConnection conn).api.IScopeHandler getHandler().statistics.server.server.?server protected final org. String name).api.server. public int getActiveClients(). Object[] params). public long getCreationTime(). public boolean createChildScope(String name). public void disconnect(org.api.IConnection conn. public void dispatchEvent(org. public org.server. public java.support. public int getDepth().Set<org.server.server.api.server.red5.api. public int getActiveConnections(). public boolean connect(org.server.IBasicScope scope).util.server.IContext getContext().red5.Iterator<org.red5. public org. 303 . // Public Methods public boolean addChildScope(org.server. public org. public Scope(String name).IEvent event). public int getMaxClients(). public int getActiveSubscopes().api.red5.Iterator<java.IBasicScope getBasicScope(String type. public boolean getEnabled().red5.red5. public void destroy().

public int getTotalClients(). public org. public Object getServiceHandler(String name).event.api.Package org.core. public int getMaxSubscopes().red5.api. public org.server.springframework.red5.lang. public int getTotalSubscopes().server. public java.api.red5. public org. public org.api.IBasicScope> iterator().Set<org. public boolean isEnabled().statistics. public org.IServer getServer().Iterator<java.server.?server public int getMaxConnections().IScope getScope(String name).IEvent event).api.IScopeStatistics getStatistics(). public boolean isRunning(). public java. public java. public boolean handleEvent(org.server. public boolean hasChildScope(String name). public int getTotalConnections().util. String name). public boolean hasChildScope(String type. public boolean hasParent(). public java.server.Resource[] getResources(String path) throws IOException. public void init().core. public org.io.IConnection> lookupConnections(org.red5.String> getScopeNames().io.IClien 304 . public boolean hasContext().Resource getResource(String path).api.red5.red5.springframework.?red5.Iterator<org.util.server.util.IScope getParent().lang.server. public String getPath().server.Set<java. public boolean getRunning().red5.api.api.red5.String> getServiceHandlerNames().util. public boolean hasHandler().

protected java.red5. setPath . removeAttribute . public void setPersistenceClass(String persistenceClass) throws Exception.api. public void removeChildScope(org.IScope parent). notifyEvent .red5. public void setHandler(org. public void uninit(). public void setChildLoadPath(String pattern).? WebScope Methods inherited from org. getType . org. getByteAttribute .red5.?GlobalScope . serialize .server.?red5. public void setParent(org. public void setAutoStart(boolean autoStart).server. setStore Methods inherited from org.server.IBasicScope scope).?server public void registerServiceHandler(String name.server. iterator .server. getPath . removeAttributes .Object> getServiceHandlers().util. // Protected Methods protected java. isPersistent . setPersistent . modified .AttributeStore: filterNull . public void unregisterServiceHandler(String name).red5. getName .red5.server.?red5. hasParent . getStore . setName .lang. public String toString(). getAttributeNames .api. setAttributes .Map<java.lang. public void setDepth(int depth). getBoolAttribute .api. getAttributes .IContext context).api.util. handleEvent . public void setName(String name).String. public synchronized void stop(). java.PersistableAttributeStore: deserialize .IScopeHandler handler). setAttribute . getAttribute .lang.?server. dispatchEvent .?server. public synchronized boolean start(). getParent . getDepth .BasicScope: addEventListener . public void setEnabled(boolean enabled).Map<java. getLastModified . public void setContext(org.server. removeEventListener Methods inherited from org.String. 305 . getEventListeners . Object handler).?red5.lang.red5.Object> getServiceHandlers(boolean allowCreate } Direct known subclasses: org. java.red5.Package org.

red5.6. store .api. getStringAttribute . 24. Logger 24.statistics.StatisticsCounter clientStats . notify . parent . Scope() public Scope().server. getDoubleAttribute hasAttribute Methods inherited from java.red5. Scope(String) public Scope(String name). connectionStats protected final org. oName 306 . Statistics about connections to the scope.PersistableAttributeStore: lastModified .7. listeners . path . Statistics about clients connected to the scope.2.server.slf4j. Creates scope with given name Parameters name Scope name 24.support.server. finalize . getSetAttribute .red5. getLongAttribute . 24.server.?red5. wait Fields inherited from org. log protected static org.lang. clientStats protected final org. hashCode .api.red5. type Fields inherited from org. getMapAttribute .Package org.5.BasicScope: keepOnDisconnect .?server .3. persistent .support.red5. toString .Object: clone . getListAttribute . notifyAll .server.AttributeStore: attributes 24. getIntAttribute .4.StatisticsCounter connectionStats . name . persistenceClass Fields inherited from org.statistics. Creates unnamed scope 24. equals .Logger log . getClass . getShortAttribute .

connect(IConnection) public boolean connect(org.api.ObjectName oName .server. connect(IConnection. Client associated with connection is added to scope clients set.server. Specified by: Method addChildScope in interface IScope Add child scope to this scope Parameters scope return Child scope on success (if scope has handler and it accepts child scope addition).?server protected javax.api. To successfully connect to scope it must have handler that will accept this connection with given set of parameters. Parameters conn params Connection object Parameters passed with connection 307 . addChildScope(IBasicScope) public boolean addChildScope(org.IConnection conn.IBasicScope scope).server. 24.api.8.red5.11.server. subscopeStats protected final org.red5.management.red5.StatisticsCounter subscopeStats . Object[] params). 24.9. Object[]) public boolean connect(org.support. Mbean object name.Package org.api. Statistics about subscopes.red5.statistics.?red5. false otherwise true 24. connection is registered as scope event listener. Specified by: Method connect in interface IScope Connect to scope Parameters conn return Connection object true on success. false otherwise 24.10. Specified by: Method connect in interface IScope Connect to scope with parameters.IConnection conn).

24. Specified by: Method getActiveClients in interface IScopeStatistics Return current number of clients connected to the scope.IConnection conn).server.14. false otherwise 24.15.server.?red5.red5. 24. dispatchEvent(IEvent) public void dispatchEvent(org. getActiveConnections() public int getActiveConnections(). getActiveClients() public int getActiveClients(). Specified by: Method createChildScope in interface IScope Create child scope with given name Parameters name return Child scope name true on success.api.IEvent event).?server return true on success.red5. createChildScope(String) public boolean createChildScope(String name). destroy() public void destroy().16. false otherwise 24. Specified by: Method disconnect in interface IScope Disconnect connection from scope Parameters conn Connection object 24.13. disconnect(IConnection) public void disconnect(org.event.Package org.17. Specified by: Method destroy in interface ScopeMBean Destroys scope 24.12. Specified by: Method getActiveConnections in interface IScopeStatistics 308 .api.

String name). Specified by: Method getBasicScope in interface IScope Return base scope of given type with given name Parameters type name return Scope type Scope name Basic scope object 24. 24. getActiveSubscopes() public int getActiveSubscopes().Iterator<java.api. getClassLoader() public ClassLoader getClassLoader().server.Package org.21.lang.19.18. Specified by: Method getActiveSubscopes in interface IScopeStatistics Return number of currently existing subscopes.api.String> getBasicScopeNames(String type).?red5.util.20.red5. getBasicScopeNames(String) public java. 24.22.IClient> getClients().util. 309 . Specified by: Method getBasicScopeNames in interface IScope Return basic scope names iterator Parameters type return Scope type Iterator 24.Set<org. getBasicScope(String.red5.IBasicScope getBasicScope(String type.?server Return current number of connections to the scope. Return current thread context classloader Parameters return Current thread context classloader 24.server. String) public org. getClients() public java.

Specified by: Method getDepth in interface IScopeStatistics 310 .24.server. getCreationTime() public long getCreationTime(). 24. getConnections() public java.Iterator<org.25.?server Specified by: Method getClients in interface IScope Return set of clients Parameters return Set of clients bound to scope 24. getDepth() public int getDepth(). getContext() public org. Specified by: Method getContext in interface IScope Return scope context.26.api.Package org.api.red5.23. Parameters return Scope context or parent context 24. Specified by: Method getContextPath in interface IScope Return scope context path Parameters return Scope context path 24. parent's context is returns. If scope doesn't have context.red5.?red5. Specified by: Method getConnections in interface IScope Return connection iterator Parameters return Connections iterator 24.server.util.27. getContextPath() public String getContextPath(). and so forth.IContext getContext().IConnection> getConnections().

28.Package org.?red5. Specified by: Method getMaxSubscopes in interface IScopeStatistics Return maximum number of concurrently existing subscopes. getMaxConnections() public int getMaxConnections(). getParent() public org.api.30.32. 311 . getEnabled() public boolean getEnabled(). Specified by: Method getMaxClients in interface IScopeStatistics Return maximum number of clients concurrently connected to the scope.api. 24. 24. getMaxClients() public int getMaxClients().server. Specified by: Method getMaxConnections in interface IScopeStatistics Return maximum number of concurrent connections to the scope.29.red5. getMaxSubscopes() public int getMaxSubscopes(). 24.33. Specified by: Method getHandler in interface IScope Return scope handler or parent's scope handler if this scope doesn't have one Parameters return Scope handler (or parent's one) 24. getHandler() public org.red5.31. uses isEnabled() 24.IScope getParent().?server return scope depth Parameters return Scope depth 24.server. Specified by: Method getEnabled in interface ScopeMBean Here for JMX only.IScopeHandler getHandler().

Resource getResource(String path). 312 . getResource(String) public org.Package org.?server Specified by: Method getParent in interface ScopeMBean Return parent scope Parameters return Parent scope 24.36.34.Resource[] getResources(String path) throws IOException.springframework. getRunning() public boolean getRunning().35.io. getPath() public String getPath().io.springframework. Specified by: Method getResources in interface ScopeMBean Return array of resources from path string.?red5. getResources(String) public org. usually used with pattern path Parameters path return IOException Resources path Resources I/O exception 24. Specified by: Method getResource in interface ScopeMBean Return resource located at given path Parameters path return Resource path Resource 24.core. Specified by: Method getPath in interface IScopeStatistics Return scope path calculated from parent path and parent scope name Parameters return Scope path 24.37.core.

red5.lang.40.api.Package org.39. Specified by: Method getScope in interface IScope Return child scope by name Parameters name return Scope name Child scope with given name 24. Return the server instance connected to this scope.38. getServiceHandler(String) public Object getServiceHandler(String name). getScope(String) public org.server.?red5. uses isEnabled() 24. Specified by: Method getServiceHandler in interface ScopeMBean Return service handler by name Parameters name Handler name 313 .IServer getServer().41. Specified by: Method getScopeNames in interface IScope Return child scope names iterator Parameters return Child scope names iterator 24.server. Parameters return the server instance 24. getServer() public org.api.IScope getScope(String name).red5.util.Iterator<java.String> getScopeNames().?server Specified by: Method getRunning in interface ScopeMBean Here for JMX only. getScopeNames() public java.

util.Map<java.44.?red5. Parameters return Set of service handler names 24.?server return Service handler with given name 24.Set<java.lang.Object> getServiceHandlers(). Parameters allowCreate return Should the map be created if it doesn't exist? Map of service handlers 24.util.String.lang.server.red5. 24.45. Specified by: Method getServiceHandlerNames in interface ScopeMBean Return set of service handler names. java. 314 . getStatistics() public org. Specified by: Method getTotalClients in interface IScopeStatistics Return total number of clients connected to the scope. getServiceHandlers(boolean) protected java.lang.43.String.String> getServiceHandlerNames(). Removing entries from the set unregisters the corresponding service handler.46.Package org. The map is created if it doesn't exist yet. Specified by: Method getStatistics in interface IScope Return statistics informations about the scope.util. Return map of service handlers. Parameters return Map of service handlers 24.statistics.42.Object> getServiceHandlers(boolean allowCreate). getTotalClients() public int getTotalClients(). java.lang.Map<java.lang. getServiceHandlerNames() public java.IScopeStatistics getStatistics(). getServiceHandlers() protected java. Return map of service handlers and optionally created it if it doesn't exist.api.

hasChildScope(String. String name).51. String) public boolean hasChildScope(String type.red5. Specified by: Method hasChildScope in interface IScope Check whether scope has child scope with given name and type Parameters type Child scope type 315 . handleEvent(IEvent) public boolean handleEvent(org.Package org. Handles event. Specified by: Method getTotalSubscopes in interface IScopeStatistics Return total number of subscopes created. hasChildScope(String) public boolean hasChildScope(String name). To be implemented in subclasses. 24.48.event. false otherwise 24.47.server.?server 24.IEvent event).api.50. Specified by: Method getTotalConnections in interface IScopeStatistics Return total number of connections to the scope. Specified by: Method hasChildScope in interface IScope Check whether scope has child scope with given name Parameters name return Child scope name true if scope has child node with given name. 24. getTotalConnections() public int getTotalConnections().49. false otherwise 24. Parameters event return Event to handle true on success.?red5. getTotalSubscopes() public int getTotalSubscopes().

false otherwise` 24.54.52. Specified by: Method hasParent in interface ScopeMBean Check if scope has parent scope Parameters return true if scope has parent scope. hasParent() public boolean hasParent(). false otherwise 24. start if autostart is set to true 24.55. 316 .Package org. false otherwise true 24. Specified by: Method hasContext in interface ScopeMBean Check if scope has a context Parameters return true if scope has context. Specified by: Method hasHandler in interface IScope Check if scope or it's parent has handler Parameters return true if scope or it's parent scope has a handler. false otherwise 24. hasContext() public boolean hasContext(). hasHandler() public boolean hasHandler().?server name return Child scope name if scope has child node with given name and type. init() public void init().53. isEnabled() public boolean isEnabled(). Specified by: Method init in interface ScopeMBean Initialization actions.?red5.56.

server. registerServiceHandler(String. false otherwise 24. isRunning() public boolean isRunning().Set<org.IBasicScope> iterator().api. Specified by: Method registerServiceHandler in interface ScopeMBean Register service handler by name Parameters name Service handler name 317 . iterator() public java.58.red5.?red5.api.api. Object handler).59.60.red5. Check if scope is in running state Parameters return true if scope is in running state.?server Check if scope is enabled Parameters return true if scope is enabled.Package org.57.IClient Specified by: Method lookupConnections in interface IScope Looks up connections for client Parameters client return Client Connection 24.IConnection> lookupConnections(org.server.util.Iterator<org.util. lookupConnections(IClient) public java. Child scopes iterator Parameters return Child scopes iterator 24.red5.server. false otherwise 24. Object) public void registerServiceHandler(String name.

Specified by: Method setChildLoadPath in interface ScopeMBean Setter for child load path. setContext(IContext) public void setContext(org. Setter for context Parameters context Context object 24. Specified by: Method removeChildScope in interface IScope Removes child scope Parameters scope Child scope to remove 24. Should be implemented in subclasses? Parameters pattern Load path pattern 24.api. setDepth(int) public void setDepth(int depth).63.api.IContext context).61.?server handler Service handler 24.Package org.red5.64.?red5.IBasicScope scope).62.red5.server. setAutoStart(boolean) public void setAutoStart(boolean autoStart). removeChildScope(IBasicScope) public void removeChildScope(org. 318 .server. setChildLoadPath(String) public void setChildLoadPath(String pattern).65. Specified by: Method setAutoStart in interface ScopeMBean Setter for autostart flag Parameters autoStart Autostart flag value 24.

67.server. setHandler(IScopeHandler) public void setHandler(org. Setter for parent scope Parameters parent Parent scope 319 . setEnabled(boolean) public void setEnabled(boolean enabled).66.IScope parent). setParent(IScope) public void setParent(org. setName(String) public void setName(String name).69. Specified by: Method setName in interface ScopeMBean Setter for scope name Parameters name Scope name 24.Package org.api. Setter for scope event handler Parameters handler Event handler 24.api. Specified by: Method setEnabled in interface ScopeMBean Enable or disable scope by setting enable flag Parameters enabled Enable flag value 24.red5.IScopeHandler handler).68.?server Specified by: Method setDepth in interface ScopeMBean Set scope depth Parameters depth Scope depth 24.server.?red5.red5.

Specified by: Method setPersistenceClass in interface ScopeMBean Set scope persistence class Parameters persistenceClass Exception Scope's persistence class Exception 24.75.73. stop() public synchronized void stop().?red5.74. toString() public String toString(). 24. Specified by: Method start in interface ScopeMBean Starts scope Parameters return true false if scope has handler and it's start method returned true. Uninitialize scope and unregister from parent. Specified by: Method stop in interface ScopeMBean Stops scope 24.?server 24. otherwise 24. Specified by: Method unregisterServiceHandler in interface ScopeMBean Unregisters service handler by name 320 .Package org. start() public synchronized boolean start().70. unregisterServiceHandler(String) public void unregisterServiceHandler(String name). setPersistenceClass(String) public void setPersistenceClass(String persistenceClass) throws Exception.71. 24. uninit() public void uninit().72.

IClient> getClients().Package org.?red5.Iterator<java.api.server.util. public int getActiveConnections().red5.red5.red5. String name).api.core.IBasicScope getBasicScope(String type.api.server. public java.lang.Resource getResource(String path).api.server.IScopeHandler getHandler(). Interface ScopeMBean An MBean interface for the scope object.api.server.util. public java. public boolean getEnabled().?server Parameters name Service handler name 25.Resource[] getResources(String path) 321 . public int getActiveClients(). 25.util.red5.IConnection> getConnections().String> getBasicScopeNames(String type).1. public java.Iterator<org. public int getMaxClients(). public org.io. public org. public String getContextPath(). public int getActiveSubscopes().red5.server. public String getPath().io.red5. public int getMaxConnections(). public int getMaxSubscopes().api. public org.springframework.Set<org.IScope getParent().springframework. public void destroy(). public org. public int getDepth().server. public org.IContext getContext(). public org.core. Synopsis public interface ScopeMBean { // Public Methods public boolean createChildScope(String name).

String> getServiceHandlerNames(). public void setEnabled(boolean enabled).?server throws IOException.red5.Iterator<java. public boolean start(). } 322 . public void setChildLoadPath(String pattern).util. public void setName(String name).IScope getScope(String name). public java. public boolean hasContext(). public void init(). public org. public boolean hasHandler(). public int getTotalClients(). public void registerServiceHandler(String name. public Object getServiceHandler(String name). public java. public void stop(). public boolean hasParent().lang.util. public boolean hasChildScope(String type. public void setPersistenceClass(String persistenceClass) throws Exception.lang. public boolean getRunning().Package org.String> getScopeNames(). String name).api. Object handler). public int getTotalSubscopes().Set<java. public boolean hasChildScope(String name). public void setAutoStart(boolean autoStart).server. public int getTotalConnections(). public void setDepth(int depth). public void unregisterServiceHandler(String name).?red5.

getActiveClients() public int getActiveClients(). Destroys scope 25. String) public org.?red5.5.server. Parameters return number of connections 25.Package org. String name). false otherwise 25. destroy() public void destroy(). getActiveConnections() public int getActiveConnections(). Parameters return number of subscopes 25. Parameters return number of clients 25.?server 25.2. Return current number of clients connected to the scope. Return number of currently existing subscopes. createChildScope(String) public boolean createChildScope(String name). getActiveSubscopes() public int getActiveSubscopes().api.6.3.7.4.IBasicScope getBasicScope(String type. Create child scope with given name Parameters name return Child scope name true on success. getBasicScope(String. Return base scope of given type with given name 323 . Return current number of connections to the scope.red5.

getContextPath() public String getContextPath(). Parameters return Scope context or parent context 25.9.Set<org.?server Parameters type name return Scope type Scope name Basic scope object 25.11. and so forth.IConnection> getConnections().server. Return scope context.red5.api.8.server. getConnections() public java. getBasicScopeNames(String) public java. Return set of clients Parameters return Set of clients bound to scope 25.IClient> getClients().api.lang.red5. 324 .IContext getContext().?red5.red5. If scope doesn't have context. getContext() public org.Iterator<org.api.String> getBasicScopeNames(String type).12.server. Return basic scope names iterator Parameters type return Scope type Iterator 25.util.Iterator<java. parent's context is returns.util. getClients() public java.Package org. Return connection iterator Parameters return Connections iterator 25.10.util.

?server Return scope context path Parameters return Scope context path 25. return scope depth Parameters return Scope depth 25.13. Parameters 325 . getMaxClients() public int getMaxClients().14.server. getEnabled() public boolean getEnabled(). Parameters return number of clients 25.Package org. false otherwise 25. getDepth() public int getDepth().IScopeHandler getHandler(). Return scope handler or parent's scope handler if this scope doesn't have one Parameters return Scope handler (or parent's one) 25. getMaxConnections() public int getMaxConnections(). Return maximum number of clients concurrently connected to the scope. Check if scope is enabled Parameters return true if scope is enabled.?red5. Return maximum number of concurrent connections to the scope.red5.17. getHandler() public org.15.api.16.

server.core. Return resource located at given path Parameters path return Resource path Resource 25.red5.20. Return maximum number of concurrently existing subscopes. Parameters return number of subscopes 25.springframework. getPath() public String getPath().core.springframework.?red5. usually used with pattern path Parameters 326 .?server return number of connections 25. getResource(String) public org. getResources(String) public org.22. getMaxSubscopes() public int getMaxSubscopes().IScope getParent().Resource[] getResources(String path) throws IOException.18.io.21.io. getParent() public org.19.Resource getResource(String path). Return array of resources from path string.Package org. Return parent scope Parameters return Parent scope 25. Return scope path calculated from parent path and parent scope name Parameters return Scope path 25.api.

util. getServiceHandlerNames() public java. Check if scope is in running state Parameters return true if scope is in running state.String> getScopeNames(). false otherwise 25. 327 .25.Iterator<java.Set<java.24.Package org.IScope getScope(String name).lang. getRunning() public boolean getRunning().27.26.lang. getServiceHandler(String) public Object getServiceHandler(String name). Return child scope by name Parameters name return Scope name Child scope with given name 25. Return child scope names iterator Parameters return Child scope names iterator 25.23.api.?server path return IOException Resources path Resources I/O exception 25.red5. Return service handler by name Parameters name return Handler name Service handler with given name 25.server.?red5.String> getServiceHandlerNames(). getScopeNames() public java. getScope(String) public org.util.

Parameters return number of connections 25.31. hasChildScope(String) public boolean hasChildScope(String name). Return total number of connections to the scope. Parameters return number of clients 25. Parameters return number of subscopes created 25.32.Package org.?server Return set of service handler names Parameters return Set of service handler names 25. Check whether scope has child scope with given name and type 328 . Check whether scope has child scope with given name Parameters name return Child scope name true if scope has child node with given name. String) public boolean hasChildScope(String type. Return total number of clients connected to the scope. hasChildScope(String. getTotalSubscopes() public int getTotalSubscopes(). Return total number of subscopes created.?red5.28.30. getTotalConnections() public int getTotalConnections(). String name). getTotalClients() public int getTotalClients().29. false otherwise 25.

Register service handler by name Parameters 329 .Package org. registerServiceHandler(String. Initialization actions. hasHandler() public boolean hasHandler(). Check if scope or it's parent has handler Parameters return true if scope or it's parent scope has a handler.35. false otherwise true 25. hasContext() public boolean hasContext().?server Parameters type name return Child scope type Child scope name if scope has child node with given name and type.?red5. Check if scope has parent scope Parameters return true if scope has parent scope. false otherwise` 25. start if autostart is set to true 25.36. false otherwise 25. Object) public void registerServiceHandler(String name. hasParent() public boolean hasParent().33. Object handler).34. Check if scope has a context Parameters return true if scope has context. init() public void init().37. false otherwise 25.

Should be implemented in subclasses? Parameters pattern Load path pattern 25.?red5.42.?server name handler Service handler name Service handler 25. Enable or disable scope by setting enable flag Parameters enabled Enable flag value 25.Package org. setAutoStart(boolean) public void setAutoStart(boolean autoStart). setDepth(int) public void setDepth(int depth). setEnabled(boolean) public void setEnabled(boolean enabled). setChildLoadPath(String) public void setChildLoadPath(String pattern). Setter for autostart flag Parameters autoStart Autostart flag value 25. Setter for scope name Parameters 330 . Setter for child load path.38.40. setName(String) public void setName(String name).39. Set scope depth Parameters depth Scope depth 25.41.

44.?red5. Class ScopeResolver Resolves scopes from path 26.Package org.1. org. Stops scope 25.46.?server. start() public boolean start().?api.43. Set scope persistence class Parameters persistenceClass Exception Scope's persistence class Exception 25. 331 . false otherwise true 25. stop() public void stop().?red5. setPersistenceClass(String) public void setPersistenceClass(String persistenceClass) throws Exception.?server name Scope name 25.45. Unregisters service handler by name Parameters name Service handler name 26. Synopsis public class ScopeResolverimplements.?IScopeResolver { // Public Static Fields public static final String DEFAULT_HOST = "". Starts scope Parameters return if scope has handler and it's start method returned true. unregisterServiceHandler(String) public void unregisterServiceHandler(String name).

red5.IGlobalScope getGlobalScope(). // Public Constructors public ScopeResolver().server.2. // Public Methods public org. public org.api. notify .server.server.?red5. notifyAll .IGlobalScope globalScope .server.api. public void setGlobalScope(org. globalScope protected org.red5.IScope resolveScope(org. toString .server.red5.red5.server.red5.server. hashCode .IScope resolveScope(String path).api.api. Default host constant 26.4. getClass .red5.api.IGlobalScope getGlobalScope().red5.Package org.api.red5.5. public org.server.IGlobalScope root). Specified by: Method getGlobalScope in interface IScopeResolver Getter for global scope Parameters return Global scope 26. DEFAULT_HOST public static final String DEFAULT_HOST = "".server.Object: clone . getGlobalScope() public org.red5.lang.IScope resolveScope(org. Global scope 26.server.?server // Protected Fields protected org.IScope root.IGlobalScope globalScope .api. } Methods inherited from java.api.api. wait 26. Specified by: Method resolveScope in interface IScopeResolver 332 . resolveScope(IScope. String) public org. finalize .red5. String path).IScope root.3. equals .api. String path).

listeners.api.?red5. Specified by: Method resolveScope in interface IScopeResolver Return scope associated with given path Parameters path return Scope path Scope object 26.?server.?server Return scope associated with given path from given root scope.util.?context.Set<org.api. 333 . resolveScope(String) public org.server. org.6. Setter for global scope Parameters root Global scope 27. 27.springframework.listeners. protected org.util.Set<org.IScope resolveScope(String path).IConnectionListener> connectionListeners . setGlobalScope(IGlobalScope) public void setGlobalScope(org.1. public java.red5.?Applic // Public Fields public java. // Protected Fields protected static final String EMPTY = "". Parameters root path return Scope to start from Scope path Scope object 26.Package org.IScopeListener> scopeListeners . org.server.IGlobalScope root).?api.red5.?red5.api. Class Server Red5 server core class implementation.?IServer.api.7.server.?springframework.ApplicationContext applicationContext .server.context.red5. Synopsis public class Serverimplements. protected static final String SLASH = "/".red5.

String contextPath.api.IGlobalScope> g protected static org.red5.api.lang. protected java. public void removeListener(org.Package org.ApplicationContext applicationContex public String toString().IScope scope).server.server.lang.Iterator<java. protected void notifyDisconnected(org.IGlobalScope scope).api.api.util.String> getMappingTable().lang. public java. public void addListener(org. String globalName). String contextPath).String.IGlobalScope lookupGlobal(String hostName.red5.?server protected java. public org. protected void notifyConnected(org.IConnectionListener listener). String contextPath). org.Iterator<org.Logger log .util.listeners. protected void notifyScopeRemoved(org.ConcurrentMap<java.red5.IConnection conn).server.lang.api. String contextPath).red5.server. java.lang. public void removeListener(org.server. protected void notifyScopeCreated(org.util.IScope scope).listeners.Map<java.api.server.context.String> mapping .red5.server.String. public void registerGlobal(org. public java. // Public Methods public void addListener(org.String. public org. public void setApplicationContext(org.util.server.?red5.server.red5.red5.api.server.IGlobalScope> getGlobalScopes().red5.api.IConnection conn). // Public Constructors public Server().red5. } 334 .slf4j.api.IScopeListener listener). // Protected Methods protected String getKey(String hostName.api.String> getGlobalNames().server.springframework.red5. public boolean addMapping(String hostName.server. public java.api.api.IScopeListener listener).listeners.concurrent.server.red5.IConnectionListener listener). public boolean removeMapping(String hostName. java.api.red5.util.IGlobalScope getGlobal(String name).listeners.ConcurrentMap<java.lang.concurrent.red5.

hashCode . Specified by: Method addListener in interface IServer Add listener to get notified about connection events.7.concurrent.lang. SLASH protected static final String SLASH = "/".server.ConcurrentMap<java.?red5. 27.api. globals protected java. applicationContext protected org.IGlobalScope> glo List of global scopes 27. getClass .String> mapping . Specified by: Method addListener in interface IServer Add listener to get notified about scope events.6.?server Methods inherited from java.ApplicationContext applicationContext . toString .String. Constant for slash 27.springframework. org.3.util. mapping protected java. Spring application context 27.lang.IConnectionListener listener).2.red5.listeners.api. wait 27.red5.Package org. notify .server.util. 335 . String) public boolean addMapping(String hostName.ConcurrentMap<java.context.lang. String.concurrent.api. java.String.8. addMapping(String. finalize .listeners.5. Mappings 27. 27. EMPTY protected static final String EMPTY = "". notifyAll .server.lang.Object: clone .red5.4. Constant for empty string 27. addListener(IConnectionListener) public void addListener(org.IScopeListener listener). equals .9. addListener(IScopeListener) public void addListener(org.

11. getGlobalNames() public java.?server String contextPath.Iterator<java. Specified by: Method addMapping in interface IServer Map key (host + / + context path) and global scope name Parameters hostName contextPath globalName return Host name Context path Global scope name true if mapping was added.10.12.String> getGlobalNames(). false if already exist 27. Specified by: Method getGlobal in interface IServer Return global scope by name Parameters name return Global scope name Global scope 27.util.IGlobalScope getGlobal(String name).server. getGlobalScopes() public java.lang.api.red5.Iterator<org.util.red5.?red5. Specified by: Method getGlobalNames in interface IServer Return global scope names set iterator Parameters return Iterator 27. String globalName).IGlobalScope> getGlobalScopes().server. Specified by: Method getGlobalScopes in interface IServer Return global scopes set iterator Parameters return Iterator 336 .Package org.api. getGlobal(String) public org.

server.15. Parameters conn the new connection 337 . Notify listeners that a new connection was established.Package org. String contextPath).IGlobalScope lookupGlobal(String hostName. String) public org. String) protected String getKey(String hostName.13. notifyConnected(IConnection) protected void notifyConnected(org.lang.lang.server.?server 27.red5.Map<java. String contextPath).red5. Return scope key. lookupGlobal(String.api.String> getMappingTable().api. java.String.?red5. Scope key consists of host name concatenated with context path by slash symbol Parameters hostName contextPath return Host name Context path Scope key as string 27. Specified by: Method lookupGlobal in interface IServer Does global scope lookup for host name and context path Parameters hostName contextPath return Host name Context path Global scope 27. getKey(String.14. Specified by: Method getMappingTable in interface IServer Return mapping Parameters return Map of "scope key / scope name" pairs 27.IConnection conn).16.util. getMappingTable() public java.

notifyScopeCreated(IScope) protected void notifyScopeCreated(org.server.listeners.?server 27. 338 .server. Notify listeners that a scope was removed.api.server.21.server.IConnection conn). Specified by: Method removeListener in interface IServer Remove listener that got notified about connection events. Parameters scope the scope that was removed 27.IScope scope). removeListener(IConnectionListener) public void removeListener(org. notifyScopeRemoved(IScope) protected void notifyScopeRemoved(org.api. removeListener(IScopeListener) public void removeListener(org.19.IConnectionListener listener). Parameters scope the scope that was created 27.red5.red5.22.api.server.red5.server.Package org.listeners.IScopeListener listener). Notify listeners about a newly created scope. Specified by: Method registerGlobal in interface IServer Register global scope Parameters scope Global scope to register 27.17. 27.IScope scope).red5.20. registerGlobal(IGlobalScope) public void registerGlobal(org.18.api. Notify listeners that a connection was disconnected.api.red5. notifyDisconnected(IConnection) protected void notifyDisconnected(org.api.IGlobalScope scope).red5.?red5. Parameters conn the disconnected connection 27.

false if key doesn't exist 27. toString() public String toString().24. setApplicationContext(ApplicationContext) public void setApplicationContext(org.?red5. String) public boolean removeMapping(String hostName. removeMapping(String. Class Shutdown Provides a means to cleanly shutdown an instance from the command line.25. 28. Synopsis public class Shutdown { // Public Constructors public Shutdown().?server Specified by: Method removeListener in interface IServer Remove listener that got notified about scope events.23. String contextPath). 27.springframework.1.context.ApplicationContext applicationContext) Specified by: Method setApplicationContext in interface ApplicationContextAware Setter for Spring application context Parameters applicationContext Application context 27.Package org. // Public Static Methods 339 . String representation of server Parameters return String representation of server 28. Specified by: Method removeMapping in interface IServer Remove mapping with given key Parameters hostName contextPath return Host name Context path true if mapping was removed.

Connects to the given RMI port (default: 9999) and invokes shutdown on the loader. finalize . equals . Parameters args The first parameter should be a port number 29. toString .Logger log .Object: clone .slf4j. toString .2. public static void raiseOriginalException(Throwable e) throws Throwable. equals . Synopsis public class Standalone { // Protected Fields protected static org. } Methods inherited from java. getClass .?red5. 340 . // Public Constructors public Standalone(). notifyAll . wait 29.2. wait 28. hashCode .lang. 29. // Public Static Methods public static void main(String[] args) throws Throwable. log protected static org. Initialize Logging. notifyAll .?server public static void main(String[] args).lang. notify .Package org. protected static String red5Config .Object: clone .1. hashCode .Logger log . getClass . } Methods inherited from java.slf4j. Class Standalone Entry point from which the server config file is loaded. notify . finalize . main(String[]) public static void main(String[] args).

?red5. main(String[]) public static void main(String[] args) throws Throwable. Re-throws exception Parameters e Throwable Exception Re-thrown exception 30. 30.slf4j.api.4. protected String contextPath .?Scope implements.?red5.?context. raiseOriginalException(Throwable) public static void raiseOriginalException(Throwable e) throws Throwable. Web scope is aware of virtual hosts configuration for Red5 application and is the first scope that instantiated after Red5 application gets started.Package org.1. Main entry point for the Red5 Server usage Java Standalone. org. Synopsis public class WebScope extends. 341 . org.xml config file Base type of all exceptions 29.IApplicationContext appContext .red5.api. protected String[] hostnames .server. Then it loads virtual hosts configuration.server. Red5 server implementation instance and ServletContext are injected as well. Jetty or JBoss. Class WebScope Web scope is special scope that is aware of servlet context and represents scope of Red5 application in servlet container (or application server) like Tomcat. Parameters args Throwable String passed in that points to a red5. protected org.?web.?server 29. adds mappings of paths to global scope that is injected thru Spring IoC context file and runs initialization process.?springframework.IApplicationLoader appLoader .red5.?server.3. protected static org.?ServletContextAware { // Protected Fields protected org.Logger log .

getClassLoader . toString . getActiveSubscopes .red5.Package org. public void setServletContext(javax. getPath . public synchronized void unregister(). isEnabled . public void setName(). protected boolean shuttingDown .api. hasParent . hasChildScope .IServer getServer().Scope: addChildScope .red5. getResources . getMaxSubscopes . getServer . createChildScope .?red5. connect . // Public Methods public org. setChildLoadPath . public void setGlobalScope(org.IServer server). getServiceHandlerNames .red5. setPersistenceClass . getParent . } Methods inherited from org. hasHandler . getCreationTime . stop . getHandler . getClients . // Public Constructors public WebScope(). getResource . hasContext . public boolean isShuttingDown(). getRunning . getTotalClients . destroy . public void setVirtualHosts(String virtualHosts). protected javax. init .IGlobalScope globalScope).IApplicationLoader getApplicationLoader(). unregisterServiceHandler 342 . setContext . setEnabled . getDepth . getActiveClients . setDepth . lookupConnections .server. removeChildScope .ServletContext servletContext).red5.red5. setParent . handleEvent . getScopeNames . getScope . uninit . disconnect . setHandler .servlet. start . getMaxConnections . dispatchEvent . setAutoStart . public void setParent(). getTotalSubscopes . getActiveConnections .servlet. getServiceHandlers . getMaxClients . public void setContextPath(String contextPath).red5.IServer server . public org.api.server.api. iterator . getBasicScopeNames . getContext . public synchronized void register(). getContextPath . getStatistics . public void setServer(org.ServletContext servletContext .api.server. setName .api. isRunning . getServiceHandler . registerServiceHandler .server. getTotalConnections . getEnabled . protected String virtualHosts .server.?server protected boolean registered . getConnections . protected org. getBasicScope .server.

IApplicationContext appContext .?red5.red5. removeAttributes . persistent . serialize .server. setPersistent . hashCode . appLoader protected org. name . oName .5. getAttribute . persistenceClass Fields inherited from org.server.AttributeStore: attributes 30. Loader for new applications. setPath . getLastModified . finalize . Context path 30.red5. notifyEvent . getName .server.AttributeStore: filterNull . setAttribute . getType .PersistableAttributeStore: deserialize . type Fields inherited from org. getIntAttribute .server. The application context this webscope is running in. appContext protected org. getAttributes .BasicScope: keepOnDisconnect .server. getMapAttribute .3. getBoolAttribute . removeEventListener Methods inherited from org. getEventListeners .server.red5. getAttributeNames . Hostnames 343 . connectionStats . path .server.server. modified .Package org.red5.api. getShortAttribute . hasAttribute Methods inherited from java.2. store . log . setAttributes .Object: clone . 30.server. getByteAttribute . wait Fields inherited from org.IApplicationLoader appLoader .red5. getClass . removeAttribute . getStore . isPersistent .red5. getDoubleAttribute . hostnames protected String[] hostnames . parent . getStringAttribute .4.red5.Scope: clientStats . getLongAttribute .?server Methods inherited from org. getListAttribute . 30. notifyAll .red5.lang. contextPath protected String contextPath .BasicScope: addEventListener . subscopeStats Fields inherited from org. listeners .PersistableAttributeStore: lastModified . equals . notify . getSetAttribute .api. setStore Methods inherited from org.red5.

server.IServer server . Logger 30. Virtual hosts list as string 30.ServletContext servletContext .11. log protected static org.9. getApplicationLoader() public org. 30.api.red5.Logger log .13. server protected org.6. Server instance 30. Servlet context 30. Return object that can be used to load new applications.IServer getServer().?red5. isShuttingDown() public boolean isShuttingDown().api.server.servlet.server. Has the web scope been registered? 30.red5.IApplicationLoader getApplicationLoader(). shuttingDown protected boolean shuttingDown .api. virtualHosts protected String virtualHosts .slf4j.14. servletContext protected javax.?server 30.Package org. Parameters return the application loader 30.10. getServer() public org. 344 .red5. Is the scope currently shutting down? 30.12.7.8. registered protected boolean registered .

server. Web scope has no name 30. register() public synchronized void register().17.api.15. setParent() public void setParent().red5. Setter for global scope.api.16. setGlobalScope(IGlobalScope) public void setGlobalScope(org. setServer(IServer) public void setServer(org. Map all vhosts to global scope then initialize 30.20. setContextPath(String) public void setContextPath(String contextPath).Package org.?server Is the scope currently shutting down? Parameters return 30.IGlobalScope globalScope).?red5. setName() public void setName().server.18.red5.19. Setter for server Parameters server Server instance 345 . 30. Parameters globalScope Red5 global scope 30. Web scope is top level. Setter for context path Parameters contextPath Context path 30.IServer server). Sets persistence class. Can't set parent to Web scope.

Creates array of hostnames.?red5.23. setVirtualHosts(String) public void setVirtualHosts(String virtualHosts).Package org.ServletContext servletContext). Parameters virtualHosts Virtual hosts list as string 30.21. Setter for virtual hosts. unregister() public synchronized void unregister().?server 30.22. 346 .servlet. setServletContext(ServletContext) public void setServletContext(javax. Uninitialize and remove all vhosts from the global scope. Specified by: Method setServletContext in interface ServletContextAware Servlet context Parameters servletContext Servlet context 30.

IBasicScope scope).red5.IConnection conn.server.api. public boolean serviceCall(org.api.api.IScope scope).IClient client.red5.api.server.IConnection conn.red5.api. public void setCanCallService(boolean canCallService).red5.IScope scope). hashCode . org.server.api.?red5. } Direct known subclasses: org. Mean to be subclassed.api.?StatefulScopeWrappingAdapter Methods inherited from java.red5.?red5.server. org. org. wait 347 . org.IConnection conn.server.api. public void setJoin(boolean canJoin). public boolean handleEvent(org. public void disconnect(org.red5.red5. org.?api.1.server.server. public void leave(org. Class AbstractScopeAdapter Base scope handler implementation.IBasicScope scope). getClass .server.server.server.red5.1. Synopsis public abstract class AbstractScopeAdapterimplements.IScope scope).event.api.red5.red5.server.red5.IEvent event). Object[] params).api. public void stop(org. public boolean connect(org.?adapter.?IScopeHandler { // Public Constructors public AbstractScopeAdapter().red5.api.api. notify .Object: clone .red5.?server.IClient client. notifyAll . // Public Methods public boolean addChildScope(org. equals .api. finalize .IScope scope).server. public boolean join(org. org. public boolean start(org. public void removeChildScope(org.service. toString .server.server. public void setCanStart(boolean canStart).server.lang. public void setCanConnect(boolean canConnect).api.red5.api.?server.IScope scope). 1.IServiceCall call).red5.IScope scope.

Specified by: Method connect in interface IScopeHandler Called just before every connection to a scope.server. Specified by: Method disconnect in interface IScopeHandler Called just after the a connection is disconnected. 1. 1.red5. 348 .api. addChildScope(IBasicScope) public boolean addChildScope(org.server. org. 1. removeChildScope(IBasicScope) public void removeChildScope(org.3.IScope scope).red5.red5.?server. Specified by: Method leave in interface IScopeHandler Called just after the client leaves the scope.IConnection conn. Specified by: Method removeChildScope in interface IScopeHandler Called just after a child scope has been removed.4.server. IScope) public void disconnect(org.2.api.api. IScope) public boolean join(org.api.server.server.IClient client.red5.red5.api.IBasicScope scope).api.6. connect(IConnection.api. org.IScope scope).server.connect method (see below).api.server.server. org.IClient client. 1. leave(IClient.red5.event.server. Specified by: Method addChildScope in interface IScopeHandler Called just before a child scope is added.IScope scope).Package org.8.api.IScope scope.red5.red5.red5. IScope) public void leave(org. join(IClient. Specified by: Method join in interface IScopeHandler Called just before a client enters the scope. Object[] params).?red5.5.red5.api. Object[]) public boolean connect(org. disconnect(IConnection.7.IConnection conn. handleEvent(IEvent) public boolean handleEvent(org.server. 1.IEvent event). IScope. 1.?adapter 1.red5.server.IBasicScope scope). You can pass additional params from client using NetConnection. org.api.

IServiceCall) public boolean serviceCall(org. setCanStart(boolean) public void setCanStart(boolean canStart). setCanCallService(boolean) public void setCanCallService(boolean canCallService).Package org. setJoin(boolean) public void setJoin(boolean canJoin).IConnection conn. start(IScope) public boolean start(org. Setter for can connect flag Parameters canConnect true if connections to scope are allowed.11.server.12. Specified by: Method serviceCall in interface IScopeHandler Called when a service is called. Setter for can start flag.api.service.api.server.10.?adapter 1. 349 . false otherwise 1.api. org.13.IScope scope). Specified by: Method start in interface IScopeHandler Called when a scope is created for the first time.9.red5. false otherwise 1. Parameters canStart true if scope is ready to be activated.14. Setter for 'can join' flag Parameters canJoin true if scope may be joined by users.red5.IServiceCall call).red5. false otherwise true 1. Setter for can call service flag Parameters canCallService if remote service calls are allowed for the scope. false otherwise 1. 1. serviceCall(IConnection.server.?red5. setCanConnect(boolean) public void setCanConnect(boolean canConnect).?server.

red5.IClient client.red5. cancelGhostConnectionsCleanup .IConnection conn. public synchronized boolean start(org.red5. getGhostConnsCleanupPeriod .api.IScope scope). getSharedObject . // Public Constructors public ApplicationAdapter(). Class ApplicationAdapter Base class for applications.IScope scope). getSharedObjectSecurity . 2.red5.?adapter 1.red5. public synchronized void disconnect(org.server. getBroadcastStream . addScheduledJob . // Public Methods public synchronized boolean connect(org.api. } Methods inherited from org.red5.?server.server.server. getBroadcastStreamNames .red5.MultiThreadedApplicationAdapter: addListener . If you want to have maximum performance. stop(IScope) public void stop(org. addScheduledOnceJob .MultiThreadedApplicationAdapter instead.api. appLeave .IScope scope).server.red5.?server.server.api. takes care that callbacks are executed single-threaded.server. public synchronized void leave(org.server. org.red5. org.IConnection conn.?adapter. Using this class may lead to problems if accepting a client in the *Connect or *Join methods takes too long. addScheduledJobAfterDelay .?MultiThreadedApplicationAdapter // Protected Fields protected static org.red5. connect . appDisconnect .?red5. appConnect .IScope scope).Package org.IClient client. FCUnpublish . org. getScheduledJobNames .api.api.IScope scope). getClientTTL . so using the multi-threaded version is preferred. Synopsis public class ApplicationAdapter extends.server.red5.red5. appStart .api. 2. getStreamLength .15.api. getOnDemandStream .IScope scope). appStop . appJoin .slf4j. clearSharedObjects .IScope scope. getSharedObjectNames .server.server.1.server. createSharedObject .adapter.Logger log . public synchronized void stop(org. org. getStreamPlaybackSecurity 350 . public synchronized boolean join(org.api.adapter.api. FCPublish . use org.server. org. getListeners .server. Specified by: Method stop in interface IScopeHandler Called just before a scope is disposed.api. Object[] params). disconnect .red5.?red5.

IScope) public synchronized void disconnect(org. toString .server. getContext . roomDisconnect .?server. unregisterStreamPublishSecurity Methods inherited from org.api.?red5. registerStreamPublishSecurity . org. scheduleGhostConnectionsCleanup . roomStop .red5.adapter. schedulingService Fields inherited from org.IConnection conn. wait Fields inherited from org. setAttribute .adapter. getSubscriberStream . streamPlaylistItemStop . hasSharedObject . getPath . IScope. streamPlaylistVODItemSeek . connect(IConnection.?adapter . getDepth .api. registerSharedObjectSecurity . stop . handleEvent . getParent . streamBroadcastClose .server. setCanStart .IClient client.server. streamPlaylistVODItemResume .server.IScope scope.Logger log . setCanConnect . hasAttribute . disconnect(IConnection. setGhostConnsCleanupPeriod . getChildScope . getAttributeNames . Object[] params).5. removeListener . log protected static org. getAttributes . 2. setAttributes .red5. getAttribute . streamSubscriberClose . roomConnect . lookupConnections . setClientTTL . roomLeave .server.red5.server. unregisterStreamPlaybackSecurity .red5.server. join(IClient. setJoin Methods inherited from java. Object[]) public synchronized boolean connect(org.red5. equals . finalize . getClass . hasOnDemandStream . hasChildScope . leave .api. getConnectionsIter . measureBandwidth .red5.IScope scope). 2.3.red5. streamRecordStart .2.lang. org. killGhostConnections . getName . 2.adapter.IConnection conn.StatefulScopeWrappingAdapter: scope 2. Logger object. hasParent . join . getResource .Object: clone . removeAttributes . streamBroadcastStart .api. rejectClient . unregisterSharedObjectSecurity . getClients . 351 .MultiThreadedApplicationAdapter: log .red5.api. hasBroadcastStream . getStreamPublishSecurity .server. streamPublishStart .api. streamSubscriberStart . roomStart . notify . getResources . setScope Methods inherited from org.red5.Package org. IScope) public synchronized boolean join(org. removeChildScope .AbstractScopeAdapter: addChildScope . streamPlaylistItemPlay .server. getScope .red5.adapter. hashCode . serviceCall . getChildScopeNames . notifyAll . registerStreamPlaybackSecurity . removeScheduledJob . removeAttribute .4.server.slf4j.IScope scope). streamPlaylistVODItemPause . roomJoin . start .StatefulScopeWrappingAdapter: createChildScope . setCanCallService . org.

api.IScope app).server.?red5. Object[] params). public void appLeave(org.red5.server.server.red5.server. 3.IScope app).api.IScope scope). org. public boolean roomConnect(org.IScope app).server.IConnection conn). 2.api.IScope room).red5.server.server.red5.api.red5. public void roomDisconnect(org.server.red5.server. Interface ApplicationMBean JMX mbean for Application.red5.api.Package org.server.IClient client.api. Synopsis public interface ApplicationMBean { // Public Methods public boolean appConnect(org.7.IScope scope).?server.6. leave(IClient.api. public void appStop(org. IScope) public synchronized void leave(org. public boolean roomStart(org.server.red5. 3.IConnection conn.red5.IConnection conn.IScope app).server. start(IScope) public synchronized boolean start(org.server. org.red5.IConnection conn).api.server. org.api.?adapter 2. stop(IScope) public synchronized void stop(org.1.8.red5. public void roomLeave(org.server.red5.api. public boolean roomJoin(org.api. Object[] params).IScope room).red5. public boolean appStart(org. } 352 .IClient client.api.IScope room).server.api.red5.red5.server.api.IClient client.api.api. public void appDisconnect(org. 2.IClient client.api.IScope scope).red5.IScope room).red5.red5. org. public void roomStop(org.api. org.red5.IClient client. public boolean appJoin(org.server.red5.server.api.api.server.

api.IConnection conn). Object[]) public boolean appConnect(org.IConnection conn). Object[] params). Called per each client connect Parameters conn Connection object used to provide basic connection methods.server.server.?server.server.api.server.server. public boolean appStart(org.red5. } 4.api. public boolean roomConnect(org.red5.IScope room).server.server.red5.?adapter 4.server.api.IScope app).api.IClient client. public boolean roomJoin(org.red5. public void roomLeave(org.Package org. org.api.IConnection List of params sent from client with NetConnection.red5. public boolean appJoin(org.api.api. public void appLeave(org.api.IScope app).server.red5. Object[] params).connect call params 353 .api.red5.red5.api. Synopsis public interface IApplication { // Public Methods public boolean appConnect(org.IConnection conn.server.red5.red5.IConnection conn.server. Object[] params). Interface IApplication IApplication provides lifecycle methods that most communication applications will use.IClient client.IScope room).IScope app).red5.IClient client. org.api. This interface defines the methods that are called by Red5 through an applications life.server. org. public void roomDisconnect(org.?red5.IConnection conn.server.red5. See org.red5.server. appConnect(IConnection.api. org.server.2. public boolean roomStart(org.IClient client.red5.IScope app). public void appStop(org. public void appDisconnect(org. 4.red5. public void roomStop(org.server.api.1.api.server.IScope room).red5.api.api.IScope room).api.red5.server.red5.

red5.red5.4.red5.IScope app). appStop(IScope) public void appStop(org.server.?server.server.IScope app). org.server.5.IScope app).api. Called every time client joins app level scope Parameters client app return Client object Scope object true accepts the client. Called every time client leaves the application scope Parameters client app Client object Scope object 4.api.red5.api. appStart(IScope) public boolean appStart(org. false rejects it 4. 354 . IScope) public boolean appJoin(org. org. false rejects it 4.api.api. Called every time client disconnects from the application Parameters conn Connection object See org.IConnection conn).server.server.6.red5.server.api.api. appJoin(IClient.IClient client.server. IScope) public void appLeave(org. See org.server.Package org.?red5. Called once when application or room starts Parameters app Application or room level scope.IClient client. appLeave(IClient.api.red5.red5.api. false terminates 4.IConnection 4.IScope app).3.red5.7. appDisconnect(IConnection) public void appDisconnect(org.server.?adapter return true accepts the connection.red5.IScope for details true return continues application run.

Called every time client connects to the room Parameters conn params return Connection object List of params sent from client with NetConnection. false rejects it 4.api. Called when user joins room scope Parameters client room return Client object Scope object true accepts the client.Package org.IConnection conn.server. IScope) public void roomLeave(org.IScope room).IConnection conn).IClient client.?adapter Called on application stop Parameters app Scope object 4.api.IConnection 4.api.server.connect call true accepts the connection.red5. Object[] params). See org.IClient client.9.IScope room).red5. org. roomDisconnect(IConnection) public void roomDisconnect(org. Object[]) public boolean roomConnect(org.8.red5. false rejects it 4.red5.red5. roomLeave(IClient.api. Called when client disconnects from room scope Parameters conn Connection object used to provide basic connection methods.api.?red5.red5. org.api.server.server.api.10.server. roomConnect(IConnection.11.server.?server.server.red5. IScope) public boolean roomJoin(org. roomJoin(IClient. Called when user leaves room scope Parameters client Client object 355 .

Called on application room start Parameters room return Scope object true if scope can be started. Class MultiThreadedApplicationAdapter ApplicationAdapter class serves as a base class for your Red5 applications.stream.call("getLiveStreams".?adapter room Scope object 4. Called on room scope stop Parameters room Scope object 5.IScope room).api.call method.13. Red5 offers much more convenient way to add methods for remote invocation to your applications. EXAMPLE: public List getLiveStreams() { // Implementation goes here.?red5. To handle streaming processes in your application you should implement org.api. all methods added in subclasses can be called from client side with NetConnection. nc.red5. false otherwise 4. resultHandlerObj).12.api. use Red5 object to obtain scope and all it's streams } This method added to ApplicationAdapter sublass can be called from client side with the following code: var nc:NetConnection = new NetConnection(). Unlike to Flash Media server which requires you to keep methods on Client object at server side.?server.Package org. Also..connect(.. If you want to build a server-side framework this is a place to start and wrap it around ApplicationAdapter subclass. 356 . roomStart(IScope) public boolean roomStart(org. It provides methods to work with SharedObjects and streams. authorize users. Application adapter provides you with useful event handlers that can be used to intercept streams. ApplicationAdapter is an application level IScope.IScope room).red5. say.server. nc.). etc. roomStop(IScope) public void roomStop(org.server.IStreamAwareScopeHandler interface and implement handling methods. as well as connections and scheduling services.red5.server.

server. org.red5.red5.server. org.?server.1.IScope app).api.server.api.Logger log .IScheduledJob job.IScheduledJob job).IConnection conn.api.red5.api.red5. 357 . // Public Constructors public MultiThreadedApplicationAdapter().IConnection conn.IScope app). public void FCUnpublish().IConnection conn).red5.?IBro // Protected Fields protected static org.red5. org.red5.server. org. // Public Methods public void FCPublish(String streamName). Object[] params).?server.?ISharedObjectService.scheduling.IScope scope.?server. org.IClient client.api.api.?server.?red5.red5. org.api.red5.server. public boolean appJoin(org.server.server.ISchedulingService schedulingService .Package org.server.scheduling. org. int delay).?red5.scheduling.IScope app).slf4j.server. public void appLeave(org. public void appStop(org.api.server.red5.server.server.server.IClient client.api.api.?api.server.red5.api. public String addScheduledOnceJob(java.api.IScheduledJob job).?red5.server. public void addListener(IApplication listener).api. org.?so. public boolean appStart(org.api.api.api.red5.?stream.?StatefulScopeWrappi implements.?red5. public void appDisconnect(org.red5.server.Date date.?adapter 5. protected org.scheduling. public String addScheduledOnceJob(long timeDelta. public boolean appConnect(org. Synopsis public class MultiThreadedApplicationAdapter extends.IScope app). public String addScheduledJob(int interval. public void cancelGhostConnectionsCleanup().scheduling.red5. String name).util.red5. org.?adapter.IScheduledJob job).IScope scope. Object[] params). public String addScheduledJobAfterDelay(int interval. public boolean clearSharedObjects(org.red5. org.?api. public boolean connect(org.

red5.lang.red5.server.api.?server.api.List<java.api.stream.ISharedObject getSharedObject(org.red5. boolean persistent).server.util.IScope s String name).List<java.adapter.String> getBroadcastStreamNames(org.IScope scope.IConnection conn.Set<org. public boolean hasOnDemandStream(org. org. public void disconnect(org.server. public org.api.stream.IStreamPublishSecurity> getStreamPublishSecurity() public org.ISharedObject getSharedObject(org. String name.IScope scope).red5.util. String name).red5.red5.Set<org.red5.server.server. public java.so.api.?adapter public boolean createSharedObject(org.IBroadcastStream getBroadcastStream(org.api.api. org.api. public org.IScope scope.server.red5.red5.api.server.IScope sco String name).server. public int getGhostConnsCleanupPeriod().red5.Set<org.red5.api.red5.server.red5.util.?red5.Set<org.ISubscriberStream getSubscriberStream(org. public java.server. public java.IScope scope). public org. public boolean join(org. public long getClientTTL(). public org.server.server.api. public java.IOnDemandStream getOnDemandStream(org.red5.Set<java.red5.util.server.red5.so.server.IClient client.red5.red5. String name).util.red5.api.api.util.api.server.red5. public java.api.server.lang.IScope scope.IScope scope.server.String> getScheduledJobNames().stream. String name. public java.server.IScope scope).api. String name).String> getSharedObjectNames(org.api.util.stream.red5.red5.server.Package org.so. 358 .lang. public boolean hasBroadcastStream(org. boolean persistent).server.ISharedObjectSecurity> getSharedObjectSecurity().server. String name).IScope scope.api.api.stream.IScope scope).server.server.server.IStreamPlaybackSecurity> getStreamPlaybackSecurity public java.IScope scope).red5. public double getStreamLength(String name).api.api.IScope scope.api.server. public void leave(org.IScope String name).api.IClient client.api. org.red5.api.IApplication> getListeners().red5.red5. public boolean hasSharedObject(org.server.

IBroadcastStream stream).red5.IPlaylistSubscriberStream stream.red5.stream. public boolean roomConnect(org.api.server.so.IPlayItem item.api. boolean isLive).api. public void setClientTTL(int clientTTL).stream. public void streamBroadcastClose(org.server. int position). public void streamBroadcastStart(org. public void streamPlaylistVODItemPause(org.server. org.IClient client.?server.server.server.api.server.IPlayItem item).api.IScope scope).api. public boolean roomJoin(org. public void streamPlaylistItemPlay(org.stream.ISharedObjectSecurity handler). public void setGhostConnsCleanupPeriod(int ghostConnsCleanupPeriod).red5.red5.api.IPlayItem item.red5.api.red5.api.stream.red5.red5. org.red5.stream. public boolean roomStart(org.api.?red5.server. public boolean start(org. Object[] params).IPlaylistSubscriberStream stream.red5.server.Package org.red5.server. public void registerSharedObjectSecurity(org.api. public void streamPlaylistVODItemResume(org.server.red5. public void removeScheduledJob(String name).IPlaylistSubscriberStream stream org.api.server.server.red5.api. public void roomDisconnect(org.stream. public void scheduleGhostConnectionsCleanup().stream.IBroadcastStream stream). public void roomStop(org.red5.api.?adapter public void measureBandwidth().stream.IPlaylistSubscriberStream strea org. 359 .api.stream.api.server.IStreamPlaybackSecurity hand public void registerStreamPublishSecurity(org.stream. public void measureBandwidth(org.api.red5.api.IStreamPublishSecurity handle public void removeListener(IApplication listener).IClient client.stream.IScope room).IScope room).server.red5.stream.red5.red5. org.server.api.red5.server.server.red5.server.red5.server.red5.red5. public void streamPlaylistItemStop(org.IConnection conn).IConnection conn). org.server.server.IScope scope).IPlayItem item.server.server. public void roomLeave(org.api.red5.IScope room).IConnection conn.api. public void registerStreamPlaybackSecurity(org. public void stop(org.server.api.api.api.IScope room).

red5.stream. getScope .StatefulScopeWrappingAdapter: scope 5. public void unregisterStreamPlaybackSecurity(org.red5. equals . hashCode .ISubscriberStream stream).so. public void streamSubscriberClose(org.IStreamPlaybackSecurity ha public void unregisterStreamPublishSecurity(org.Logger log . setAttribute . wait Fields inherited from org.server. protected boolean rejectClient(Object reason) throws ClientRejectedException.api.api.IStreamPublishSecurity hand // Protected Methods protected void killGhostConnections().red5. public void streamSubscriberStart(org. join .adapter. getClass . getResources .server.IBroadcastStream stream). getAttribute . org.IBroadcastStream stream).red5. lookupConnections .?adapter int position).server.red5.red5. removeAttributes .api. getParent . setCanCallService .lang.red5. public void unregisterSharedObjectSecurity(org.?ApplicationAdapter Methods inherited from org.stream. finalize . toString .?adapter. hasAttribute .?red5.server. public void streamRecordStart(org. start .red5. getAttributeNames .adapter. getAttributes .ISharedObjectSecurity handler).stream. setScope Methods inherited from org. public void streamPlaylistVODItemSeek(org.server. handleEvent .server.server. 360 . getPath .2. setAttributes .stream.Package org.server. getClients .IPlayItem item.api. connect .api. int position). notifyAll .server.red5.IPlaylistSubscriberStream stream. protected boolean rejectClient() throws ClientRejectedException.server. getConnectionsIter .server. getChildScope . } Direct known subclasses: org.ISubscriberStream stream). leave .api.api.?red5. getDepth .red5. disconnect .red5.red5. stop Methods inherited from java.?server.stream. hasParent . getName .api.api. getResource . setJoin . getContext .?server. serviceCall .AbstractScopeAdapter: addChildScope . removeChildScope .server. hasChildScope .stream.slf4j. getChildScopeNames .stream. removeAttribute .StatefulScopeWrappingAdapter: createChildScope .Object: clone .stream. setCanConnect . log protected static org. public void streamPublishStart(org. setCanStart . notify .adapter.

361 . int delay).server.red5.api. addScheduledJobAfterDelay(int. Register listener that will get notified about application events. addScheduledJob(int.Package org.?adapter Logger object 5. addListener(IApplication) public void addListener(IApplication listener). Specified by: Method addScheduledJobAfterDelay in interface ISchedulingService Adds a scheduled job which starts after the specified delay period and fires periodically.api. 5. Please note that return values (e. Scheduling service. Uses Quartz.IScope) ) will be ignored for listeners.scheduling.5. adds a scheduled job to be run periodically.red5. org. Adds and removes scheduled jobs. IScheduledJob.red5.api.api. schedulingService protected org. org. Specified by: Method addScheduledJob in interface ISchedulingService Wrapper around ISchedulingService.red5.server.scheduling.4. int) public String addScheduledJobAfterDelay(int interval.server.g.ISchedulingService schedulingService .?red5.scheduling.6. We store this service in the scope as it can be shared across all rooms of the applications. IScheduledJob) public String addScheduledJob(int interval. from appStart(org.?server.IScheduledJob job.3.IScheduledJob job).server. Parameters interval job delay time in milliseconds between two notifications of the job the job to trigger periodically time in milliseconds to pass before first execution. Parameters interval job return Time inverval to run the scheduled job Scheduled job object Name of the scheduled job 5. Parameters listener object to register 5.

addScheduledOnceJob(long. Parameters date job return When to run scheduled job Scheduled job object Name of the scheduled job 5. Specified by: Method addScheduledOnceJob in interface ISchedulingService Adds a scheduled job that's gonna be executed once. Object[] params).?server.red5. IScheduledJob) public String addScheduledOnceJob(long timeDelta. new IConnection object is created after call from a SWF movie) to the application.IScheduledJob job). Please note that the jobs are not saved if Red5 is restarted in the meantime. IScheduledJob) public String addScheduledOnceJob(java.util.api.IConnection conn.?red5.Date date.8.server. Specified by: Method addScheduledOnceJob in interface ISchedulingService Adds a scheduled job that's gonna be executed once on given date. org. EXAMPLE: In this simple example we pass user's skin of choice identifier from client to th server.Package org. You override this method to pass additional data from client to server application using NetConnection. org. Client-side: 362 . Object[]) public boolean appConnect(org. appConnect(IConnection.server. Called every time new client connects (that is. Parameters timeDelta Time offset in milliseconds from the current date when given job should be run Scheduled job object Name of the scheduled job job return 5.connect method.server.red5.scheduling.api. addScheduledOnceJob(Date.scheduling. Specified by: Method appConnect in interface ApplicationMBean Handler method.api.7.9.?adapter return the name of the scheduled job 5.red5.IScheduledJob job). Please note that the jobs are not saved if Red5 is restarted in the meantime.

api. Server-side: if (params.api. appDisconnect(IConnection) public void appDisconnect(org.Package org.server. Parameters conn Disconnected connection object 5.10.red5. appLeave(IClient.?server. Called every time client disconnects from the application.server. Specified by: Method appLeave in interface ApplicationMBean Handler method.length > 0) System.IScope app).api.IConnection conn). Specified by: Method appStart in interface ApplicationMBean Called once on scope (that is. application or application room) start.red5.red5. You override appStart(org.IClient client.?red5.server.red5.IScope app).connect("rtmp://localhost/killerred5app". appStart(IScope) public boolean appStart(org.red5.out.red5.api. "silver").12.connect method.server.11. Specified by: Method appDisconnect in interface ApplicationMBean Handler method.println("Theme selected: " + params[0]).api.IScope) in your application to make it act the way you want. Parameters app Application scope object } 363 .IScope) or roomStart(org.server. Called every time client leaves application scope. Parameters client app Client object that left Application scope 5.server. IScope) public void appLeave(org.api. org.?adapter NetConnection. Parameters conn params Connection object List of parameters after connection URL passed to NetConnection. Boolean value return 5.

appStop(IScope) public void appStop(org. If you call the clearSharedObjects() method and the specified path matches a shared object that is currently active. String name). the persistent store is also cleared. The clearSharedObjects() method traverses the shared object hierarchy along the specified path and clears all the shared objects. /foo/bar/XX?? clears all shared objects that begin with XX.red5.14. /foo/bar/* clears all shared objects stored under the instance directory /foo/bar. String) public boolean clearSharedObjects(org. The name parameter specifies the name of a shared object. /foo/bar clears the shared object /foo/bar. The last element in the path can contain wildcard patterns (for example.15.13. Called when application is stopped. which can include a slash (/) as a delimiter between directories in the path. Specified by: Method clearSharedObjects in interface ISharedObjectService Deletes persistent shared objects specified by name and clears all properties from active shared objects (persistent and nonpersistent).?red5.IScope scope. if bar is a directory name. followed by any two characters.server. all its properties are deleted. 364 . a question mark [?] and an asterisk [*]) or a shared object name.IScope app). clearSharedObjects(IScope. If it is a persistent shared object.?server. The bar directory is also deleted if no persistent shared objects are in use within this namespace. cancelGhostConnectionsCleanup() public void cancelGhostConnectionsCleanup().api. Specifying a slash (/) clears all the shared objects associated with an application instance. and a "clear" event is sent to all subscribers of the shared object.Package org. Cancel ghost connections cleanup period 5. false otherwise 5.red5.api. The following values are possible for the soPath parameter: / clears all local and persistent shared objects associated with the instance. all the shared objects within this directory are cleared. no shared objects are deleted. Parameters app Scope object 5. Specified by: Method appStop in interface ApplicationMBean Handler method.server.?adapter return true if scope can be started. If a directory name matches this specification.

server. false otherwise 5. i.api. If you need to store some data on server while clients go back and forth use persistent SO (just use true ). String name. boolean persistent).lang. You override appConnect(org.?red5.api.red5. store their data between sessions. Whether the scope is room or app level scope. Persistent RSO are statuful. use SharedObject.server.api. Object[]) public boolean connect(org. connect(IConnection. Whether the scope is room or app level scope. SharedObjects can be persistent and transient.red5.server.red5.red5.Object[]) or roomConnect(org. Parameters scope name persistent return Scope that shared object belongs to Name of SharedObject Whether SharedObject instance should be persistent or not true if SO was created.18.IScope scope). Returns disconnection result for given scope and parameters.api. disconnect(IConnection.IConnection.lang. String.getRemote().red5. java.api.Package org. Returns connection result for given scope and parameters. boolean) public boolean createSharedObject(org. Server-side shared objects (also known as Remote SO) are special kind of objects those variable are synchronized between clients.red5. IScope) public void disconnect(org. java. To get an instance of RSO at client-side.api. Parameters conn scope params return Connection object Scope List of params passed to connection handler true if connect is successful.red5. org.IScope scope.16. false otherwise 5.server. Specified by: Method createSharedObject in interface ISharedObjectService Creates a new shared object for given scope. Object[] params). otherwise perfer usage of transient for extra performance.?adapter 5.server. this method distinguishes it and acts accordingly.server.IConnection conn.?server.Object[]) in your application to make it act the way you want.server. createSharedObject(IScope.17.IConnection. Parameters 365 .api.IConnection conn.e. IScope. org.IScope scope. this method distinguishes it and acts accordingly.

server.play call. 5.stream.21. 5.23. String) public org.api. in NetStream.IScope scope).red5.?red5.util.22.red5. getBroadcastStream(IScope.api. Notification method that is sent by FME just before publishing starts.?server.IScope sco String name). Broadcast stream name is somewhat different from server stream name.server. FCUnpublish() public void FCUnpublish(). Specified by: Method getBroadcastStream in interface IBroadcastStreamService Get a broadcast stream by name 5.List<java.?adapter conn scope Connection object Scope 5.api. Specified by: Method getBroadcastStreamNames in interface IBroadcastStreamService Returns list of stream names broadcasted in scope . Parameters scope return Scope to retrieve broadcasted stream names List of broadcasted stream names. that is. Server stream name is just an ID assigned by Red5 to every created stream. Notification method that is sent by FME when publishing of a stream ends.red5. Broadcast stream name is the name that is being used to subscribe to the stream at client side.server. 366 .IBroadcastStream getBroadcastStream(org. getBroadcastStreamNames(IScope) public java.Package org.19. FCPublish(String) public void FCPublish(String streamName). 5.String> getBroadcastStreamNames(org.20. getClientTTL() public long getClientTTL().lang. Parameters streamName Name of stream that is about to be published.

List<java.?adapter Client time to live is max allowed connection ping return time in seconds Parameters return TTL value used in seconds 5. getListeners() public java.Package org.server.red5. getOnDemandStream(IScope.IScope scope String name).25. 5.lang. Return handlers that get notified about application events.api.api. Return period of ghost connections cleanup task call Parameters return Ghost connections cleanup period 5. getGhostConnsCleanupPeriod() public int getGhostConnsCleanupPeriod().IOnDemandStream getOnDemandStream(org.util.stream. Parameters return list of handlers 5.IOnDemandStream for details.red5.?server. seekable and so forth.util.stream.adapter.26. Specified by: Method getScheduledJobNames in interface ISchedulingService Retuns list of scheduled job names Parameters 367 .server. String) public org.IApplication> getListeners().?red5. Parameters scope name return Scope object VOD stream name IOnDemandStream object that represents stream that can be played on demand.red5.red5.server.24.api. Specified by: Method getOnDemandStream in interface IOnDemandStreamService Returns VOD stream with given name from specified scope. getScheduledJobNames() public java.server.27. See org.String> getScheduledJobNames().Set<org.

String name. String. String) public org.Set<java.Package org. getSharedObject(IScope.so. String name). Specified by: Method getSharedObject in interface ISharedObjectService Returns shared object from given scope by name.util. Specified by: Method getSharedObjectNames in interface ISharedObjectService Returns available SharedObject names as List Parameters scope Scope that SO belong to 5.?red5.ISharedObject getSharedObject(org.server. 5.red5.IScope scope.api.?server.api.ISharedObjectSecurity> getSharedObjectSecurity().api.server.util.31.?adapter return List of scheduled job names as list of Strings.server.server.red5. Parameters scope name return Scope that shared object belongs to Name of SharedObject Shared object instance with name given 5.red5.lang.Set<org.29. boolean) public org.so.api.IScope scope).server. boolean persistent). getSharedObjectNames(IScope) public java. Specified by: Method getSharedObjectSecurity in interface ISharedObjectSecurityService 368 .28. getSharedObjectSecurity() public java.api.red5.red5. getSharedObject(IScope.ISharedObject getSharedObject(org.so.server.IScope scope.api.30. Specified by: Method getSharedObject in interface ISharedObjectService Returns shared object from given scope by name. Parameters scope name persistent return Scope that shared object belongs to Name of SharedObject Whether SharedObject instance should be persistent or not Shared object instance with name given 5.String> getSharedObjectNames(org.red5.

hasBroadcastStream(IScope.32. getStreamLength(String) public double getStreamLength(String name). Parameters name return Stream name Stream length in seconds (?) 5. Specified by: Method getStreamPublishSecurity in interface IStreamSecurityService Get handlers that protect stream publishing.33.server.35.IStreamPlaybackSecurity> getStreamPlaybackSecurity() Specified by: Method getStreamPlaybackSecurity in interface IStreamSecurityService Get handlers that protect stream plaback.Set<org. This is a hook so it may be removed. Specified by: Method getSubscriberStream in interface ISubscriberStreamService Returns subscriber stream with given name from specified scope.server. 5. Returns stream length.36.IScope scope.ISubscriberStream getSubscriberStream(org.stream.?red5.api.IStreamPublishSecurity> getStreamPublishSecurity().Set<org.Package org.?server.api. 5.server. Parameters scope name return Scope Stream name ISubscriberStream object 5.stream. getStreamPublishSecurity() public java.IScope s String name).server. String name).red5.?adapter Get handlers that protect shared objects.api. Specified by: Method hasBroadcastStream in interface IBroadcastStreamService 369 .red5. String) public boolean hasBroadcastStream(org. Subscriber stream is a stream that clients can subscribe to. getSubscriberStream(IScope. getStreamPlaybackSecurity() public java.red5.api.util.util.stream. String) public org.server.red5.red5. 5.34.api.

server.red5. Parameters client scope Client object Scope object 5.MultiThreadedApplicationAdapter handlers respectively.api.?adapter Does the scope have a broadcast stream registered with a given name 5. org.server.adapter. String) public boolean hasOnDemandStream(org. join(IClient. Can be applied to both application scope and scopes of lower level. hasSharedObject(IScope.api.adapter. Specified by: Method hasOnDemandStream in interface IOnDemandStreamService Check whether scope has VOD stream with given name or not Parameters scope name return Scope VOD stream name true if scope has VOD stream with given name. This method calls org. String name).40. killGhostConnections() protected void killGhostConnections().?red5. String name).IClient client.red5.39.?server.IScope scope. Adds client to scope. Specified by: Method hasSharedObject in interface ISharedObjectService Checks whether there's a SO with given scope and name Parameters scope name Scope that SO belong to Name of SharedObject 5.server. 5. String) public boolean hasSharedObject(org. IScope) public boolean join(org. hasOnDemandStream(IScope.38.IScope scope.Package org. Cleans up ghost connections 370 .api.red5.server.IScope scope).MultiThreadedApplicationAdapter or org.api.37.red5.server.red5.server. Scope can be both application or room.red5. false otherwise.

api.api. measureBandwidth() public void measureBandwidth().api. org.api.server.server.red5. registerStreamPlaybackSecurity(IStreamPlaybackSecurity) public void registerStreamPlaybackSecurity(org.red5. Disconnects client from scope.IConnection conn).43.red5.Package org.red5. Try to measure bandwidth of current connection.red5. Can be applied to both application scope and scopes of lower level. Specified by: Method registerSharedObjectSecurity in interface ISharedObjectSecurityService Add handler that protects shared objects. registerStreamPublishSecurity(IStreamPublishSecurity) public void registerStreamPublishSecurity(org.red5.so.stream. org. This method calls appLeave(org.server.45.?adapter 5. This is required for some FLV player to work because they require the "onBWDone" method to be called on the connection.api.IStreamPlaybackSecurity handle Specified by: Method registerStreamPlaybackSecurity in interface IStreamSecurityService Add handler that protects stream playback.IStreamPublishSecurity handler) 371 .server. 5.red5.stream.server. Parameters client scope Client object Scope object 5. registerSharedObjectSecurity(ISharedObjectSecurity) public void registerSharedObjectSecurity(org.api. 5.server.41.server. IScope) public void leave(org.46.44.red5.IScope) handlers respectively.42.?red5.server.IScope) or roomLeave(org.api.IClient.IScope scope).IClient.server. Try to measure bandwidth of given connection.api. Parameters conn the connection to measure the bandwidth for 5.ISharedObjectSecurity handler). org. leave(IClient. 5.?server.api.api.red5.server.red5. This is required for some FLV player to work because they require the "onBWDone" method to be called on the connection. measureBandwidth(IConnection) public void measureBandwidth(org.IClient client.

ClientRejectedException Thrown when client connection must be rejected by application logic 5. Parameters listener object to unregister 5. rejectClient(Object) protected boolean rejectClient(Object reason) throws ClientRejectedException.red5.exception.49.47.server.exception. removeListener(IApplication) public void removeListener(IApplication listener). Parameters reason Additional error message to return to client-side Flex/Flash application never returns return org.server. Parameters return never returns org.?adapter Specified by: Method registerStreamPublishSecurity in interface IStreamSecurityService Add handler that protects stream publishing. Unregister handler that will not get notified about application events any longer. Specified by: Method removeScheduledJob in interface ISchedulingService Removes scheduled job from scheduling service list 372 . This method throws org. Reject the currently connecting client without a special error message.ClientRejectedException exception.?server.ClientRejectedException Thrown when client connection must be rejected by application logic 5. The passed object will be available as "application" property of the information object that is returned to the caller.server.50. 5.exception. removeScheduledJob(String) public void removeScheduledJob(String name).red5.?red5.red5.48. Reject the currently connecting client with an error message. rejectClient() protected boolean rejectClient() throws ClientRejectedException.Package org.

?adapter Parameters name Scheduled job name 5.red5. java.IConnection.server.red5.52. Parameters client room Disconnected client object Room scope 5.Package org.IConnection conn. roomDisconnect(IConnection) public void roomDisconnect(org.51.api. IScope) public void roomLeave(org.api.IClient client.red5. roomStart(IScope) public boolean roomStart(org.red5.IScope room).api.lang.54. Specified by: Method roomStart in interface ApplicationMBean 373 . Parameters conn Disconnected connection object 5.server.api.53. You override this method to pass additional data from client to server application using NetConnection. Specified by: Method roomLeave in interface ApplicationMBean Handler method.api. Object[] params).server. Called every time client disconnects from the room. roomConnect(IConnection.?server.red5. Parameters conn params return Connection object List of params passed to room scope Boolean value 5.IScope room).server. Called every time client leaves room scope. Specified by: Method roomDisconnect in interface ApplicationMBean Handler method.connect method.?red5.IConnection conn). Specified by: Method roomConnect in interface ApplicationMBean Handler method.server. Called every time new client connects (that is.server. See appConnect(org. new IConnection object is created after call from a SWF movie) to the application. roomLeave(IClient. Object[]) public boolean roomConnect(org.api.red5. org.Object[]) for code example.

Schedules new ghost connections cleanup using current cleanup period 5.56. Parameters room Room scope.red5.?adapter Handler method. scheduleGhostConnectionsCleanup() public void scheduleGhostConnectionsCleanup().Package org. Called when room scope is started. Called when room scope is stopped. start(IScope) public boolean start(org. Parameters scope Scope object 374 . setClientTTL(int) public void setClientTTL(int clientTTL). Parameters room return Room scope Boolean value 5.server.58.55.api. Scope can be both application or room level.?red5. Set new ghost connections cleanup period Parameters ghostConnsCleanupPeriod ghost connections cleanup period New 5. 5. roomStop(IScope) public void roomStop(org.red5.IScope room).api.?server. Specified by: Method roomStop in interface ApplicationMBean Handler method. Starts scope. setGhostConnsCleanupPeriod(int) public void setGhostConnsCleanupPeriod(int ghostConnsCleanupPeriod).59. Client time to live is max allowed connection ping return time in seconds Parameters clientTTL New TTL value in seconds 5.server.IScope scope).57.

IScope scope). streamPlaylistItemPlay(IPlaylistSubscriberStream. stops application if given scope is app level scope and stops room handling if given scope has lower scope level).api.api. Parameters scope Scope to stop 5.api.red5. See start(org. Specified by: Method streamBroadcastClose in interface IStreamAwareScopeHandler Notified when a broadcaster closes.IScope) handlers respectively.api.stream. true 5.IPlayItem item.server.Package org. This method calls appStop(org.server.stream. false otherwise.server.red5.red5.server. Specified by: Method streamPlaylistItemPlay in interface IStreamAwareScopeHandler Notified when a playlist item plays.server.server. org.60. boolean isLive).61.red5.63.?red5.stream. streamBroadcastStart(IBroadcastStream) public void streamBroadcastStart(org.IScope) for details. Parameters stream Description copied from interface: streamBroadcastStart 5.IBroadcastStream stream). stop(IScope) public void stop(org.api.?server.server.red5. IPlayItem.IBroadcastStream stream).api. 375 .IPlaylistSubscriberStream stream. Specified by: Method streamBroadcastStart in interface IStreamAwareScopeHandler Notified when a broadcaster starts.api.stream. boolean) public void streamPlaylistItemPlay(org. Parameters stream Description copied from interface: streamBroadcastClose 5.red5.IScope) or roomStop(org.62. streamBroadcastClose(IBroadcastStream) public void streamBroadcastClose(org. Stops scope handling (that is.api.?adapter return if scope can be started.red5.server.red5.

int) public void streamPlaylistVODItemPause(org.stream.red5.IPlayItem item).server. int position). streamPlaylistVODItemResume(IPlaylistSubscriberStream.IPlaylistSubscriberStream stream.66. int) public void streamPlaylistVODItemResume(org.red5.server.api.IPlayItem item. Parameters stream item position Description copied from interface: streamPlaylistVODItemPause 5.stream. streamPlaylistItemStop(IPlaylistSubscriberStream.api.?adapter Parameters stream item isLive TODO Description copied from interface: streamPlaylistItemPlay 5.IPlaylistSubscriberStream stream.api.65. Specified by: Method streamPlaylistItemStop in interface IStreamAwareScopeHandler Notified when a playlist item stops. IPlayItem) public void streamPlaylistItemStop(org.server.red5. IPlayItem. Parameters stream item Description copied from interface: streamPlaylistItemStop 5.api.server.stream.64.stream. Specified by: Method streamPlaylistVODItemPause in interface IStreamAwareScopeHandler Notified when a playlist vod item pauses.IPlayItem item.?server.server.?red5.stream.red5.api.Package org. streamPlaylistVODItemPause(IPlaylistSubscriberStream. IPlayItem. org.red5. org.IPlaylistSubscriberStream stream. int position). 376 .red5.api.stream.server. org.

Parameters stream item position Description copied from interface: streamPlaylistVODItemResume 5.server.red5.server.api. This will be called when the first video packet has been received.stream.IPlayItem item. Parameters stream item position Description copied from interface: streamPlaylistVODItemSeek 5. Specified by: Method streamPlaylistVODItemSeek in interface IStreamAwareScopeHandler Notified when a playlist vod item seeks.red5. streamRecordStart(IBroadcastStream) public void streamRecordStart(org. streamPublishStart(IBroadcastStream) public void streamPublishStart(org.Package org.68.api.69. Specified by: Method streamPublishStart in interface IStreamAwareScopeHandler A broadcast stream starts being published.stream.?red5.stream.67.IBroadcastStream stream).server. int) public void streamPlaylistVODItemSeek(org. int position).stream. 377 .api.server. org.IPlaylistSubscriberStream stream.red5.red5.api. streamPlaylistVODItemSeek(IPlaylistSubscriberStream.?server.IBroadcastStream stream). IPlayItem.?adapter Specified by: Method streamPlaylistVODItemResume in interface IStreamAwareScopeHandler Notified when a playlist vod item resumes. Parameters stream Description copied from interface: streamPublishStart 5.

server.IStreamPlaybackSecurity hand Specified by: Method unregisterStreamPlaybackSecurity in interface IStreamSecurityService 378 .stream.71.red5.stream.ISubscriberStream stream).Package org.server.so.api.api. Specified by: Method streamSubscriberStart in interface IStreamAwareScopeHandler Notified when a subscriber starts. streamSubscriberStart(ISubscriberStream) public void streamSubscriberStart(org. unregisterSharedObjectSecurity(ISharedObjectSecurity) public void unregisterSharedObjectSecurity(org.api.?adapter Specified by: Method streamRecordStart in interface IStreamAwareScopeHandler A broadcast stream starts being recorded.73.red5.stream.?red5. Parameters stream Description copied from interface: streamRecordStart 5. Parameters stream Description copied from interface: streamSubscriberClose 5. 5.server. This will be called when the first video packet has been received.72.ISharedObjectSecurity handler).?server. unregisterStreamPlaybackSecurity(IStreamPlaybackSecurity) public void unregisterStreamPlaybackSecurity(org.red5. streamSubscriberClose(ISubscriberStream) public void streamSubscriberClose(org. Specified by: Method unregisterSharedObjectSecurity in interface ISharedObjectSecurityService Remove handler that protects shared objects. Parameters stream Description copied from interface: streamSubscriberStart 5.ISubscriberStream stream).red5. Specified by: Method streamSubscriberClose in interface IStreamAwareScopeHandler Notified when a subscriber closes.70.api.server.

java.Iterator<org.?api.Set<java.red5.util.red5. public java.?adapter.?red5.server.server.red5. public java.api.lang.?api.api. public org.util.server.?IAttributeStore { // Protected Fields protected org.Package org. it has attributes that you can work with. // Public Methods public boolean createChildScope(String name).Object> getAttributes().IScope getParent().?adapter Remove handler that protects stream playback.util.IScope scope .api. public java.?server.IContext getContext(). Class StatefulScopeWrappingAdapter StatefulScopeWrappingAdapter class wraps stateful IScope functionality.lang. associated resources and connections.74. unregisterStreamPublishSecurity(IStreamPublishSecurity) public void unregisterStreamPublishSecurity(org. org. 379 .IScope getChildScope(String name).server.?red5.api.?server.api. org.server. 5.util.IClient> getClients(). public java. org.?red5. public int getDepth().String> getAttributeNames().IStreamPublishSecurity handle Specified by: Method unregisterStreamPublishSecurity in interface IStreamSecurityService Remove handler that protects stream publishing. 6.?AbstractScopeAdapter implements.red5. public org. public java. 6.String.String> getChildScopeNames().api.red5.red5. public Object getAttribute(String name).lang.?red5.Map<java. public String getName().red5.Iterator<java.stream.Set<org.?IScopeAware.server. // Public Constructors public StatefulScopeWrappingAdapter(). Synopsis public class StatefulScopeWrappingAdapter extends. That is. subscopes.server. public org.lang.1.?server.api. Object defaultValue).?server.util.IConnection> getConnectionsIter(). public Object getAttribute(String name.

java.IScope scope). connect . disconnect . setCanConnect .Resource getResource(String path).server.red5.AbstractScopeAdapter: addChildScope . toString . public void setAttributes(java.Object: clone . notify .String. handleEvent .IScope scope . public org.core.? MultiThreadedApplicationAdapter Methods inherited from org. Object value).server. getClass .2. public void setScope(org.red5. removeChildScope . serviceCall .api.?server.util.core.?adapter.springframework.?adapter public String getPath().lang. createChildScope(String) public boolean createChildScope(String name).Resource[] getResources(String pattern) throws IOException. hashCode . public org. finalize . start . public boolean hasChildScope(String name). stop Methods inherited from java.io. Wrapped scope 6.server.api. public void setAttributes(org.api.?server. public boolean hasAttribute(String name). setCanStart .?red5.Map<java.adapter.Set<org.lang.IClien public boolean removeAttribute(String name).api.red5. public void removeAttributes(). scope protected org.?red5.IConnection> lookupConnections(org. public org.Object> values). } Direct known subclasses: org.IAttributeStore values).Package org.server. 380 . join . public java.api.springframework. setJoin .red5. setCanCallService .IScope getScope().server. equals . wait 6.server.lang.red5. public boolean hasParent(). public boolean setAttribute(String name.io. notifyAll .3.server.util.api.red5.red5. leave .

Specified by: Method getAttribute in interface IAttributeStore Return the value for a given attribute.Package org. getChildScope(String) public org.red5.util.server.lang. getAttributeNames() public java. Object defaultValue).Map<java.8.lang. 6. defaultValue). Return child scope 381 .IScope getChildScope(String name).util. return getAttribute(name).5. This is a utility function that internally performs the following code: if (!hasAttribute(name)) setAttribute(name.Object> getAttributes().7.4. The resulting set will be read-only. Specified by: Method getAttributeNames in interface IAttributeStore Get the attribute names.lang. false otherwise 6.?server. getAttribute(String) public Object getAttribute(String name). java.Set<java.String.String> getAttributeNames().api. 6. Specified by: Method getAttributes in interface IAttributeStore Wrapper for Scope#getAttributes Parameters return Scope attributes map 6.?adapter Creates child scope Parameters name return Child scope name true on success. 6. Object) public Object getAttribute(String name. Specified by: Method getAttribute in interface IAttributeStore Return the value for a given attribute and set it if it doesn't exist. getAttributes() public java. getAttribute(String.?red5.6.

red5.util.13.server.Set<org.Iterator<java.?server.api.9.api. Iterator for child scope names Parameters return Iterator for child scope names 6.?red5.String> getChildScopeNames(). getClients() public java. Return for connections iterator Parameters return Connections 6. Getter for depth Parameters 382 .red5.Package org. getDepth() public int getDepth(). getChildScopeNames() public java.server.11. getContext() public org. getConnectionsIter() public java.IConnection> getConnectionsIter().util.server.red5.12. Getter for context Parameters return Value for context 6.api.?adapter Parameters name return Child scope name Child scope with given name 6.10.lang. Getter for set of clients Parameters return Set of clients 6.Iterator<org.IClient> getClients().util.IContext getContext().

springframework. Getter for stateful scope path Parameters return Value for path 6.core.16.18.?server.15. getName() public String getName(). getResources(String) public org.17.api. getParent() public org.Resource getResource(String path).14. Return parent scope Parameters return Parent scope 6.?red5. Getter for name Parameters return Value for name 6.Package org. Return resource by name Parameters path return Resource name Resource with given name 6. getPath() public String getPath(). getResource(String) public org. Returns array of resources (as Spring core Resource class instances) Parameters 383 .springframework.?adapter return Value for depth 6.core.IScope getParent().server.red5.io.Resource[] getResources(String pattern) throws IOException.io.

hasChildScope(String) public boolean hasChildScope(String name). Getter for wrapped scope Parameters return Wrapped scope 6.23. 6. false otherwise 6. getScope() public org.?red5. Specified by: Method hasAttribute in interface IAttributeStore Check the object has an attribute.IScope getScope(). If this scope has a parent Parameters return true if this scope has a parent scope.22. removeAttribute(String) public boolean removeAttribute(String name). Specified by: Method removeAttribute in interface IAttributeStore Remove an attribute.Package org. Whether this scope has a child scope with given name Parameters name return Child scope name true if it does have it.server.?server.21.red5. hasParent() public boolean hasParent(). hasAttribute(String) public boolean hasAttribute(String name).?adapter pattern return IOException Resource pattern Returns array of resources I/O exception 6.api. 384 .19. false otherwise 6.20.

Specified by: Method setScope in interface IScopeAware Set the scope the object is located in. 385 . Object value). Specified by: Method setAttributes in interface IAttributeStore Set multiple attributes on this object. Specified by: Method removeAttributes in interface IAttributeStore Remove all attributes.Package org. java.server.String.?red5. setAttributes(IAttributeStore) public void setAttributes(org.red5. 6.api.24.lang. 6. setAttribute(String.Object> values).IAttributeStore values).util. 6.25. setScope(IScope) public void setScope(org.28. Specified by: Method setAttribute in interface IAttributeStore Set an attribute on this object.Map<java.?adapter 6. setAttributes(Map<String.?server.api.27.server.lang. 6. Object>) public void setAttributes(java. Specified by: Method setAttributes in interface IAttributeStore Set multiple attributes on this object.red5. removeAttributes() public void removeAttributes().IScope scope).26. Object) public boolean setAttribute(String name.

util. public boolean removeAttribute(String name). public java.util. } 386 .api.1.IScope> getScopes().String. You can create IClient objects with newClient(java.Collection<org. public java.Set<org. public void removeAttributes(). public Object getAttribute(String name.Object[]) NOTE: I removed session.api.lang.IConnection> getConnections(). In some ways the client object is like a HTTP session.lang.lang. public boolean hasAttribute(String name). public long getCreationTime(). One client may have multiple connections to different scopes on the same host. java. since client serves the same purpose as a client with attributes 2.lang. Interface ClientMBean The client object represents a single client. Object defaultValue). Synopsis public interface AttributeStoreMBean { // Public Methods public Object getAttribute(String name). public java. } 2.Map<java.1. public String getId().util.1.server. public boolean setAttribute(String name. public java.util.Object> getAttributes(). Object value). Interface AttributeStoreMBean Base interface for all API objects with attributes 1. Synopsis public interface ClientMBean { // Public Methods public void disconnect().red5.String> getAttributeNames().Set<java.red5.server.

Map<java.String.server. Connections may be persistent.1.?api 3.1. 387 .red5. public IClient getClient(). } 4. polling.lang. public boolean connect(IScope scope. Object[] params). RemotingConnection. Interface ConnectionMBean The connection object.util. public boolean connect(IScope scope). 3. AJAXConnection. etc 4. public boolean hasClient(String id).lang. HttpConnection.Package org. public IClient lookupClient(String id) throws ClientNotFoundException.Iterator<org.IClient> getClientList(). public IClient newClient(Object[] params). java.server. public java.util.api. public java. Synopsis public interface ClientRegistryMBean { // Public Methods public IClient getClient(String id) throws ClientNotFoundException.util. Each connection has an associated client and scope.IBasicScope> getBasicScopes(). The aim of this interface is to provide basic connection methods shared between different types of connections Future subclasses: RTMPConnection. public long getDroppedMessages().api. public java.red5. Synopsis public interface ConnectionMBean { // Public Methods public void close().Object> getConnectParams().List<org. public String nextId(). or transient.?red5. Interface ClientRegistryMBean An MBean interface for the client registry.?server.

public long getReadBytes().?red5.lang. public long getWrittenMessages(). } 5. public void ping().String> getRemoteAddresses(). public void initialize(IClient client). public String getSessionId(). public int getLastPingTime(). public String getRemoteAddress(). public long getReadMessages(). public long getPendingMessages().util.1. stop() public void stop(). 388 . public boolean isConnected(). Interface IApplicationContext Interface that wraps the application server context. public long getWrittenBytes().List<java. public IScope getScope().?api public String getHost(). public java. public String getPath(). public int getRemotePort(). 5. public String getType(). } 5.Package org.2. Synopsis public interface IApplicationContext { // Public Methods public void stop().?server.

Interface IAttributeStore Base interface for all API objects with attributes 389 .2. Load a new application for the given context path from a directory.Package org.context. } 6. Synopsis public interface IApplicationLoader { // Public Methods public org.ApplicationContext getRootContext(). 6. getRootContext() public org. Return the root org.3. String directory) throws Exception. 6. String virtualHosts.ApplicationContext getRootContext().ApplicationContext.springframework.1. Parameters return 6. String. Interface IApplicationLoader Interface for servers that can load new applications.?api Stop the web application. String) public void loadApplication(String contextPath. Parameters contextPath virtualHosts directory Exception java.?red5.?server.context.context. public void loadApplication(String contextPath.Exception 7. loadApplication(String.springframework. String directory) throws Exception. String virtualHosts.springframework.lang.

} 7. public void setAttributes(java. Specified by: Method getAttribute in interface AttributeStoreMBean Return the value for a given attribute and set it if it doesn't exist. public void setAttributes(IAttributeStore values).Set<java.1.?server.lang. Object defaultValue). public java. getAttribute(String.Package org.?api. java. public boolean setAttribute(String name. Parameters name return the name of the attribute to get the attribute value or null if the attribute doesn't exist 7.String. Object) public Object getAttribute(String name.lang. public boolean hasAttribute(String name). Specified by: Method getAttribute in interface AttributeStoreMBean Return the value for a given attribute.util.Object> values). public void removeAttributes().util.lang. This is a utility function that internally performs the following code: 390 .2. getAttribute(String) public Object getAttribute(String name).?AttributeStoreMBean { // Public Methods public Object getAttribute(String name). public Object getAttribute(String name. Object value). java.Map<java.?red5.?api 7.?server. Object defaultValue). public boolean removeAttribute(String name). public java.3.String.Object> getAttributes(). Synopsis public interface IAttributeStore extends.Map<java.lang.lang. org.?red5.String> getAttributeNames().util.

7. Specified by: Method getAttributes in interface AttributeStoreMBean Get the attributes. The resulting map will be read-only.lang. return getAttribute(name).?server. Specified by: Method removeAttribute in interface AttributeStoreMBean 391 .String> getAttributeNames().lang.util. Specified by: Method hasAttribute in interface AttributeStoreMBean Check the object has an attribute.Set<java. Parameters return set containing all attribute names 7. getAttributeNames() public java. java.util.4. getAttributes() public java.6. Parameters name defaultValue return the name of the attribute to get the value of the attribute to set if the attribute doesn't exist the attribute value 7.?api if (!hasAttribute(name)) setAttribute(name. Parameters name return the name of the attribute to check true if the attribute exists otherwise false 7.lang.Object> getAttributes(). Parameters return map containing all attributes 7.5.Package org. The resulting set will be read-only. removeAttribute(String) public boolean removeAttribute(String name).Map<java. defaultValue).String. Specified by: Method getAttributeNames in interface AttributeStoreMBean Get the attribute names. hasAttribute(String) public boolean hasAttribute(String name).?red5.

lang. Set multiple attributes on this object. setAttributes(Map<String. Specified by: Method setAttribute in interface AttributeStoreMBean Set an attribute on this object.?red5. java.Map<java.Package org. Object) public boolean setAttribute(String name.9. Parameters values the attributes to set 8. setAttributes(IAttributeStore) public void setAttributes(IAttributeStore values).util.8. Parameters name return the name of the attribute to remove true if the attribute was found and removed otherwise false 7.11. removeAttributes() public void removeAttributes().?api Remove an attribute.?server. Specified by: Method removeAttributes in interface AttributeStoreMBean Remove all attributes. Object>) public void setAttributes(java. setAttribute(String. Object value).String. Parameters name value return the name of the attribute to change the new value of the attribute true if the attribute value changed otherwise false 7. Set multiple attributes on this object.lang. Interface IBWControllable 392 . 7. Parameters values the attributes to set 7.10.Object> values).

3. A bw-controlled object has the bandwidth config property and a link to the parent controllable object.1. The following is IStreamCapableConnection. The summary of children's bandwidth can't exceed the parent's bandwidth even though the children's bandwidth could be configured larger than the parent's bandwidth.2. Synopsis public interface IBWControllable { // Public Methods public IBandwidthConfigure getBandwidthConfigure().?red5. 8. 393 . Bandwidth configuration allows you to set bandwidth size for audio. bandwidth can be separately configured for client stream or connection. thus generates a tree structure.?server. public void setBandwidthConfigure(IBandwidthConfigure config).?api Mark an object that can be bandwidth controlled. getParentBWControllable() public IBWControllable getParentBWControllable(). The parent controllable object acts as the bandwidth provider for this object. Parameters return Bandwidth configuration object 8.4. The next depth level is the IClient. The deepest level is IClientStream. in which the null parent means the host. or client or the whole application. That is. } 8. Return bandwidth configuration object. getBandwidthConfigure() public IBandwidthConfigure getBandwidthConfigure(). Return parent IFlowControllable object Parameters return parent Parent flow controllable 8.Package org. video and total amount. public IBWControllable getParentBWControllable(). setBandwidthConfigure(IBandwidthConfigure) public void setBandwidthConfigure(IBandwidthConfigure config).

Parameters return The 4-element array of bandwidth configure.?server.3.?Cloneable { // Public Static Fields public static final int AUDIO_CHANNEL = 0. // Public Methods public long[] getChannelBandwidth(). public long[] getChannelInitialBurst().Package org. getChannelInitialBurst() public long[] getChannelInitialBurst(). If it's not -1. public static final int DATA_CHANNEL = 2. java. Two properties are provided for bandwidth configuration.1. data and the overall bandwidth. Synopsis public interface IBandwidthConfigure extends. The unit is bit per second. The property "channelInitialBurst" is used to configure the initial bytes that can be sent to client in each channel. public static final int OVERALL_CHANNEL = 3. the value of the first three elements will be ignored.?api Setter for bandwidth configuration Parameters config Value to set for bandwidth configuration 9.2. } 9. Interface IBandwidthConfigure Interface for setting/getting bandwidth configure. A value of -1 means "don't care" so that there's no limit on bandwidth for that channel. 9. The property "channelBandwidth" is used to configure the bandwidth of each channel. public static final int MAX_CHANNEL_CONFIG_COUNT = 4. 394 . getChannelBandwidth() public long[] getChannelBandwidth(). video.?red5. public static final int VIDEO_CHANNEL = 1. 9.?lang. The last element is the overall bandwidth. Return the bandwidth configure for 3 channels: audio.

including SharedObjects. Get the scopes depth. Parameters return the depth 10. Application scope depth is 0x01.?ev // Public Methods public int getDepth(). Parameters 395 .?api.?server.?red5. someroom. public String getType(). If the value is -1.?server.?api Return the byte count of initial burst value for 3 channels: audio. Synopsis public interface IBasicScope extends. getName() public String getName().?api. public String getPath(). Parameters return The 4-element array of byte count of initial burst value. data and the overall bandwidth. video.Package org. 0x03 and so forth. how far down the scope tree is it. 10. } 10.?red5. Interface IBasicScope Base interface for all scope objects. The lowest depth is 0x00. public boolean hasParent(). org.?red5. org. Specified by: Method getName in interface IPersistable Get the name of this scope. getDepth() public int getDepth().?ICoreObject.?server.1.2.3. public String getName(). public IScope getParent(). the default will be used per the implementation of bandwidth controller. Room depth is 0x02. 10. the depth of Global scope. Eg.

Get this scopes parent.?server.5. Synopsis public interface ICastingAttributeStore extends. Parameters return parent scope. 11.7. or null if this scope doesn't have a parent 10.?api. Interface ICastingAttributeStore Attribute storage with automatic object casting support.Package org. Specified by: Method getPath in interface IPersistable Get the full absolute path. getParent() public IScope getParent(). hasParent() public boolean hasParent(). Parameters return Type of scope 10. otherwise false 11. Specified by: Method getType in interface IPersistable Get the type of the scope.6.?red5.?IAttributeStore { 396 .1.?api return the name 10. Parameters return true if this scope has a parent. org. getType() public String getType(). Eg.?server. Does this scope have a parent? You can think of scopes as of tree items where scope may have a parent and children (child).4. host/myapp/someroom. Parameters return Absolute scope path 10.?red5. getPath() public String getPath().

util.util. public java.Set getSetAttribute(String name). public String getStringAttribute(String name). public java. getByteAttribute(String) public Byte getByteAttribute(String name). } 11. public Short getShortAttribute(String name). public Long getLongAttribute(String name). public Byte getByteAttribute(String name).Map getMapAttribute(String name). public Integer getIntAttribute(String name).3.?server.List getListAttribute(String name). public java. Get Boolean attribute by name Parameters name return Attribute name Attribute 11.2. Get Double attribute by name 397 . getDoubleAttribute(String) public Double getDoubleAttribute(String name). public Double getDoubleAttribute(String name). Get Byte attribute by name Parameters name return Attribute name Attribute 11.util.?red5.Package org.?api // Public Methods public Boolean getBoolAttribute(String name). getBoolAttribute(String) public Boolean getBoolAttribute(String name).4.

Get Long attribute by name Parameters name return Attribute name Attribute 398 . Get Integer attribute by name Parameters name return Attribute name Attribute 11.util. getLongAttribute(String) public Long getLongAttribute(String name).5.Map getMapAttribute(String name). getIntAttribute(String) public Integer getIntAttribute(String name). getListAttribute(String) public java. getMapAttribute(String) public java.?server.7.Package org. Get boolean attribute by name Parameters name return Attribute name Attribute 11. Get List attribute by name Parameters name return Attribute name Attribute 11.List getListAttribute(String name).?red5.?api Parameters name return Attribute name Attribute 11.6.8.util.

util.?IAttri // Public Static Fields public static final String ID = "red5.?api. 399 . getShortAttribute(String) public Short getShortAttribute(String name).api.Object[]) NOTE: I removed session.?server. Get Short attribute by name Parameters name return Attribute name Attribute 11.?api 11. One client may have multiple connections to different scopes on the same host.?ClientMBean. Get String attribute by name Parameters name return Attribute name Attribute 12.Package org.red5.10. You can create IClient objects with newClient(java.11.9. getSetAttribute(String) public java.client". Interface IClient The client object represents a single client.Set<org.?red5. // Public Methods public void disconnect(). public java.Set getSetAttribute(String name).?server.1.IConnection> getConnections().server. Synopsis public interface IClient extends. Get Set attribute by name Parameters name return Attribute name Attribute 11. org. org.?red5.lang.util. In some ways the client object is like a HTTP session. since client serves the same purpose as a client with attributes 12.?server.?api.?red5. getStringAttribute(String) public String getStringAttribute(String name).

util. java.?red5.Package org.?server.2. } 12.IConnection> getConnections(IScope scope).Set<org. Parameters 400 .3.api. 12.red5. ID public static final String ID = "red5.Collection<java.api. 12. Specified by: Method getConnections in interface ClientMBean Get a set of connections. public long getCreationTime(). public void setPermissions(IConnection conn.util. public java.String> getPermissions(IConnection conn).red5. disconnect() public void disconnect().IScope> getScopes().server. The key used to store the client object in a http session.server. Parameters return Set of connections 12.Set<org.lang.util.4.util.util.util. public java. Get a set of connections of a given scope. getConnections() public java.red5.api. public boolean hasPermission(IConnection conn. public String getId(). Specified by: Method disconnect in interface ClientMBean Closes all the connections.Set<org. getConnections(IScope) public java.Collection<org.server.api.5. String permissionName).red5.lang.Collection<java.IConnection> getConnections(IScope scope).client".IConnection> getConnections().?api public java.server.String> permissions).

} } Parameters return client id 12. This will be generated by the server if not passed upon connection from client-side Flex/Flash app.9.Package org.Collection<org.8. Specified by: Method getCreationTime in interface ClientMBean Get the creation time for this client object. 12.api.?api scope return scope to get connections for Set of connections to the passed scope 12. Permission names.?server.util.setStreamId( params[0] ). "user123" ). Specified by: Method getId in interface ClientMBean Get the unique ID for this client.red5. Specified by: Method getScopes in interface ClientMBean 401 . getPermissions(IConnection) public java. that contains 2nd all the rest values you pass to NetConnection. Return the permissions in a given context.Object[]) method.server. Parameters conn return Connection specifying the context to get the permissions for. then at server side: public boolean appConnect( IConnection connection. To assign a custom ID to the client use params object of appConnect(org. } catch(Exception e){ log. getScopes() public java.7.api.6.lang.error("{}".connect( "http://localhost/killerapp/".String> getPermissions(IConnection conn).Collection<java.lang.IScope> getScopes().?red5. getCreationTime() public long getCreationTime().getClient().red5.server. Example: At client side: NetConnection. e).util.IConnection. Object[] params ){ try { connection. java.connect method. getId() public String getId(). Parameters return Creation time in milliseconds 12.

hasPermission(IConnection. setPermissions(IConnection.util.10. Set the permissions for this client in a given context. 402 . String permissionName). ClientRejectedException.11.Package org.1.Collection<java.lang. Name of the permission to check. Collection<String>) public void setPermissions(IConnection conn.String> permissions). Interface IClientRegistry Provides a registry of client objects. usually passed from client-side Flex/Flash application upon initial connection. String) public boolean hasPermission(IConnection conn. 13. Parameters conn permissions Connection specifying the context to set the permissions for. public IClient newClient(Object[] params) throws ClientNotFoundException. otherwise false 12. true if the client has the permission. Parameters return Set of scopes 12. Synopsis public interface IClientRegistry { // Public Methods public boolean hasClient(String id). Parameters conn permissionName return Connection specifying the context to check the permissions for. Check if the client has a permission in the given context.?server. You can lookup a client by its client id / session id using lookupClient method. 13.?red5. public IClient lookupClient(String id) throws ClientNotFoundException. This interface implementations also create new client objects from given params.?api Get a set of scopes the client is connected to. Permissions the client has in this context or null for no permissions. java.

Create a new client client object from connection params. lookupClient(String) public IClient lookupClient(String id) throws ClientNotFoundException. The aim of this interface is to provide basic 403 . Parameters id return the id of the client to check for true if the client exists. or transient.?server. false otherwise 13. ClientRejectedException.?red5. newClient(Object[]) public IClient newClient(Object[] params) throws ClientNotFoundException. Interface IConnection The connection object. Connections may be persistent. Parameters params return the parameters the client passed during connection the new client ClientNotFoundException no client could be created from the passed parameters ClientRejectedException the client is not allowed to connect 14.2.4.?api } 13.3. hasClient(String) public boolean hasClient(String id).Package org. polling. Return an existing client from a client id. Each connection has an associated client and scope. Parameters id return the id of the client to return the client object ClientNotFoundException no client with the passed id exists 13. Check if a client with a given id exists.

public java. public long getDroppedMessages(). public long getReadBytes(). public static final String TRANSIENT = "transient". HttpConnection.Map<java. public int getLastPingTime().IBasicScope> getBasicScopes(). public java. RemotingConnection.?api connection methods shared between different types of connections Future subclasses: RTMPConnection.Encoding getEncoding().Object> getConnectParams().red5. public java. public long getClientBytesRead().?api.?server.util. public String getRemoteAddress(). Object[] params).String> getRemoteAddresses().lang. etc 14.IConnection.1. public boolean connect(IScope scope. public String getHost().?ConnectionMBean.?red5. 404 . AJAXConnection.lang. java. public String getPath().?red5.util. public int getRemotePort(). public IScope getScope(). public IClient getClient().?api // Public Static Fields public static final String PERSISTENT = "persistent". public long getReadMessages(). org. // Public Methods public void close().Package org.?server.util. public org. org.?server. public String getSessionId(). Synopsis public interface IConnection extends. public boolean connect(IScope scope).Iterator<org.api.String.lang.?red5.server. public static final String POLLING = "polling".red5.api.server.List<java. public long getPendingMessages().

etc.?red5.3. public long getWrittenBytes().Package org.5. 14. Persistent connection type. This will disconnect the client from the associated scope.6. } 14. public void initialize(IClient client). 14. PERSISTENT public static final String PERSISTENT = "persistent". 14. public long getWrittenMessages().?api public String getType(). 14. Transient connection type. close() public void close(). eg RTMP. Specified by: Method close in interface ConnectionMBean Close this connection. HTTP. Specified by: Method connect in interface ConnectionMBean Try to connect to the scope. public boolean isConnected(). eg Remoting.2. eg RTMPT. Polling connection type. connect(IScope) public boolean connect(IScope scope).?server. public void ping(). TRANSIENT public static final String TRANSIENT = "transient".4. Parameters scope Scope object 405 . POLLING public static final String POLLING = "polling".

Parameters params scope return Connections parameters Scope object true on success.9. getClientBytesRead() public long getClientBytesRead(). This list will contain the shared objects and broadcast streams the connection connected to. Object[] params). Parameters 406 . Specified by: Method getBasicScopes in interface ConnectionMBean Get the basic scopes this connection has subscribed.red5.Package org.10. Return number of written bytes the client reports to have received.util.?api return true on success. connect(IScope.Iterator<org. Specified by: Method connect in interface ConnectionMBean Try to connect to the scope with a list of connection parameters. false otherwise 14. Parameters return Client object 14. Specified by: Method getClient in interface ConnectionMBean Get the client object associated with this connection.7. false otherwise 14. getBasicScopes() public java. This is the last value of the BytesRead message received from a client. getClient() public IClient getClient(). Object[]) public boolean connect(IScope scope.8.IBasicScope> getBasicScopes().?server. Parameters return List of basic scopes 14.server.api.?red5.

getDroppedMessages() public long getDroppedMessages().Map<java.api.?server.server. the IP address will be returned as a String.String. getConnectParams() public java.util.?api return See Also org. Parameters return Connection parameters passed from client-side (Flex/Flash application) 14. Get the object encoding (AMF version) for this connection. java. getEncoding() public org. Specified by: Method getConnectParams in interface ConnectionMBean Return the parameters that were given in the call to "connect".lang.Encoding getEncoding().event.BytesRead number of written bytes received by the client 14. If they are connected to an IP.11. 14.12.14.net.Package org.red5.?red5.server. Specified by: Method getDroppedMessages in interface ConnectionMBean Total number of messages that have been dropped.red5.13. Parameters return Number of dropped messages 14.rtmp.IConnection. Parameters return the used encoding. getHost() public String getHost(). Specified by: Method getHost in interface ConnectionMBean Get the hostname that the client is connected to.lang. Parameters return String containing the hostname 407 .Object> getConnectParams().

?red5.16. Specified by: Method getPath in interface ConnectionMBean Get the path for this connection. getReadBytes() public long getReadBytes(). Specified by: Method getLastPingTime in interface ConnectionMBean Return roundtrip time of last ping command.?api 14.19. Specified by: Method getPendingMessages in interface ConnectionMBean Total number of messages that are pending to be sent to the connection. getPendingMessages() public long getPendingMessages(). getReadMessages() public long getReadMessages(). Parameters return Number of read bytes 14. Specified by: Method getReadMessages in interface ConnectionMBean 408 . Parameters return Number of pending messages 14.17.15. getPath() public String getPath().18. Specified by: Method getReadBytes in interface ConnectionMBean Total number of bytes read from the connection.Package org. This is not updated if you switch scope. Parameters return roundtrip time in milliseconds 14. Parameters return path Connection path 14.?server. getLastPingTime() public int getLastPingTime().

Parameters return The IP address of the client 14. Parameters return Number of read messages 14.util. getRemotePort() public int getRemotePort(). getScope() public IScope getScope(). Specified by: Method getRemoteAddress in interface ConnectionMBean Get the IP address the client is connected from. Parameters 409 .String> getRemoteAddresses().lang.?api Total number of messages read from the connection.List<java.21.?server.20. getRemoteAddresses() public java. Specified by: Method getScope in interface ConnectionMBean Get the scope this is connected to. Specified by: Method getRemoteAddresses in interface ConnectionMBean Get the IP addresses the client is connected from.?red5. this will contain all hosts the client used to connect to the server. Specified by: Method getRemotePort in interface ConnectionMBean Get the port the client is connected from.23. Parameters return The IP addresses of the client 14.22. If a client is connected through RTMPT and uses a proxy to connect. Parameters return The port of the client 14.Package org. getRemoteAddress() public String getRemoteAddress().

?api return The connected scope 14. 410 .Package org. Specified by: Method getSessionId in interface ConnectionMBean Get the session id. getWrittenMessages() public long getWrittenMessages().?red5.25.26. getSessionId() public String getSessionId().27. Specified by: Method getWrittenBytes in interface ConnectionMBean Total number of bytes written to the connection. Parameters return string containing one of connection types 14. Parameters return Number of written messages 14. Parameters return Number of written bytes 14.28.?server. initialize(IClient) public void initialize(IClient client). this may be null. Specified by: Method getType in interface ConnectionMBean Get the connection type.24. getType() public String getType(). Parameters return Session id 14. Specified by: Method getWrittenMessages in interface ConnectionMBean Total number of messages written to the connection. getWrittenBytes() public long getWrittenBytes().

Specified by: Method ping in interface ConnectionMBean Start measuring the roundtrip time for a packet on the connection. finalize . notifyAll . compareTo .?lang. valueOf Methods inherited from java.30.Encoding AMF version types. public static final org. Specified by: Method isConnected in interface ConnectionMBean Is the client connected to the scope. } Methods inherited from java. false for transient. name .api. Result depends on connection type.?red5.lang. public static org.red5. 15.?api Specified by: Method initialize in interface ConnectionMBean Initialize the connection.IConnection.Enum: clone .api. getDeclaringClass . // Public Static Methods public static org.IConnection. 15. hashCode .server.1.Encoding[] values().Object: getClass .api. either AMF0 or AMF3.Encoding AMF3 .red5. ping() public void ping().Encoding extends.server.api. equals . toString .server. otherwise false 14. wait 411 .29.lang. Parameters client Client object associated with connection 14.IConnection. ordinal . Class IConnection.Encoding valueOf(String name). true for persistent and polling connections. Synopsis public static final class IConnection.red5.?server.?Enum { // Public Static Fields public static final org. notify .Encoding AMF0 .red5. Parameters return true if the connection is persistent or polling.IConnection. isConnected() public boolean isConnected(). java.Package org.server.

Parameters bw Bandwidth 17. Interface IConnectionBWConfig The bandwidth configure for connection that has an extra property "upstreamBandwidth" which is not used by Bandwidth Control Framework in Red5. Getter for downstream bandwidth Parameters return Downstream bandwidth. Get the upstream bandwidth to be notified to the client. 16. } 16.3.?server. getUpstreamBandwidth() public long getUpstreamBandwidth(). Parameters return Upstream (from client to server) bandwidth configuration 16.1. setUpstreamBandwidth(long) public void setUpstreamBandwidth(long bw).?red5. Upstream is the data that is sent from the client to the server.Package org.?IBandwidthConfigure { // Public Methods public long getDownstreamBandwidth(). Interface IContext 412 .?red5.4.?server.?api. from server to client 16. Synopsis public interface IConnectionBWConfig extends.?api 16. Upstream is the data that is sent from the client to the server.2. org. public void setUpstreamBandwidth(long bw). Set the upstream bandwidth to be notified to the client. getDownstreamBandwidth() public long getDownstreamBandwidth(). public long getUpstreamBandwidth().

api.ApplicationContext getApplicationContext(). public IScope resolveScope(String path). public IScopeHandler lookupScopeHandler(String path). public IScope resolveScope(IScope root. public Object getCoreService(String beanId). public Object getBean(String beanId). public org.1. public IClientRegistry getClientRegistry(). // Public Methods public org.?springframework. public Object lookupService(String serviceName). String path).Net version.springframework.context.Package org. } 17.?support. public IMappingStrategy getMappingStrategy(). getBean(String) public Object getBean(String beanId).server.red5.persistence.context". Synopsis public interface IContext extends. 17.?red5. this object basically wraps the Spring context or in the case of the . any similar system. Getter for application context Parameters return Application context 17.server. public org.IServiceInvoker getServiceInvoker(). org.?server.?core.service.ApplicationContext getApplicationContext().api. Returns bean by ID 413 .?api The current context.IPersistenceStore getPersistanceStore().springframework.context.red5.3.?io. public IGlobalScope getGlobalScope().?ResourcePatternResolver { // Public Static Fields public static final String ID = "red5. getApplicationContext() public org.2.

getPersistanceStore() public org. Client registry is a place where all clients are registred. getClientRegistry() public IClientRegistry getClientRegistry().5.?server.6.red5. getCoreService(String) public Object getCoreService(String beanId).?api Parameters beanId return Bean ID Given bean instance 17. Returns persistence store object.IPersistenceStore getPersistanceStore(). getMappingStrategy() public IMappingStrategy getMappingStrategy().server. 414 . getGlobalScope() public IGlobalScope getGlobalScope().persistence.Package org. Returns global scope reference Parameters return global scope reference 17. Get client registry.api.4.8. Returns IMappingStrategy object Parameters return IMappingStrategy object 17. Parameters return Client registry object 17. Returns core service by bean id Parameters beanId return Bean ID Core service 17.7.?red5. a storage for persistent objects like persistent SharedObjects.

service.red5.10. You can think of IScope as of tree items. String) public IScope resolveScope(IScope root. Service invokers are objects that make service calls to client side NetConnection objects.api.api.server.IScope for more details. Parameters path return Path of scope handler Scope handler 17.?server. See org.11.IServiceInvoker getServiceInvoker(). Returns service invoker object. getServiceInvoker() public org. Parameters return Service invoker object 17. String path). See org. Parameters root path Root to start from Path of scope 415 .?red5.9. resolveScope(IScope. Returns service by name.server.?api Parameters return Persistence store object 17.red5.IScopeHandler for details. Returns scope handler (object that handle all actions related to the scope) by path. Returns scope by path from given root. Parameters serviceName return Name of service Service object 17.Package org. lookupService(String) public Object lookupService(String serviceName).12.server.red5.api. used to separate context and resources between users. lookupScopeHandler(String) public IScopeHandler lookupScopeHandler(String path).

You can think of IScope as of tree items.red5. 18.?red5. getServer() public IServer getServer().IScope for more details. org. Parameters path return Path of scope IScope object 18.?red5.?server.?api. public void register().?api. Return the server this global scope runs in. Interface IGlobalScope The global scope that acts as root for all applications in a host.?IScope { // Public Methods public IServer getServer().?api return IScope object 17. 19. Synopsis public interface IGlobalScope extends. Synopsis } public interface ICoreObject extends.13.?serv 19. org.1.2.?server.server.?ICastingAttributeStore.?red5.?red5. used to separate context and resources between users.Package org. org. See org. resolveScope(String) public IScope resolveScope(String path). Parameters return the server 416 . Returns scope by path. } 19. Interface ICoreObject Base marker interface for all core objects.api.1.?server.

Map a context path to the name of a scope handler. 20. Synopsis public interface IMappingStrategy { // Public Methods public String mapResourcePrefix(String contextPath). } 20.?red5. Register the global scope in the server and initialize it. public String mapServiceName(String name). mapServiceName(String) public String mapServiceName(String name).4. Interface IMappingStrategy This interface encapsulates the mapping strategy used by the context.3. 20.?api 19.3. Parameters contextPath return context path to map The name of a scope handler 20.Package org. mapResourcePrefix(String) public String mapResourcePrefix(String contextPath).?server.1. Map a name to the name of a service. public String mapScopeHandlerName(String contextPath). register() public void register(). Parameters contextPath return context path to map The path prefix for resources with the given name 20.2. Map a context path to a path prefix for resources. mapScopeHandlerName(String) public String mapScopeHandlerName(String contextPath). 417 .

?core.red5. shared object. Interface IScope The scope object. Synopsis public interface IScope extends. If a client connects to a scope then they are also connected to its parent scope. so its possible for a scope to have a parent and children scopes. String name). public IScope getScope(String name). public java. public static final String TYPE = "scope". 21. public IContext getContext(). public boolean connect(IConnection conn.api.?io.util.scope".util. public boolean createChildScope(String name).?api Parameters name return name to map The name of the service with the passed name 21.Iterator<org. public java. public String getContextPath(). // Public Methods public boolean addChildScope(IBasicScope scope). org. That is. // Public Static Fields public static final String ID = "red5. public java.?springframework. The following are all names for scopes: application.?api. org. scope are general option for grouping things in application.?red5. A statefull object shared between a group of clients connected to the same context path.Set<org. public IBasicScope getBasicScope(String type. 418 .IClient> getClients().IConnection> getConnections(). room.?server. lobby.1. public static final String SEPARATOR = ":".server. Object[] params). public boolean connect(IConnection conn).server.?IBasicScope.api.lang.red5.Iterator<java.util. public void disconnect(IConnection conn). place.?red5. The scope object is used to access resources. streams.Package org. Scopes are arranged in hierarchical way.?server.String> getBasicScopeNames(String type). etc. public IScopeHandler getHandler().

api. TYPE public static final String TYPE = "scope".6. Type constant 21. public java.api. Adds scope as a child scope. String name).2.?server. public boolean hasHandler().Package org. Scope separator 21.lang.?api public java.3.red5. false otherwise 21. Adds given connection to the scope 419 . SEPARATOR public static final String SEPARATOR = ":".server. Returns true on success.util. public boolean hasChildScope(String name).?red5.IConnection> lookupConnections(IClient client).4.red5.Set<org. Parameters scope return Scope given true if child scope was successfully added. connect(IConnection) public boolean connect(IConnection conn).statistics.String> getScopeNames().util. ID public static final String ID = "red5. public boolean hasChildScope(String type. } 21.server.5.IScopeStatistics getStatistics(). addChildScope(IBasicScope) public boolean addChildScope(IBasicScope scope). ID constant 21.Iterator<java. public void removeChildScope(IBasicScope scope).scope". false if given scope is already a child of current. public org.

Object[] params). Parameters name return New child scope name true if child scope was successfully creates. false if given scope already exists among children.9. Parameters conn Connection given 21.Package org. false otherwise 21. getBasicScope(String. String) public IBasicScope getBasicScope(String type.?api Parameters conn return Given connection on success. Get a child scope by name. Object[]) public boolean connect(IConnection conn. connect(IConnection. disconnect(IConnection) public void disconnect(IConnection conn). Parameters 420 . This disconnects all clients of given connection from the scope.8. overloaded for parameters pass case. false if given connection already belongs to this scope true 21.?server.7. Removes given connection from list of scope connections. Returns true on success. createChildScope(String) public boolean createChildScope(String name). String name). false if given connection already belongs to this scope true 21. Add given connection to the scope. Creates child scope with name given and returns success value.?red5.10. Parameters conn params return Given connection Parameters passed on success.

util. and the connection will be closed.15.13. getClients() public java. You can call remove. getConnections() public java.red5.?api name type return Name of the child scope Child scope type the child scope.api. You can get the connections by passing the scope to the clients getConnections() method. or null if no scope is found 21. Return context path.IConnection> getConnections().red5.?red5.server.12.server. getContext() public IContext getContext(). getContextPath() public String getContextPath().Set<org. Get a connection iterator.IScope) Set containing all connected clients 21.util. getHandler() public IScopeHandler getHandler(). Get a set of connected clients. Parameters return Context path 21.api. Parameters return See Also getConnections(org.11.IClient> getClients().Package org. Parameters return Iterator holding all connections 21.server.14.api.Iterator<org. Returns scope context Parameters return Scope context 21.red5.?server. 421 .

422 .Iterator<java. Parameters return set containing child scope names 21.20. Return scope by name Parameters name return Scope name Scope with given name 21.api.17.18. Check to see if this scope has a child scope matching a given name. String) public boolean hasChildScope(String type.server.String> getScopeNames().?server. hasChildScope(String.?api Return handler of the scope Parameters return Scope handler 21. Parameters name return the name of the child scope true if a child scope exists.IScopeStatistics getStatistics().util.19. Parameters return the statistics 21.?red5.lang.red5. hasChildScope(String) public boolean hasChildScope(String name).statistics. Return statistics informations about the scope. getScopeNames() public java.Package org. getScope(String) public IScope getScope(String name). otherwise false 21.16. getStatistics() public org. Get a set of the child scope names.

22.?server. false otherwise 21.server. Returns false if given scope isn't a child of the current scope. otherwise false 21.22. Checks whether scope has handler or not. Interface IScopeAware Maker interface for all objects that are aware of the scope they are located in.red5. Parameters scope Scope given 22.1.?api String name). Parameters return true if scope has a handler. Parameters client return object Set of connection objects (readonly) 21.21.util.IConnection> lookupConnections(IClient client). Removes scope from the children scope list. lookupConnections(IClient) public java.?red5.Package org.Set<org. removeChildScope(IBasicScope) public void removeChildScope(IBasicScope scope). Lookup connections.api. Checks whether scope has a child scope with given name and type Parameters type name return Child scope type Child scope name true if a child scope exists. Synopsis public interface IScopeAware { // Public Methods 423 .23. hasHandler() public boolean hasHandler().

1.?red5.red5.?api. public boolean join(IClient client. Set the scope the object is located in. IScope scope. The thread local connection is always available via the Red5 object within these methods 23. IScope scope).server. public void stop(IScope scope).?red5. Allows for detailed reporting on what is happening within the scope with the on* methods.IServiceCall call). This is the core interface users implement to create applications.api.?event. and also is notified of all events.?server. public void removeChildScope(IBasicScope scope).2. public void disconnect(IConnection conn. Object[] params). Parameters scope Scope for this object 23. setScope(IScope) public void setScope(IScope scope). IScope scope).?server. public boolean start(IScope scope).?api public void setScope(IScope scope). Gives fine grained control over what actions can be performed with the can* methods. Synopsis public interface IScopeHandler extends. } 424 .Package org. org.?IEventHandler { // Public Methods public boolean addChildScope(IBasicScope scope). org.service. IScope scope). } 22. public boolean connect(IConnection conn. Interface IScopeHandler The scope handler controls actions performed against a scope object. public void leave(IClient client. public boolean serviceCall(IConnection conn.

?api 23.connect method. disconnect(IConnection.4. addChildScope(IBasicScope) public boolean addChildScope(IBasicScope scope).Package org. IScope) public boolean join(IClient client. Called just before a client enters the scope.3. IScope scope). Object[] params).?red5. IScope scope).connect method are available as params array. Parameters conn scope Connection object Scope object 23. You can pass additional params from client using NetConnection. IScope scope. connect(IConnection. false to deny 23. join(IClient.5. Parameters scope return Scope that will be added true to allow. Called just after the a connection is disconnected. IScope) public void disconnect(IConnection conn. Parameters conn params Connection object List of params passed from client via NetConnection. All parameters but the first one passed to NetConnection. Parameters 425 .2. Scope object true scope return to allow. IScope. Object[]) public boolean connect(IConnection conn. false to deny 23.?server. Called just before every connection to a scope.connect method (see below). Called just before a child scope is added.

IScope scope).api. false to deny 23.IServiceCall call). Called when a service is called. removeChildScope(IBasicScope) public void removeChildScope(IBasicScope scope). Called just after the client leaves the scope. serviceCall(IConnection. Parameters conn call return The connection object The call object. start(IScope) public boolean start(IScope scope).Package org.service. Called just after a child scope has been removed.?server. org.7. Parameters scope Scope that has been removed 23. Parameters client scope Client object Scope object 23.?red5. IServiceCall) public boolean serviceCall(IConnection conn. false to deny connection 23. IScope) public void leave(IClient client.9.6.red5.8. leave(IClient.server.?api client scope return Client object Scope that is joined by client true to allow. Called when a scope is created for the first time. Parameters scope return the new scope object true to allow. true to allow. false to deny 426 .

Resolver implementations depend on context naming strategy and so forth.?red5.?api 23. Return the global scope. Parameters root path The scope to start traversing from. Get the scope for a given path from a root scope. } 24.1. String path). Path to return the scope for. String path). Parameters return Global scope 24. resolveScope(IScope.3. Interface IScopeResolver Resolve the scope from given a host and path. stop(IScope) public void stop(IScope scope).2.10. getGlobalScope() public IGlobalScope getGlobalScope(). 24. Called just before a scope is disposed. Parameters scope Scope that id disposed 24. public IScope resolveScope(String path).?server. public IScope resolveScope(IScope root. 427 .Package org. Synopsis public interface IScopeResolver { // Public Methods public IGlobalScope getGlobalScope(). String) public IScope resolveScope(IScope root.

streams. Override in subinterfaces. // Public Methods public void addListener(org.?api return Scope for passed path.IConnectionListener listener). Interface IScopeService Base marker interface for all scope services.server. } 25.?red5. Synopsis public interface IServer { // Public Static Fields public static final String ID = "red5.red5. Get the scope for a given path.?server.api.server".4. resolveScope(String) public IScope resolveScope(String path). Synopsis public interface IScopeService { // Public Static Fields public static final String BEAN_NAME . 26. 26.1. etc.1. Name of a bean defining that scope service. 25. Used by the ScopeUtils to lookup services defined as beans in Spring application context. 24. Parameters path return Path to return the scope for Scope for passed path ScopeNotFoundException If scope doesn't exist an can't be created 25. A scope service usually can perform various tasks on a scope like managing shared objects.listeners. 428 .Package org.2. BEAN_NAME public static final String BEAN_NAME . Interface IServer The interface that represents the Red5 server.

util.?red5.api.server.3.api.server. String contextPath).IGlobalScope> getGlobalScopes().red5.listeners.server. Add listener to get notified about scope events. public boolean addMapping(String hostName.String.server.?server.listeners.red5.api.IScopeListener listener). public void removeListener(org. } 26.IConnectionListener listener). addListener(IConnectionListener) public void addListener(org. ID public static final String ID = "red5.red5.String> getMappingTable().server.lang.?api public void addListener(org.server.4.util. Parameters listener the listener to add 26. public IGlobalScope getGlobal(String name).red5.red5. Server ID 26. public void removeListener(org. addListener(IScopeListener) public void addListener(org. String globalName). public IGlobalScope lookupGlobal(String hostName.Iterator<java. Parameters listener the listener to add 429 .lang.api. public void registerGlobal(IGlobalScope scope).2.Iterator<org.IScopeListener listener).lang.String> getGlobalNames().red5.server". public java. String contextPath.api. java.Package org.listeners.listeners. public java.Map<java.IConnectionListener listener).listeners. public java.util. Add listener to get notified about connection events. public boolean removeMapping(String hostName.IScopeListener listener).api. String contextPath).

Parameters hostName contextPath globalName return The name of the host to map The path to map The name of the global scope to map to true if the name was mapped.8. getGlobalNames() public java. Parameters return Iterator for global scopes objects 26.5.util. Map a virtual hostname and a path to the name of a global scope.util.lang.?server.red5.String> getMappingTable(). Parameters name return Name of the global scope the global scope 26.9. getMappingTable() public java. String globalName). String. Get the global scope with given name. otherwise false 26. addMapping(String.?api 26. Parameters return Iterator for names of global scopes 26. Get list of global scope names. 430 .6.lang.?red5.server.IGlobalScope> getGlobalScopes().String> getGlobalNames().util.Package org. Get list of global scopes.api. Query informations about the global scope mappings. java. getGlobalScopes() public java.lang.Iterator<org.Iterator<java.Map<java. getGlobal(String) public IGlobalScope getGlobal(String name). String contextPath.String. String) public boolean addMapping(String hostName.7.

Parameters listener the listener to remove 26.IConnectionListener listener).server. String) public IGlobalScope lookupGlobal(String hostName.13.11.listeners. Remove listener that got notified about scope events.?server. removeMapping(String. Parameters hostName contextPath return The name of the host The path in the host The found global scope or null 26.10. Parameters scope The global scope to register 26.api.IScopeListener listener). String) public boolean removeMapping(String hostName. String contextPath). registerGlobal(IGlobalScope) public void registerGlobal(IGlobalScope scope).?api Parameters return Map containing informations about the mappings 26.?red5. Register a global scope. lookupGlobal(String. Remove listener that got notified about connection events. String contextPath).Package org. 431 . Lookup the global scope for a host. removeListener(IScopeListener) public void removeListener(org.red5.server. removeListener(IConnectionListener) public void removeListener(org.red5.listeners. Parameters listener the listener to remove 26.api.14.12.

?server.1-dev $Revision: 2887 $". public IConnection getConnection(). The code below shows various uses. org.1.?red5.getScope(). Red5 r5 = new Red5().7. // Public Static Methods public static IConnection getConnectionLocal().?server. public IContext getContext(). } 432 .getClient(). 27. and will be setup by the service invoker. public Red5(IConnection conn).Package org. IScope scope = r5.?red5. // Public Fields public IConnection conn . public static void setConnectionLocal(IConnection connection). otherwise false 27. Synopsis public final class Red5implements.getConnectionLocal().?api. public static String getVersion(). This class uses a thread local. r5 = new Red5(conn). IConnection conn = Red5.?api Unregister a previously mapped global scope. public IScope getScope(). // Public Methods public IClient getClient(). public static long getUpTime().getConnection(). IClient client = r5.?Red5MBean { // Public Static Fields public static final String VERSION = "Red5 Server 0. Class Red5 Utility class for accessing Red5 API objects. conn = r5. Parameters hostName contextPath return The name of the host to unmap The path for this host to unmap true if the global scope was unmapped. // Public Constructors public Red5().

433 . Current server version with revision 27. hashCode . getClass .1-dev $Revision: 2887 $". Specified by: Method getConnection in interface Red5MBean Get the connection object.6. Specified by: Method getClient in interface Red5MBean Get the client Parameters return Client object 27. 27.5. Red5() public Red5(). toString . equals .3.?api Methods inherited from java.?server. VERSION public static final String VERSION = "Red5 Server 0.Object: clone .2.4. finalize . Connection local to the current thread 27. Create a new Red5 object using given connection. notify . Red5(IConnection) public Red5(IConnection conn).7. Parameters conn Connection object. Create a new Red5 object using the connection local to the current thread A bit of magic that lets you access the red5 scope from anywhere 27.?red5. conn public IConnection conn .Package org. notifyAll .7. wait 27. getClient() public IClient getClient(). getConnection() public IConnection getConnection().lang.

Specified by: Method getScope in interface Red5MBean Get the scope Parameters return Scope object 27. Parameters return String version 27.11.12.8. Returns server uptime in milliseconds.?server. Specified by: Method getContext in interface Red5MBean Get the spring application context Parameters return Application context 27.?red5. Parameters return Connection object 27.10. This method allows you to get connection object local to current thread. getScope() public IScope getScope().9.?api Parameters return Connection object 27. When you need to get a connection associated with event handler and so forth. 434 . getUpTime() public static long getUpTime(). Get the connection associated with the current thread.Package org. getVersion() public static String getVersion(). getContext() public IContext getContext(). this method provides you with it. getConnectionLocal() public static IConnection getConnectionLocal().

setConnectionLocal(IConnection) public static void setConnectionLocal(IConnection connection). That is.scope". Setter for connection Parameters connection Thread local connection 28. If a client connects to a scope then they are also connected to its parent scope.1. Scopes are arranged in hierarchical way. } 29. Interface ScopeMBean The scope object. Interface Red5MBean JMX interface for accessing Red5 API objects 28. 435 .1. so its possible for a scope to have a parent and children scopes. 29.?server. public IScope getScope(). The scope object is used to access resources.?red5. The following are all names for scopes: application.Package org.?api Returns the current version with revision number Parameters return String version 27. shared object. streams. scope are general option for grouping things in application. A statefull object shared between a group of clients connected to the same context path. Synopsis public interface Red5MBean { // Public Methods public IClient getClient(). room.13. etc. public IConnection getConnection(). place. public static final String SEPARATOR = ":". Synopsis public interface ScopeMBean { // Public Static Fields public static final String ID = "red5. public IContext getContext(). lobby.

public IScope getScope(String name). public java. public boolean connect(IConnection conn.3.api. public boolean hasHandler().server. public java.?server. public IScopeHandler getHandler(). public String getContextPath().?api public static final String TYPE = "scope".red5.api. } 29.2. public IContext getContext().red5.util.util. ID public static final String ID = "red5.IConnection> lookupConnections(IClient client).String> getBasicScopeNames(String type).?red5.server.lang. public java.Package org. ID constant 29.Iterator<org. String name). public boolean connect(IConnection conn).Iterator<java. public boolean hasChildScope(String type.red5. public java.Iterator<java.IConnection> getConnections().scope". public java. public boolean createChildScope(String name). String name). SEPARATOR 436 .util. public void disconnect(IConnection conn).util.String> getScopeNames().Set<org.api.Set<org. Object[] params). // Public Methods public boolean addChildScope(IBasicScope scope). public void removeChildScope(IBasicScope scope).util.server.IClient> getClients().lang. public IBasicScope getBasicScope(String type. public boolean hasChildScope(String name).

Adds scope as a child scope.?api public static final String SEPARATOR = ":". Type constant 29. Parameters conn params return Given connection Parameters passed on success.4.7.5.?server. connect(IConnection) public boolean connect(IConnection conn). Scope separator 29. Parameters scope return Scope given true if child scope was successfully added.Package org. Object[] params). false otherwise 29.8. Add given connection to the scope. connect(IConnection. false if given scope is already a child of current.6. 437 . createChildScope(String) public boolean createChildScope(String name). overloaded for parameters pass case. false if given connection already belongs to this scope true 29. false if given connection already belongs to this scope true 29. TYPE public static final String TYPE = "scope". addChildScope(IBasicScope) public boolean addChildScope(IBasicScope scope). Adds given connection to the scope Parameters conn return Given connection on success. Object[]) public boolean connect(IConnection conn.?red5. Returns true on success.

getBasicScope(String. 438 .red5. This disconnects all clients of given connection from the scope. getClients() public java. Get a child scope by name. You can get the connections by passing the scope to the clients getConnections() method.red5. Parameters name return New child scope name true if child scope was successfully creates.red5.api.?server.util.?red5. getConnections() public java. Removes given connection from list of scope connections.server.server.11. You can call remove.Set<org.IConnection> getConnections().Package org.server. Parameters conn Connection given 29. String) public IBasicScope getBasicScope(String type.util.IScope) Set containing all connected clients 29.IClient> getClients(). String name).12.Iterator<org.?api Creates child scope with name given and returns success value. Parameters return See Also getConnections(org.api. or null if no scope is found 29. false otherwise 29. Parameters name type return Name of the child scope Child scope type the child scope.api. Get a set of connected clients. false if given scope already exists among children.10. Get a connection iterator. Returns true on success. and the connection will be closed. disconnect(IConnection) public void disconnect(IConnection conn).9.

?server. getScope(String) public IScope getScope(String name).14. Return context path. Returns scope context Parameters return Scope context 29. Parameters 439 . getContext() public IContext getContext().util. getHandler() public IScopeHandler getHandler().Package org.lang.Iterator<java. getScopeNames() public java.16.String> getScopeNames(). getContextPath() public String getContextPath(). Get a set of the child scope names.15. Return handler of the scope Parameters return Scope handler 29.17. Parameters return Context path 29.?red5.?api Parameters return Iterator holding all connections 29. Return scope by name Parameters name return Scope name Scope with given name 29.13.

Checks whether scope has a child scope with given name and type Parameters type name return Child scope type Child scope name true if a child scope exists.Package org. 440 . String) public boolean hasChildScope(String type. Parameters name return the name of the child scope true if a child scope exists.?server. hasChildScope(String) public boolean hasChildScope(String name). Checks whether scope has handler or not. lookupConnections(IClient) public java.18.api.?api return set containing child scope names 29.20.red5. Parameters client return object Set of connection objects (readonly) 29.Set<org.server. Parameters return true if scope has a handler.22.IConnection> lookupConnections(IClient client).21. otherwise false 29. String name).util. hasChildScope(String.?red5. Check to see if this scope has a child scope matching a given name.19. Lookup connections. removeChildScope(IBasicScope) public void removeChildScope(IBasicScope scope). otherwise false 29. hasHandler() public boolean hasHandler(). false otherwise 29.

Class<?> intf. Class<?> intf. public static boolean isApp(IBasicScope scope).Package org. String path). public static IScope resolveScope(IScope from. public static IScope findRoot(IScope from). Synopsis public class ScopeUtils { // Public Constructors public ScopeUtils().?api Removes scope from the children scope list. Class ScopeUtils Collection of utils for working with scopes 30. Class<?> defaultClass). Class<?> intf. // Protected Methods protected static Object getScopeService(IScope scope. // Public Static Methods public static IScope findApplication(IScope from). Class<?> intf). public static Object getScopeService(IScope scope. 441 . Parameters scope Scope given 30. public static boolean isRoot(IBasicScope scope). IBasicScope ancestor). public static boolean isAncestor(IBasicScope from. public static Object getScopeService(IScope scope. boolean checkHandler).?red5.?server. public static boolean isGlobal(IBasicScope scope). boolean checkHandler). public static Object getScopeService(IScope scope. Returns false if given scope isn't a child of the current scope. public static boolean isRoom(IBasicScope scope). public static Object getScopeService(IScope scope. Class<?> defaultClass.1. String name).

Class<?>. equals . See isApp method for details. Class<?> defaultClass).?api protected static Object getScopeService(IScope scope.2. 30.4. Parameters from return Scope to find root for Root scope object 30. Class<?>) public static Object getScopeService(IScope scope. Application scope has depth of 1 and has no parent. hashCode . wait 30. findRoot(IScope) public static IScope findRoot(IScope from). Class<?>) public static Object getScopeService(IScope scope. getClass .5. Root scope is the top level scope among scope's parents. Returns scope service that implements a given interface. notify .3. Finds root scope for specified scope object. Class<?> intf. Returns the application scope for specified scope. finalize . getScopeService(IScope. toString .?server. Class<?> intf). findApplication(IScope) public static IScope findApplication(IScope from).?red5.Package org. Parameters from return Scope to find application for Application scope. notifyAll . Parameters scope intf return The scope service belongs to The interface the service must implement Service object 30.lang. getScopeService(IScope.Object: clone . 442 . String name. } Methods inherited from java.

SharedObject.?api Class<?> defaultClass). Parameters scope name return 30.?server. String) protected static Object getScopeService(IScope scope. Method uses either bean name passes as a string or class object. String name). etc) for the scope. Returns scope services (e. See overloaded method for details. Returns scope service by bean name. getScopeService(IScope. Service object return 30. Class<?>) protected static Object getScopeService(IScope scope.Package org. String name. Class<?> defaultClass). isAncestor(IBasicScope.g. String.8.?red5. Parameters scope name defaultClass return The scope service belongs to Bean name Class of service Service object 30. IBasicScope) public static boolean isAncestor(IBasicScope from.7. Parameters scope intf defaultClass The scope service belongs to The interface the service must implement Class that should be used to create a new service if no service was found. Returns scope service that implements a given interface.6. Check whether one scope is an ancestor of another Parameters 443 . IBasicScope ancestor). getScopeService(IScope.

?red5. myapp is app level.?server. isApp(IBasicScope) public static boolean isApp(IBasicScope scope). isRoom(IBasicScope) public static boolean isRoom(IBasicScope scope).9. foo is room level and bar is room level as well (but with higher depth level) Parameters scope return Scope to check true if scope is the global scope. 30. .12. Check whether scope is an application scope (level 1 leaf in scope tree) or not Parameters scope return Scope to check true if scope is an application scope..10. false otherwise. 30. isRoot(IBasicScope) public static boolean isRoot(IBasicScope scope). true 30.?api from ancestor return Scope Scope to check if ancestor scope is really an ancestor of scope passed as from parameter. Checks whether scope is root or not Parameters 444 .Package org. false otherwise.11. false otherwise.) or not Parameters scope return Scope to check true if scope is a room scope. isGlobal(IBasicScope) public static boolean isGlobal(IBasicScope scope). 30. 3. e. 4..g. Check whether scope is a room scope (level 2 leaf in scope tree or lower. false otherwise. Check whether scope is the global scope (level 0 leaf in scope tree) or not When user connects the following URL: rtmp://localhost/myapp/foo/bar then / is the global level scope.

Package org. 30.?api scope return Scope to check true if scope is root scope (top level scope).?server.13. false otherwise. Resolves scope for specified scope and path. String) public static IScope resolveScope(IScope from. resolveScope(IScope.?red5. Parameters from path return Scope to use as context (to start from) Path to resolve Resolved scope 445 . String path).

util.lang. http://csci.1. 1.onjava. public java.red5.server. Object obj). Interface ICacheStore Storage for cacheable objects.edu/turner/archive/courses/aiit2004/ proxy_cache_solution. Selected cache engines must implement this interface.String> getObjectNames().ref.util. public boolean remove(String name). public boolean remove(ICacheable obj). Top Ten New Things You Can Do with NIO [http://www. Return a cached object with the given name. Parameters 446 .com/developer/technicalArticles/ALT/RefObj/] . Allows for cleanup of a cache implementation. get(String) public ICacheable get(String name).SoftReference<? extends org.csusb. Reference Objects and Garbage Collection [http://java. Object obj).1.2.com/pub/a/onjava/2002/10/02/ javanio. public void put(String name. public void setMaxEntries(int max).lang. public java.Iterator<java. destroy() public void destroy().com/ developerworks/java/library/j-jtp01246.Iterator<java.ICacheab public boolean offer(String name.ibm. } See Also Soft references provide for quick-and-dirty caching [http://www-128. public ICacheable get(String name).3. 1.sun.api.cache.html 1. Synopsis public interface ICacheStore { // Public Methods public void destroy().html?page=3] .html] .

offer(String. Puts an object in the cache with the associated key. getObjectNames() public java.server. Object obj).7. Parameters name obj return string name representing the object cacheable object true if accepted.ICacheable Return iterator over the already loaded objects in the storage. getObjects() public java.6.Package org.SoftReference<? extends org.lang.?cache name return the name of the object to return the object or null if no such object was found 1.?red5. Object) public boolean offer(String name.?server. Parameters name obj string name representing the object cacheable object 447 . put(String. Parameters return iterator over all objects 1. If the named object exists in cache.Iterator<java. it will not be accepted. Return iterator over the names of all already loaded objects in the storage.util.5.4.cache. Object obj).ref.?api. Offer an object to the cache with an associated key. Object) public void put(String name.String> getObjectNames().red5. false otherwise 1.Iterator<java.api.lang. Parameters return iterator over all objects names 1.util.

remove(String) public boolean remove(String name). 448 . Parameters max upper-limit of the cache 2. public void setName(String name).8.?cache 1. Parameters obj return the object to delete 1. Delete the cached object with the given name. Parameters name return the name of the object to delete 1. Delete the passed cached object.ByteBuffer getByteBuffer(). 2. public String getName().Package org. remove(ICacheable) public boolean remove(ICacheable obj). public boolean isCached().1.9.apache.mina.10. Synopsis public interface ICacheable { // Public Methods public org.?api. public void setCached(boolean cached).?red5. setMaxEntries(int) public void setMaxEntries(int max). Interface ICacheable Base interface for objects that can be made cacheable. public byte[] getBytes(). Sets the maximum number of entries for the cache.common.?server.

common. Returns a readonly byte buffer.?cache } See Also org. Returns the name of the cached object.api. getName() public String getName().ICacheStore 2.cache. Parameters return Read-only byte buffer with cached data 2. Parameters return Cached representation of object 2.?red5.red5. Returns the object contained within the cacheable reference. Sets a flag to represent the cached status of a cacheable object.3. false otherwise 2.apache.5.2. getByteBuffer() public org. isCached() public boolean isCached().mina.?server.ByteBuffer getByteBuffer().server.Package org.4. Parameters return true if object is cached. setCached(boolean) public void setCached(boolean cached). Returns true if the object is cached. getBytes() public byte[] getBytes(). Parameters 449 .6. false otherwise. Parameters return Object name 2.?api.

Package org.?red5. Set the name of the cached object.?server. Parameters name New object name 450 .7. setName(String) public void setName(String name).?cache cached true if object is cached.?api. false otherwise 2.

getType() public org.event.server. } 1.1.Type getType().1.4.IEvent. Returns event context object Parameters return Event context object 1. getSource() public IEventListener getSource().IEvent. 451 .api.red5. public IEventListener getSource().3. hasSource() public boolean hasSource(). Returns event listener Parameters return Event listener object 1. public org. Returns even type Parameters return Event type enumeration 1.2.red5.server.api. public boolean hasSource().event. Synopsis public interface IEvent { // Public Methods public Object getObject().Type getType(). getObject() public Object getObject().5. Interface IEvent IEvent interfaces is the essential interface every Event should implement 1.

server.api.Type CLIENT . } Methods inherited from java.api.event.1.lang.server.event.Type STREAM_CONTROL .red5.server. valueOf Methods inherited from java.api. public static final org. notifyAll .server.event.red5. compareTo .Type extends. // Public Static Methods public static org.?red5. name .event.IEvent.server. hashCode .?api.api.Type public static final class IEvent. public static final org.red5.Type SERVICE_CALL .server.Type[] values().event.IEvent.IEvent.server.?server.Object: getClass .Type STATUS . public static final org.?lang. equals . Interface IEventDispatcher IEventDispatcher interface implementations dispatch events 3.lang. Class IEvent.Package org.red5.?Enum { // Public Static Fields public static final org.api.red5. java.server.red5. getDeclaringClass .Type valueOf(String name).IEvent.api.?event Whether event has source (event listener(s)) Parameters return true if so.IEvent.event. wait 3.red5. public static final org.api. public static final org. public static final org.event.Type SERVER .Type SHARED_OBJECT .event. toString . public static final org.event. public static org.IEvent.IEvent.api.red5.Type STREAM_DATA .IEvent.api. finalize .red5.IEvent.server.event. false otherwise 2. notify . } 452 .Enum: clone .server. ordinal . Synopsis public interface IEventDispatcher { // Public Methods public void dispatchEvent(IEvent event).IEvent.red5.api.Type SYSTEM .

Handle an event Parameters event return event to handle true if event was handled.?event 3. Interface IEventHandler public interface IEventHandler { // Public Methods public boolean handleEvent(IEvent event).1.Package org. } 4.1. Notify of event.2.?red5. Interface IEventListener public interface IEventListener { // Public Methods public void notifyEvent(IEvent event).?server. notifyEvent(IEvent) public void notifyEvent(IEvent event). handleEvent(IEvent) public boolean handleEvent(IEvent event). dispatchEvent(IEvent) public void dispatchEvent(IEvent event). Dispatches event Parameters event Event object 4.?api. Parameters event the event object 453 . } 5. false if it should bubble 5.

server. } 6. Iterator for event listeners Parameters return Event listeners iterator 6. Add event listener to this observable Parameters listener Event listener 6.red5.?red5.util.IEventListener> getEventListeners().event.event. 6.1.Iterator<org.4.Package org.red5. getEventListeners() public java.api.?server.?event 6. public java. addEventListener(IEventListener) public void addEventListener(IEventListener listener).3. removeEventListener(IEventListener) public void removeEventListener(IEventListener listener).?api. public void removeEventListener(IEventListener listener).api. that is it has a list of objects that listen to events.Iterator<org. Interface IEventObservable IEventObservable hold functionality of the well-known Observer pattern.IEventListener> getEventListeners(). Synopsis public interface IEventObservable { // Public Methods public void addEventListener(IEventListener listener). Remove event listener from this observable Parameters listener Event listener 454 .util.server.2.

red5.red5.red5.api.api. Interface IConnectionListener Interface for listeners to connection events. } 1. notifyConnected(IConnection) public void notifyConnected(org.api. 2. A connection was disconnected.1.server. Parameters conn the new connection 1. 1.server.api. public void notifyScopeRemoved(org.red5. public void notifyDisconnected(org.server.IConnection conn).2.red5.server. Synopsis public interface IScopeListener { // Public Methods public void notifyScopeCreated(org.IConnection conn).red5.3.1.IScope scope).IConnection conn).IScope scope).IConnection conn). notifyDisconnected(IConnection) public void notifyDisconnected(org.api. Parameters conn the disconnected connection 2. A new connection was established. } 455 .api. Interface IScopeListener Interface for listeners to scope events.1. Synopsis public interface IConnectionListener { // Public Methods public void notifyConnected(org.server.server.

notifyScopeCreated(IScope) public void notifyScopeCreated(org. A scope has been removed. Parameters scope the new scope 2.Package org.2.red5.server.3. A scope has been created.?listeners 2. notifyScopeRemoved(IScope) public void notifyScopeRemoved(org.red5.api.?red5.IScope scope).api.server.IScope scope).?server. Parameters scope the removed scope 456 .?api.

red5. public String getPath(). Interface IPersistable Base interface for objects that can be made persistent. load(java. public boolean isPersistent(). However this is not required for objects that are created by the application and initialized afterwards. public void setName(String name).Input . Every object that complies to this interface must provide either a constructor that takes an input stream as only parameter or an empty constructor so it can be loaded from the persistence store. public String getType(). public void setPersistent(boolean persistent).Input input) throws IOException.io.red5.object. TRANSIENT_PREFIX public static final String TRANSIENT_PREFIX = "_transient".lang.String) 1. public void setStore(IPersistenceStore store). public IPersistenceStore getStore(). Prefix for attribute names that should not be made persistent.io. // Public Methods public void deserialize(org.object. 457 .1. public String getName().object. public void serialize(org. public long getLastModified(). Synopsis public interface IPersistable { // Public Static Fields public static final String TRANSIENT_PREFIX = "_transient". public void setPath(String path).io. } See Also org. 1.1.Output output) throws IOException.red5.2.

IOException Input stream to load from Any I/O exception 1.Package org.5.?api. Parameters return Last modification date in milliseconds 1. Returns the persistence store this object is stored in Parameters return This object's persistence store 458 .io. getStore() public IPersistenceStore getStore(). deserialize(Input) public void deserialize(org.3. Parameters input java.Input input) throws IOException. getPath() public String getPath().6.?server. getLastModified() public long getLastModified().red5. getName() public String getName().7. Parameters return Object name 1. Returns the name of the persistent object. Parameters return Persisted object path 1.io. Returns the path of the persistent object.4.?red5. Load the object from the passed input stream. Returns the timestamp when the object was last modified.?persistence 1.object.

?api. Set the path of the persistent object.10.red5. Write the object to the passed output stream. Parameters 459 . Parameters return true if object is persistent.IOException Output stream to write to Any I/O exception 1.12. Set the name of the persistent object. serialize(Output) public void serialize(org.io.object. isPersistent() public boolean isPersistent().?persistence 1.Output output) throws IOException. Returns true if the object is persistent. setPath(String) public void setPath(String path). Returns the type of the persistent object.?red5.?server.Package org.9.8. Parameters return Object type 1. false otherwise. Parameters output java.11. getType() public String getType(). false otherwise 1. setName(String) public void setName(String name). Parameters name New object name 1.io.

13. 460 .?red5. Interface IPersistenceStore Storage for persistent objects. public java. public boolean remove(String name).lang.IPersistable> getObjects().persistence. setStore(IPersistenceStore) public void setStore(IPersistenceStore store).?server.Set<java.?persistence path New persisted object path 1. false otherwise 1.lang. 2.Set<java. getObjectNames() public java. public void notifyClose().util. public boolean load(IPersistable obj). public boolean save(IPersistable obj). Store a reference to the persistence store in the object.1.server.String> getObjectNames().Collection<org. Parameters store Store the object is saved in 2. Parameters persistent true if object is persistent. Set the persistent flag of the object.14. setPersistent(boolean) public void setPersistent(boolean persistent).Package org. public IPersistable load(String name). Synopsis public interface IPersistenceStore { // Public Methods public java. } 2.red5.?api.api.String> getObjectNames().util.2. public boolean remove(IPersistable obj).util.

Delete the passed persistent object.server.6.?persistence Return iterator over the names of all already loaded objects in the storage.Collection<org. The object must provide either a constructor that takes an input stream as only parameter or an empty constructor so it can be loaded from the persistence store.5. 461 . load(IPersistable) public boolean load(IPersistable obj). 2. Notify store that it's being closed. load(String) public IPersistable load(String name).7.persistence.3.?server. Parameters obj return the object to initializ true if the object was initialized.Package org. Parameters return Set of all object names 2.red5. remove(IPersistable) public boolean remove(IPersistable obj).?red5.api.util. false otherwise 2. Parameters return Set of all objects 2. This allows the store to write any pending objects to disk.IPersistable> getObjects().?api.4. Return iterator over the already loaded objects in the storage. notifyClose() public void notifyClose(). Parameters name return the name of the object to load The loaded object or null if no such object was found 2. Load a persistent object with the given name. Load state of an already instantiated persistent object. getObjects() public java.

?red5. // Public Static Methods public static IPersistenceStore getPersistenceStore(org. Synopsis public class PersistenceUtils { // Public Constructors public PersistenceUtils(). Delete the persistent object with the given name. 3.ResourcePa String className) throws Exception. false otherwise 3. remove(String) public boolean remove(String name). getClass .springframework.core. toString . save(IPersistable) public boolean save(IPersistable obj).9. false otherwise true 2.lang. equals .?persistence Parameters obj return the object to delete if object was persisted and thus can be removed.Object: clone . false otherwise true 2. hashCode . finalize .support.8. Parameters name return the name of the object to delete if object was persisted and thus can be removed. Persist given object. } Methods inherited from java.io. wait 462 .1. Parameters obj return Object to store true on success.?server.Package org. notifyAll . Class PersistenceUtils Helper class for persistence. notify .?api.

Persistence store is a special object that stores persistence objects and provides methods to manipulate them (save. remove. Returns persistence store object.?server. String) public static IPersistenceStore getPersistenceStore(org.ResourcePatt String className) throws Exception. load.Package org.support.2. Parameters resolver className return Resolves connection pattern into Resource object Name of persistence class IPersistence store object that provides methods for persistence object handling Exception java. getPersistenceStore(ResourcePatternResolver.?api.?red5. list).springframework.Exception 463 .?persistence 3.core.io.lang.

3. Parameters name value name of the header to add value of the header to add 1. Interface IRemotingConnection Connection coming from Remoting clients. Object value). This is returned to the client as response for the next request received.1. public void removeHeader(String name). This is returned to the client as response for the next request received. Object. } 1.1. addHeader(String.util. 1.api. Object value.Collection<org. Parameters name value mustUnderstand name of the header to add value of the header to add a boolean flag specifying if the server must pocess this header before handling following headers or messages 464 .remoting. boolean) public void addHeader(String name.server. Tell the client to add a header with all further requests. public void addHeader(String name.?api.?server. org.?IConnection { // Public Methods public void addHeader(String name.2.red5. Object value). Tell the client to add a header with all further requests. boolean mustUnderstand). addHeader(String. Object value.IRemotingHeader> getHeaders(). Object) public void addHeader(String name. boolean mustUnderstand). public java. Synopsis public interface IRemotingConnection extends.?red5.

util.remoting. Synopsis public interface IRemotingHeader { // Public Static Fields public static final String APPEND_TO_GATEWAY_URL = "AppendToGatewayUrl". public static final String REPLACE_GATEWAY_URL = "ReplaceGatewayUrl".?api. This is returned to the client as response for the next request received.?red5. // Public Methods public boolean getMustUnderstand().4. } 2. public String getName(). public static final String DEBUG_SERVER = "amf_server_debug". Interface IRemotingHeader A Remoting header. 2. Parameters name name of the header to remove 2. 465 . public static final String PERSISTENT_HEADER = "RequestPersistentHeader". Parameters return 1.2. public static final String CREDENTIALS = "Credentials". getHeaders() public java.1.?remoting 1. Return headers to send. removeHeader(String) public void removeHeader(String name).server.api. APPEND_TO_GATEWAY_URL public static final String APPEND_TO_GATEWAY_URL = "AppendToGatewayUrl".5.?server. public Object getValue(). Tell the client to no longer send a header with all further requests.Collection<org.IRemotingHeader> getHeaders().red5.Package org.

3. PERSISTENT_HEADER public static final String PERSISTENT_HEADER = "RequestPersistentHeader". Name of header containing authentication data. 2. Parameters return 2.9. getValue() public Object getValue(). 2.8. 2.4. Name of header specifying new header to send. DEBUG_SERVER public static final String DEBUG_SERVER = "amf_server_debug". Return name of header.?server. getMustUnderstand() public boolean getMustUnderstand().?api.5. getName() public String getName(). Parameters return 2.7. 2. 466 . 2. Name of header to request debug informations from the server. CREDENTIALS public static final String CREDENTIALS = "Credentials".Package org.6. REPLACE_GATEWAY_URL public static final String REPLACE_GATEWAY_URL = "ReplaceGatewayUrl".?red5.?remoting Name of header specifying string to add to gateway url. Return value of header. Return boolean flag if receiver must process header before handling other headers or messages. Name of header specifying new gateway url to use.

Package org.?server.?red5.?api.?remoting Parameters return 467 .

org. IScheduledJob job). IScheduledJob job. 468 . public String addScheduledOnceJob(java. Called each time the job is triggered by the scheduling service.Date date. Synopsis public interface ISchedulingService extends. } 1.1. Synopsis public interface IScheduledJob { // Public Methods public void execute(ISchedulingService service) throws CloneNotSupportedException. IScheduledJob job).?red5. Interface ISchedulingService Service that supports periodic execution of jobs.util. Parameters service the service that called the job 2.?IScopeService { // Public Static Fields public static final String BEAN_NAME = "schedulingService". int delay). public String addScheduledOnceJob(long timeDelta.1. IScheduledJob job). public String addScheduledJobAfterDelay(int interval. execute(ISchedulingService) public void execute(ISchedulingService service) throws CloneNotSupportedException. Interface IScheduledJob Interface that must be implemented by classes that can be scheduled for periodic execution.?api. removing and getting their name as list. // Public Methods public String addScheduledJob(int interval.2.?server. adding. 2.1. 1.

the name of the scheduled job 2.?api.?scheduling public java. int) public String addScheduledJobAfterDelay(int interval.List<java.util. Schedule a job for periodic execution which will start after the specifed delay.util. } 2. IScheduledJob job). addScheduledOnceJob(Date. Schedule a job for periodic execution. Parameters interval job return time in milliseconds between two notifications of the job the job to trigger periodically the name of the scheduled job 2. addScheduledJob(int.String> getScheduledJobNames(). IScheduledJob job.?red5. Schedule a job for single execution at a given date. IScheduledJob) public String addScheduledJob(int interval.lang.4. Please note that the jobs are not saved if Red5 is restarted in the meantime. IScheduledJob.2. addScheduledJobAfterDelay(int. IScheduledJob) public String addScheduledOnceJob(java. Parameters interval job delay return time in milliseconds between two notifications of the job the job to trigger periodically time in milliseconds to pass before first execution. IScheduledJob job).3.Package org. int delay). Parameters date job return date when the job should be executed the job to trigger the name of the scheduled job 469 . public void removeScheduledJob(String name).?server.Date date.

5. Parameters timeDelta job return time delta in milliseconds from the current date the job to trigger the name of the scheduled job 2. Parameters name name of the job to stop 470 .String> getScheduledJobNames().util.7.?scheduling 2. IScheduledJob job).?server. Please note that the jobs are not saved if Red5 is restarted in the meantime.Package org. IScheduledJob) public String addScheduledOnceJob(long timeDelta.6. Parameters return list of job names 2. addScheduledOnceJob(long. Schedule a job for single execution in the future.lang. getScheduledJobNames() public java. Stop executing a previously scheduled job. Return names of scheduled jobs.?red5.?api. removeScheduledJob(String) public void removeScheduledJob(String name).List<java.

api.red5.Set<org.?red5. Parameters return Set of pending operations callbacks 1.service.red5. } 1.server.api. usually callback object represented as an anonymous class instance that implements IPendingServiceCallback interface. getCallbacks() public java.?api. public void setResult(Object result). public Object getResult(). org.server. Registers callback object usually represented as an anonymous class instance that implements IPendingServiceCallback interface.3.?IServiceCall { // Public Methods public java. public void unregisterCallback(IPendingServiceCallback callback). getResult() public Object getResult().1. Parameters 471 . Returns list of callback objects.?service.Set<org. registerCallback(IPendingServiceCallback) public void registerCallback(IPendingServiceCallback callback). public void registerCallback(IPendingServiceCallback callback).util. 1.service.IPendingServiceCallback> getCallbacks().4.?server. Synopsis public interface IPendingServiceCall extends. Interface IPendingServiceCall IPendingServiceCall is a call that have a list of callbacks.1.IPendingServiceCallback> getCallbacks(). Returns service call result Parameters return Remote call result 1.2.util.

Synopsis public interface IPendingServiceCallback { // Public Methods public void resultReceived(IPendingServiceCall call). 1. unregisterCallback(IPendingServiceCallback) public void unregisterCallback(IPendingServiceCallback callback). Unregisters callback object usually represented as an anonymous class instance that implements IPendingServiceCallback interface. 2. Setter for property 'result'. Parameters result Value to set for property 'result'.Package org. Interface IPendingServiceCallback Callback that will be executed when the result of a pending service call has been received.?red5.6.?server. Parameters callback Callback object 2.1. Interface IServiceCall Container for a Service Call 472 .5. resultReceived(IPendingServiceCall) public void resultReceived(IPendingServiceCall call).2. Triggered when results are recieved Parameters call Call object this callback is applied to 3. setResult(Object) public void setResult(Object result). } 2.?service callback Callback object 1.?api.

4. getServiceMethodName() public String getServiceMethodName(). Synopsis public interface IServiceCall { // Public Methods public Object[] getArguments(). getArguments() public Object[] getArguments(). public String getServiceMethodName().?server.?red5. getException() public Exception getException().Package org. Get service call exception Parameters return service call exception 3. public void setStatus(byte status). public byte getStatus().1. public boolean isSuccess().2. Returns service method name Parameters return Service method name as string 473 .?service 3. public String getServiceName(). Returns array of service method arguments Parameters return array of service method arguments 3.?api. public void setException(Exception exception). public Exception getException().3. } 3.

Interface IServiceCapableConnection Connection that has options to invoke and handle remote calls 474 .8.?server. Sets status Parameters status Status as byte 4.?red5.5. Whether call was successful or not Parameters return true on success. Get service call status Parameters return service call status 3.?service 3.?api. Sets exception Parameters exception Call exception 3. setStatus(byte) public void setStatus(byte status).Package org. isSuccess() public boolean isSuccess(). getServiceName() public String getServiceName(). false otherwise 3. getStatus() public byte getStatus().6.9. setException(Exception) public void setException(Exception exception). Returns service name Parameters return Service name 3.7.

Object[] params). int channel). Invoke service using call and channel Parameters call Service call 475 . public void invoke(String method.?api.?server. Synopsis public interface IServiceCapableConnection extends. Invokes service using remoting call object Parameters call Service call object 4. public void notify(IServiceCall call).Package org. public void invoke(String method. int) public void invoke(IServiceCall call. public void invoke(IServiceCall call). int channel).?server. } 4.?api. invoke(IServiceCall) public void invoke(IServiceCall call). public void notify(String method. Object[] params.2.1. IPendingServiceCallback callback). invoke(IServiceCall.3. org.?IConnection { // Public Methods public void invoke(String method). public void invoke(String method. public void invoke(IServiceCall call.?service 4.?red5. public void notify(String method).?red5. Object[] params). public void notify(IServiceCall call. int channel). IPendingServiceCallback callback).

476 .6.Package org. IPendingServiceCallback) public void invoke(String method. Object[]. invoke(String) public void invoke(String method). invoke(String.?api. IPendingServiceCallback callback).?service channel Channel used 4. IPendingServiceCallback callback). invoke(String.7. IPendingServiceCallback) public void invoke(String method.8. notify(IServiceCall) public void notify(IServiceCall call). Object[] params). Invoke method by name Parameters method Called method name 4.?red5. invoke(String.4.5.?server. Object[]) public void invoke(String method. Invoke method with parameters Parameters method params Method name Invocation parameters passed to method 4. Invoke method by name with callback Parameters method callback Called method name Callback 4. Object[] params. Parameters method params callback 4.

Object[] params). int) public void notify(IServiceCall call. Interface IServiceHandlerProvider Supports registration and lookup of service handlers. notify(String.lang. public void unregisterServiceHandler(String name). int channel).?service Parameters call 4. Parameters method 4.?api.?server. Parameters method params 5.1. Synopsis public interface IServiceHandlerProvider { // Public Methods public Object getServiceHandler(String name). notify(IServiceCall.11.Package org.String> getServiceHandlerNames().10. public void registerServiceHandler(String name. public java. Object handler).9.Set<java. notify(String) public void notify(String method).util. } 477 .?red5. Parameters call channel 4. 5. Object[]) public void notify(String method.

Set<java. Get list of registered service handler names.4. Unregister service handler. registerServiceHandler(String. getServiceHandlerNames() public java.?api. Parameters name handler the name of the handler the handler object 5.Package org. Example: If you registered a handler with the name "one. Interface IServiceHandlerProviderAware Class that knows about objects which can provide service handlers.two" that provides a method "callMe". Register an object that provides methods which can be called from a client.3. Return a previously registered service handler. Parameters name return the name of the handler to return the previously registered handler 5.?server. Parameters name the name of the handler 6. Parameters return the names of the registered handlers 5.util.lang. getServiceHandler(String) public Object getServiceHandler(String name).two. 478 . Object handler). Object) public void registerServiceHandler(String name.callMe" from the client. unregisterServiceHandler(String) public void unregisterServiceHandler(String name).?red5.?service 5.2.String> getServiceHandlerNames(). you can call a method "one.5.

?service 6.?api. Return object that knows about service handlers.red5. public boolean invoke(IServiceCall call.?red5. getServiceHandlerProvider() public IServiceHandlerProvider getServiceHandlerProvider().server.Package org. org. Interface IServiceInvoker Interface for objects that execute service calls (remote calls from client). otherwise false 479 . Object service).2. org. Execute the passed service call in the given scope. Synopsis public interface IServiceInvoker { // Public Methods public boolean invoke(IServiceCall call. Synopsis public interface IServiceHandlerProviderAware { // Public Methods public IServiceHandlerProvider getServiceHandlerProvider().?server.IScope scope). } 7.red5. IScope) public boolean invoke(IServiceCall call.1. 7. Parameters call scope return the call to invoke the scope to search for a handler true if the call was performed.server. invoke(IServiceCall.2.api.1. Parameters return 7. } 6. This looks up the handler for the call in the scope and the context of the scope.api.IScope scope).

?server. Object[] params.1.red5.api. IPendingServiceCallback callback).IClient client. public static boolean invokeOnConnection(String method. 480 . otherwise false 8. public static void invokeOnAllConnections(String method. String method. 8. public static void invokeOnClient(org. String method.red5.3.IScope scope.server.server.Package org.server. Parameters call service return the call to invoke the service to use true if the call was performed.server. public static void invokeOnAllConnections(org. org.server. IPendingServiceCallback callback).?red5. Synopsis public class ServiceUtils { // Public Constructors public ServiceUtils(). Object[] params). Object[] params.?service 7.red5. Class ServiceUtils Utility functions to invoke methods on connections. Execute the passed service call in the given object. invoke(IServiceCall. Object[] params).red5. String method. Object[] params).?api. Object[] params.api. Object[] params).IClient client.api.api. Object) public boolean invoke(IServiceCall call. public static boolean invokeOnConnection(String method. Object service). // Public Static Methods public static void invokeOnAllConnections(String method.red5. public static void invokeOnClient(org.IScope scope. public static void invokeOnAllConnections(org.server. org.IScope scope.api. String method.api.red5. IPendingServiceCallback callback).IScope scope.

red5.IScope scope.red5. Object[]. IPendingServiceCallback) public static void invokeOnAllConnections(org. org. Object[] params).?api. public static boolean notifyOnConnection(org.red5.IScope scope.3.server. public static void notifyOnAllConnections(org. String method. invokeOnAllConnections(IScope. toString . String method.api. String. Object[]) public static void invokeOnAllConnections(org.IConnection conn.api.IConnection conn. String method. getClass .server.red5.?red5. public static boolean notifyOnConnection(String method. Invoke a method on all connections to a given scope.api. Object[] params.2.IClient client. public static boolean invokeOnConnection(org. public static void notifyOnAllConnections(String method. invokeOnAllConnections(IScope.IConnection conn. String method. Object[] params).server. String method. Parameters scope method params scope to get connections for name of the method to invoke parameters to pass to the method 8.?server. notifyAll .api.server.red5.red5.server. public static boolean invokeOnConnection(org.red5. String. Object[] params).api. Object[] params).api. wait 8. IPendingServiceCallback callback).Object: clone . String method.red5.Package org.?service Object[] params.server. finalize . } Methods inherited from java.IScope scope. String method. 481 . Object[] params). equals . Object[] params).IScope scope. public static void notifyOnClient(org. Object[] params). notify .api.server.api.lang. hashCode .server. IPendingServiceCallback callback).

Parameters scope method params callback scope to get connections for name of the method to invoke parameters to pass to the method object to notify when result is received 8. org.?service Object[] params. Object[] params. Invoke a method on all connections of a client to a given scope. Parameters method params name of the method to invoke parameters to pass to the method 8.6. Object[]) public static void invokeOnAllConnections(String method.server. invokeOnAllConnections(String. String.?api.?red5. String method. Object[] params). Invoke a method on all connections to a given scope and handle result. invokeOnAllConnections(String.server.?server.api. Invoke a method on all connections to the current scope and handle result.IClient client.api. Parameters method params callback name of the method to invoke parameters to pass to the method object to notify when result is received 8. IScope.Package org. Object[] params). Object[].red5. Invoke a method on all connections to the current scope. IPendingServiceCallback) public static void invokeOnAllConnections(String method. Object[]) public static void invokeOnClient(org.5. IPendingServiceCallback callback).red5.IScope scope. invokeOnClient(IClient. Parameters client scope client to get connections for scope to get connections of the client from 482 .4. IPendingServiceCallback callback).

invokeOnConnection(IConnection. Parameters client scope method params callback client to get connections for scope to get connections of the client from name of the method to invoke parameters to pass to the method object to notify when result is received 8. Invoke a method on all connections of a client to a given scope and handle result. Object[]) public static boolean invokeOnConnection(org. Object[] params).red5.server.server. invokeOnClient(IClient.api. IPendingServiceCallback callback). Object[]. Invoke a method on a given connection and handle result.Package org.server.red5. IScope. Parameters conn method params return connection to invoke method on name of the method to invoke parameters to pass to the method true if the connection supports method calls. String.IConnection conn.red5. Parameters 483 .?service method params name of the method to invoke parameters to pass to the method 8.9.api.?api.?server.api.red5. IPendingServiceCallback callback).server. IPendingServiceCallback) public static void invokeOnClient(org. IPendingServiceCallback) public static boolean invokeOnConnection(org. Object[] params. org. Invoke a method on a given connection. otherwise false 8.8. invokeOnConnection(IConnection.7.IScope scope.?red5. Object[]. String method. String method.IConnection conn. String method.api. String.IClient client. Object[] params. String.

invokeOnConnection(String. otherwise false 8. Parameters method params callback return name of the method to invoke parameters to pass to the method object to notify when result is received true if the connection supports method calls. String. Object[] params). IPendingServiceCallback) public static boolean invokeOnConnection(String method.server. Invoke a method on the current connection and handle result.?service conn method params callback return connection to invoke method on name of the method to invoke parameters to pass to the method object to notify when result is received true if the connection supports method calls.?red5. invokeOnConnection(String. notifyOnAllConnections(IScope. Parameters method params return name of the method to invoke parameters to pass to the method true if the connection supports method calls.api.IScope scope. IPendingServiceCallback callback). String method. Object[]) public static void notifyOnAllConnections(org.Package org. Notfy a method on all connections to a given scope. otherwise false 8. Object[]. Object[] params. Parameters scope method params scope to get connections for name of the method to notify parameters to pass to the method 484 . Object[]) public static boolean invokeOnConnection(String method. otherwise false 8.10. Invoke a method on the current connection.11.12.red5. Object[] params).?server.?api.

notifyOnClient(IClient.?api. Object[] params).server.red5.?service 8. Object[] params). notifyOnConnection(String. 485 . Object[] params). Notify a method on all connections of a client to a given scope. Parameters method params name of the method to notifynotify parameters to pass to the method 8. notifyOnConnection(IConnection. notifyOnAllConnections(String.Package org. Object[]) public static void notifyOnAllConnections(String method.IConnection conn. IScope.red5. org.server.IClient client.?red5.server. Object[]) public static boolean notifyOnConnection(org. String method. String. Notify a method on the current connection. Object[] params). Parameters conn method params return connection to notify method on name of the method to notify parameters to pass to the method true if the connection supports method calls.16.red5.api. Notify a method on all connections to the current scope.15.?server. String. Object[]) public static void notifyOnClient(org. Parameters client scope method params client to get connections for scope to get connections of the client from name of the method to notify parameters to pass to the method 8. String method. Notify a method on a given connection.api.14. Object[]) public static boolean notifyOnConnection(String method.api.13.IScope scope. otherwise false 8.

?api.?service Parameters method params return name of the method to notify parameters to pass to the method true if the connection supports method calls.?server.Package org.?red5. otherwise false 486 .

public boolean isConnected().1.? 487 .red5. Parameters conn 1. 1.IConnection conn). public void disconnect(). Synopsis public interface IClientSharedObject extends.?server.?so. 2. } 1.2.?api. Synopsis public interface ISharedObject extends.?api. 1.3.?IBasicScope.server.1.api.4.?ISharedObjectBase { // Public Methods public void connect(org.IConnection conn). Interface ISharedObject Serverside access to shared objects.?api. org. disconnect() public void disconnect().?red5.?red5. Disconnect the shared object. Interface IClientSharedObject Clientside access to shared objects.?red5. org.red5. connect(IConnection) public void connect(org. isConnected() public boolean isConnected().?server.1.api. Parameters return 2.?server. org.server. Check if the shared object is connected to the server. Connect the shared object using the passed connection.

Check if shared object currently is acquired. 3. acquire() public void acquire().3. otherwise false 2. Prevent shared object from being released. release() public void release(). } 2.?server.red5.ISharedObjectStatistics getStatistics().4. If the SO is non-persistent. public void release(). // Public Methods public void acquire(). 2.2.ISharedObjectStatistics getStatistics().statistics.api.server. Interface ISharedObjectBase 488 .5.server.?api. getStatistics() public org.statistics. the data is released. This method basically is a noop for persistent SOs as their data is stored and they can be released without losing their contents. public boolean isAcquired().Package org. Parameters return true if the SO is acquired. Parameters return statistics 2.red5. isAcquired() public boolean isAcquired().?red5. Each call to acquire must be paired with a call to release so the SO isn't held forever.api. public org. no more clients are connected the SO isn't acquired any more. Return statistics about the shared object.?so // Public Static Fields public static final String TYPE = "SharedObject". Release previously acquired shared object.

public void beginUpdate().Package org. addSharedObjectListener(ISharedObjectListener) public void addSharedObjectListener(ISharedObjectListener listener). public boolean isLocked().setAttribute("Two".IEventListener source). // Public Methods public void addSharedObjectListener(ISharedObjectListener listener).event.1. public int getVersion(). If you want to modify multiple attributes and notify the clients about all changes at once. public java.red5.2.Object> getData().?ISharedObjectHandlerProvider. All changes between "beginUpdate" and "endUpdate" will be sent to the clients using one notification event.lang.?server. '1'). public void lock(). SharedObject.?so Base interface for shared objects. Changes to the shared objects are propagated to all subscribed clients. public void sendMessage(String handler. public void beginUpdate(org. SharedObject.?so. 3.api. Register object that will be notified about update events. '2').util. org. public void removeSharedObjectListener(ISharedObjectListener listener). public void close(). Synopsis public interface ISharedObjectBase extends. you can use code like this: SharedObject. SharedObject. public void unlock().setAttribute("One".beginUpdate().server. 489 . java.endUpdate(). SharedObject.?red5.?api.util. public void endUpdate(). public boolean clear(). java.Map<java.?red5.String.?server. public boolean isPersistentObject().lang. } 3.removeAttribute("Three").List arguments).?api.

api. The multiple updates are complete.red5. 3. close() public void close(). 3.?so Parameters listener the object to notify 3. NOTE: The returned map will be read-only.5.event. getData() public java. clear() public boolean clear(). Deletes all the attributes and sends a clear event to all listeners. Start performing multiple updates to the shared object from serverside code.4.7. beginUpdate() public void beginUpdate().lang.6. endUpdate() public void endUpdate().?red5.IEventListener source). this will destroy the reference immediately. beginUpdate(IEventListener) public void beginUpdate(org. Parameters return true if successful.Package org.3. 3.?api.String. Return a map containing all attributes of the shared object.server.8.Map<java. Detaches a reference from this shared object.Object> getData(). notify clients about all changes at once. This is useful when you don't want to proxy a shared object any longer. Parameters source Update events listener 3. Start performing multiple updates to the shared object from a connected client. false otherwise 3. The persistent data object is also removed from a persistent shared object.lang. java. Parameters 490 .?server.util.

?red5. Parameters return true if the shared object is persistent. Unregister object to not longer receive update events. removeSharedObjectListener(ISharedObjectListener) public void removeSharedObjectListener(ISharedObjectListener listener). 3.12.?api. Returns the locked state of this SharedObject. List) public void sendMessage(String handler.Package org. Returns the version of the shared object. Check if the object has been created as persistent shared object by the client.10. lock() public void lock(). getVersion() public int getVersion(). false otherwise 3. Parameters return the version of the shared object 3.9. The version is incremented automatically on each modification. false otherwise 3.?server. Parameters listener the object to unregister 3.11.13. isLocked() public boolean isLocked(). isPersistentObject() public boolean isPersistentObject(). 491 .unlock() method is called. Prevents any changes to this object by clients until the SharedObject.?so return a map containing all attributes of the shared object 3. sendMessage(String.14. Parameters return true if in a locked state. Locks the shared object instance.

Synopsis public interface ISharedObjectHandlerProvider extends.3. Parameters handler the handler object 4. Specified by: Method unregisterServiceHandler in interface IServiceHandlerProvider Unregister the shared object handler for calls without a service name.?so java. unregisterServiceHandler(String) public void unregisterServiceHandler(String name). } 4.15.?red5. 5.lock(). unlock() public void unlock().Package org. 4. public void unregisterServiceHandler(String name).?api. org.?server. registerServiceHandler(Object) public void registerServiceHandler(Object handler).?service.?server.List arguments). Parameters handler arguments the name of the handler to call a list of objects that should be passed as arguments to the handler 3. Register an object that provides methods which handle calls without a service name to a shared object.?IServiceHandl // Public Methods public void registerServiceHandler(Object handler).1. Interface ISharedObjectListener 492 . Unlocks a shared object instance that was locked with SharedObject. Send a message to a handler of the shared object. Interface ISharedObjectHandlerProvider Supports registration and lookup of shared object handlers.2. 4.?red5.util.?api.

Object value).server.4. } 5.IAttributeStore values). onSharedObjectClear(ISharedObjectBase) public void onSharedObjectClear(ISharedObjectBase so). public void onSharedObjectDelete(ISharedObjectBase so. onSharedObjectConnect(ISharedObjectBase) public void onSharedObjectConnect(ISharedObjectBase so).lang.String.util. public void onSharedObjectSend(ISharedObjectBase so. java. 5. String) public void onSharedObjectDelete(ISharedObjectBase so.?server.?red5.Object> values). Called when all attributes of a shared object are removed. 493 .Package org. String method. Parameters so the shared object 5. String key). Synopsis public interface ISharedObjectListener { // Public Methods public void onSharedObjectClear(ISharedObjectBase so).List params). public void onSharedObjectUpdate(ISharedObjectBase so. onSharedObjectDelete(ISharedObjectBase. public void onSharedObjectConnect(ISharedObjectBase so).red5. public void onSharedObjectUpdate(ISharedObjectBase so. org. Parameters so the shared object 5.api.2. java.?api.Map<java. java.3.1.util. public void onSharedObjectUpdate(ISharedObjectBase so. String key.?so Notifications about shared object updates. Called when a client connects to a shared object.lang. public void onSharedObjectDisconnect(ISharedObjectBase so).

Called when a shared object method call is sent. IAttributeStore) public void onSharedObjectUpdate(ISharedObjectBase so. onSharedObjectSend(ISharedObjectBase. onSharedObjectUpdate(ISharedObjectBase. Map<String.lang. org. Called when multiple attributes of a shared object are updated.IAttributeStore values). Parameters so values the shared object the new attributes of the shared object 5.?server.Map<java. 494 .api.?so String key).?api. Called when a client disconnects from a shared object. onSharedObjectDisconnect(ISharedObjectBase) public void onSharedObjectDisconnect(ISharedObjectBase so).List params).?red5.String. String.Object> values).5. Parameters so key the shared object the name of the attribute to delete 5.6.7. Called when an attribute is deleted from the shared object. String method. onSharedObjectUpdate(ISharedObjectBase. Called when multiple attributes of a shared object are updated.Package org.8.lang.util.red5. Object>) public void onSharedObjectUpdate(ISharedObjectBase so. java. java. List) public void onSharedObjectSend(ISharedObjectBase so. java. Parameters so the shared object 5. Parameters so method params the shared object the method name to call the arguments 5.server.util.

?api. Interface ISharedObjectSecurity Interface for handlers that control access to shared objects.api. String name.9. Called when a shared object attribute is updated.util. public boolean isSendAllowed(ISharedObject so.server. Object value). Object) public void onSharedObjectUpdate(ISharedObjectBase so.IScope scope. public boolean isCreationAllowed(org. onSharedObjectUpdate(ISharedObjectBase. String key. 6. String key. } 6.Package org. String message. isConnectionAllowed(ISharedObject) public boolean isConnectionAllowed(ISharedObject so).1.2. Synopsis public interface ISharedObjectSecurity { // Public Methods public boolean isConnectionAllowed(ISharedObject so). Parameters so key value the shared object the name of the attribute the value of the attribute 6.List arguments). public boolean isWriteAllowed(ISharedObject so. java. String key). String. 495 .?server.?red5. public boolean isDeleteAllowed(ISharedObject so. boolean persistent). Object value). Check if a connection to the given existing shared object is allowed.red5.?so Parameters so values the shared object the new attributes of the shared object 5.

?red5.?api. String.red5. String name.3. isCreationAllowed(IScope. isDeleteAllowed(ISharedObject. Parameters scope name persistent return 6.5. String.util. Check if the deletion of a property is allowed on the given shared object.IScope scope.Package org.List arguments). Parameters so message arguments return 496 . isSendAllowed(ISharedObject. Check if sending a message to the shared object is allowed.?so Parameters so return 6. boolean) public boolean isCreationAllowed(org. String key). Parameters so key return 6. Check if the a shared object may be created in the given scope. String message. String) public boolean isDeleteAllowed(ISharedObject so. boolean persistent). List) public boolean isSendAllowed(ISharedObject so.server. java.?server.api.4.

Object) public boolean isWriteAllowed(ISharedObject so.ISharedObjectSecurity> getSharedObjectSecurity().Set<org.?server. String key. Name of a bean defining that scope service. String.?red5. 7. Check if a modification is allowed on the given shared object.server.2.?api.util. 7. BEAN_NAME public static final String BEAN_NAME = "sharedObjectSecurityService".red5. public void registerSharedObjectSecurity(ISharedObjectSecurity handler).3.6.?server.Set<org. // Public Methods public java.api. Synopsis public interface ISharedObjectSecurityService extends.server.1.red5.api. public void unregisterSharedObjectSecurity(ISharedObjectSecurity handler).util. isWriteAllowed(ISharedObject. Object value).ISharedObjectSecurity> getSharedObjectSecurity().so.?IScopeService { // Public Static Fields public static final String BEAN_NAME = "sharedObjectSecurityService". getSharedObjectSecurity() public java. Get handlers that protect shared objects. org. Parameters return list of handlers 497 .Package org.?api. } 7.?red5. Parameters so key value return 7.?so 6.so. Interface ISharedObjectSecurityService Service that supports protecting access to shared objects.

red5.?red5.util. unregisterSharedObjectSecurity(ISharedObjectSecurity) public void unregisterSharedObjectSecurity(ISharedObjectSecurity handler).red5.api. public ISharedObject getSharedObject(org.red5.red5.server. Parameters handler Handler to add.Package org. String name).Set<java.IScope scope.?api. String name). } 498 .red5. 7.?red5.server.?server. public boolean hasSharedObject(org. registerSharedObjectSecurity(ISharedObjectSecurity) public void registerSharedObjectSecurity(ISharedObjectSecurity handler).server.IScope scope).api.?so 7. String name. String name.?api.IScope scope. // Public Methods public boolean clearSharedObjects(org. boolean persistent). boolean persistent).?IScopeService { // Public Static Fields public static final String BEAN_NAME = "sharedObjectService". Synopsis public interface ISharedObjectService extends.IScope scope.api. 8.1.lang. public java.IScope scope.api. Add handler that protects shared objects. Interface ISharedObjectService Service that manages shared objects for given scope. public ISharedObject getSharedObject(org.red5.IScope scope.String> getSharedObjectNames(org. Parameters handler Handler to remove. 8.?server.server. org. public boolean createSharedObject(org.api.5. Remove handler that protects shared objects.server.api. String name).server.4.

Create a new shared object. followed by any two characters. String name. the persistent store is also cleared. String. all the shared objects within this directory are cleared. The last element in the path can contain wildcard patterns (for example.?so 8.red5. String name).?api.server. false. If a directory name matches this specification.red5.IScope scope. no shared objects are deleted. String) public boolean clearSharedObjects(org. Specifying a slash (/) clears all the shared objects associated with an application instance. /foo/bar clears the shared object /foo/bar.?red5.api. boolean) public boolean createSharedObject(org. 8. Parameters 499 .api. which can include a slash (/) as a delimiter between directories in the path.server. it will return false. if bar is a directory name. If you call the clearSharedObjects() method and the specified path matches a shared object that is currently active. the method returns true only if all the shared objects matching the wildcard pattern were successfully deleted. createSharedObject(IScope. boolean persistent).3. /foo/bar/XX?? clears all shared objects that begin with XX. The bar directory is also deleted if no persistent shared objects are in use within this namespace.Package org.2. The name parameter specifies the name of a shared object. Parameters scope name return the scope to check for the shared object the name of the shared object true if the shared object at the specified path was deleted. If using wildcard characters to delete multiple files. otherwise. /foo/bar/* clears all shared objects stored under the instance directory /foo/bar. and a "clear" event is sent to all subscribers of the shared object.IScope scope. all its properties are deleted. Deletes persistent shared objects specified by name and clears all properties from active shared objects (persistent and nonpersistent). clearSharedObjects(IScope. The following values are possible for the soPath parameter: / clears all local and persistent shared objects associated with the instance.?server. otherwise. If it is a persistent shared object. The clearSharedObjects() method traverses the shared object hierarchy along the specified path and clears all the shared objects. a question mark [?] and an asterisk [*]) or a shared object name.

getSharedObject(IScope.red5.red5.server.IScope scope.5. String.red5.Set<java. getSharedObjectNames(IScope) public java. Parameters scope return the scope to return the shared object names from set containing the shared object names 8.api.?red5.?api. or null if not found 8.IScope scope.6.IScope scope).?server. Get a shared object by name and create it if it doesn't exist.util.red5. Parameters scope name persistent return the scope to get the shared object from the name of the shared object should the shared object be created persistent the shared object 8.Package org.server.4.api. String name.api. Parameters scope name return the scope to get the shared object from the name of the shared object shared object. Get a set of the shared object names.7.IScope scope. otherwise false 8. Get a shared object by name. String) public boolean hasSharedObject(org. boolean) public ISharedObject getSharedObject(org.server. getSharedObject(IScope. boolean persistent). String name).server. 500 .String> getSharedObjectNames(org.?so scope name persistent return the scope to create the shared object in the name of the shared object will the shared object be persistent true if the shared object was created. String) public ISharedObject getSharedObject(org. hasSharedObject(IScope.api.lang.

?api. Parameters scope name return the scope to check for the shared object the name of the shared object true if the shared object exists.?red5. otherwise false 501 .?server.Package org.?so String name). Check if a shared object exists.

?red5. getMaxSubscribers() public int getMaxSubscribers(). Interface IClientBroadcastStreamStatistics Statistical informations about a stream that is broadcasted by a client. public int getTotalSubscribers().4.?IStrea // Public Methods public int getActiveSubscribers().?server. Synopsis public interface IClientBroadcastStreamStatistics extends. getActiveSubscribers() public int getActiveSubscribers(). public int getMaxSubscribers(). Parameters return number of subscribers 1. 1.?statistics. Return maximum number of concurrent subscribers.1. getBytesReceived() public long getBytesReceived(). } 1. Return total number of bytes received from client for this stream. Return current number of subscribers. public long getBytesReceived(). public String getPublishedName().3.?api. Parameters 502 .2. public String getSaveFilename(). Parameters return number of bytes 1.1. org.

publish on client side in SWF. Return total number of subscribers.?api. Get the filename the stream is being saved as.?statistics.?api.7. getPublishedName() public String getPublishedName().?red5.6.?statistics return number of subscribers 1. Interface IPlaylistSubscriberStreamStatistics Statistical informations about a stream that is subscribed by a client. getTotalSubscribers() public int getTotalSubscribers().?server. Parameters return The filename relative to the scope or null if the stream is not being saved.?red5.?server. Publish name is the value of the first parameter had been passed to NetStream. 1. Get stream publish name. getSaveFilename() public String getSaveFilename(). Synopsis public interface IPlaylistSubscriberStreamStatistics extends. 2. Parameters return number of subscribers 2.5. org.Package org. public double getEstimatedBufferFill(). } 503 . Parameters return Stream publish name 1.?ISt // Public Methods public long getBytesSent(). public int getClientBufferDuration().1.

public int getDepth(). public int getActiveConnections().?server. getBytesSent() public long getBytesSent().4. public int getActiveSubscopes(). public String getName().?server. Parameters return the buffer duration in milliseconds 2. Return total number of bytes sent to the client from this stream.?red5. 3. Interface IScopeStatistics Statistical informations about a scope. public int getMaxConnections().2.?red5. Parameters return number of bytes 2.Package org.?statistics 2. Return estimated fill ratio of the client buffer. Synopsis public interface IScopeStatistics extends.1.?api. public int getMaxClients(). org.3.?IStatisticsBase { // Public Methods public int getActiveClients(). Parameters return fill ratio in percent 3. Return the buffer duration as requested by the client.?api. 504 .?statistics. public int getMaxSubscopes(). getEstimatedBufferFill() public double getEstimatedBufferFill(). getClientBufferDuration() public int getClientBufferDuration().

Application scope depth is 0x01. public int getTotalSubscopes(). getActiveSubscopes() public int getActiveSubscopes(). Room depth is 0x02.4. how far down the scope tree is it. 0x03 and so forth. Parameters return number of connections 3.5. Return number of currently existing subscopes.?statistics public String getPath(). Get the scopes depth. getDepth() public int getDepth(). Parameters 505 . public int getTotalClients(). Parameters return number of subscopes 3. The lowest depth is 0x00. getActiveClients() public int getActiveClients(). Return current number of connections to the scope.?server. getActiveConnections() public int getActiveConnections(). public int getTotalConnections().3. Parameters return number of clients 3. } 3.2. the depth of Global scope.?api.Package org.?red5. Return current number of clients connected to the scope.

Parameters return Absolute scope path 506 . getName() public String getName().9. someroom. Return maximum number of clients concurrently connected to the scope. getMaxClients() public int getMaxClients(). getMaxConnections() public int getMaxConnections(). Get the full absolute path.7.Package org. host/myapp/someroom.?statistics return the depth 3. Parameters return number of subscopes 3.6. Return maximum number of concurrent connections to the scope.10. getPath() public String getPath(). Return maximum number of concurrently existing subscopes. Eg. Parameters return number of connections 3.?red5. getMaxSubscopes() public int getMaxSubscopes(). Parameters return the name 3.?server. Parameters return number of clients 3.8.?api. Get the name of this scope. Eg.

Parameters return number of clients 3. Synopsis public interface ISharedObjectStatistics extends.?statistics 3. public String getName(). public int getTotalDeletes().?server. public int getTotalChanges(). org. Return total number of clients connected to the scope. Return total number of connections to the scope. 507 .?api. Parameters return number of subscopes created 4.?server. Interface ISharedObjectStatistics Statistics informations about a shared object. getTotalClients() public int getTotalClients().13. getTotalSubscopes() public int getTotalSubscopes().?red5.11. public int getTotalSends().1. Parameters return number of connections 3.?api. public int getVersion().12. 4.?statistics.?IStatisticsBase // Public Methods public int getActiveListeners(). Return total number of subscopes created. public int getMaxListeners().Package org. public int getTotalListeners().?red5. getTotalConnections() public int getTotalConnections().

getActiveListeners() public int getActiveListeners(). Parameters 508 .?api. Return number of attribute changes. Return number of attribute deletes.?red5. Parameters return number of changes 4.2. Parameters return number of listeners 4. Return the name of the shared object. getTotalChanges() public int getTotalChanges().?statistics public boolean isPersistentObject().6.3. getTotalDeletes() public int getTotalDeletes().5.?server. Return maximum number of concurrent subscribed listenes. Return current number of subscribed listeners. Parameters return the name of the shared object 4.4. getName() public String getName(). Parameters return number of listeners 4.Package org. getMaxListeners() public int getMaxListeners(). } 4.

Parameters return the version 4.9. Return number of times a message was sent. Parameters return number of listeners 4.10. Return the version number of the shared object. getTotalSends() public int getTotalSends().?api.?red5.1. Interface IStatisticsBase Base class for all statistics informations. 5. Check if the shared object is persistent.7.?statistics return number of deletes 4.8. isPersistentObject() public boolean isPersistentObject().?server. getTotalListeners() public int getTotalListeners(). Synopsis public interface IStatisticsBase { // Public Methods public long getCreationTime(). Parameters return number of sends 4. Parameters return True if the shared object is persistent. 509 . getVersion() public int getVersion(). Return total number of subscribed listeners. otherwise False 5.Package org.

Set<java.ISharedObjectStatistics> getSharedObjects(Stri public void updateScopeStatistics(String path) throws ScopeNotFoundException.1.red5.so.String> getScopes(String path) throws ScopeNotFoundException.server. Return the timestamp the object was created. Sometime in the future.Set<java.IScope scope) public java.ISharedObject getScopeStatisticsSO(org. Parameters return the timestamp in milliseconds since midnight. Interface IStatisticsService Statistics methods for Red5.?server.util. public void updateSharedObjectStatistics(String path.red5.server. 510 .Package org. public java.Set<java. the updates on the shared objects will be done automatically so a client doesn't need to poll for them.2.util. 1970 UTC.so.api. They can be used to poll for updates of given elements inside the server.String> getScopes().red5.api.?statistics } 5.red5.red5. Synopsis public interface IStatisticsService { // Public Methods public org.statistics. SharedObjectException. public org. Each property holds a Map containing key/value mappings of the corresponding attributes.api. 6.server.lang.lang.util. Statistics data will be stored as properties of different shared objects. getCreationTime() public long getCreationTime().util. String name) throws ScopeNotFoundException.IScope public java.?api.Set<org.?red5. getScopes() public java.api.ISharedObject getSharedObjectStatisticsSO(org. The property names are scopeName for scope attributes and scopeName|sharedObjectName for shared object attributes.server.server.lang. 6. Use getScopeStatisticsSO and getSharedObjectStatisticsSO to get these shared objects.String> getScopes().2. January 1.api. } 6.

so.ISharedObject getScopeStatisticsSO(org. getSharedObjectStatisticsSO(IScope) public org.?api.3.api. Return a list of all scopes that currently exist on the server below a current path.red5.server.?statistics Return a list of all scopes that currently exist on the server. list of scope names ScopeNotFoundException if the path on the server doesn't exist 6.5.6.ISharedObjectStatistics> getSharedObjects(String Return informations about shared objects for a given scope.Set<org.ISharedObject getSharedObjectStatisticsSO(org. 511 .String> getScopes(String path) throws ScopeNotFoundException.IScope scope).Package org. Return the shared object that will be used to keep scope statistics.server. list of informations about shared objects 6.util. Parameters scope A scope to return the shared object for. getSharedObjects(String) public java.Set<java. Parameters scope return A scope to return the shared object for.red5.?server. Parameters return list of scope names 6.api. getScopes(String) public java.red5.red5.api.red5.lang.?red5. the shared object containing scope statistics 6.api.util.IScope s Return the shared object that will be used to keep SO statistics.server.4. getScopeStatisticsSO(IScope) public org. Parameters path return Path to scope to return shared object names for.api.statistics.so. Parameters path return Path to start looking for scopes.server.server.

Synopsis public interface IStreamStatistics extends. ScopeNotFoundException if the given scope doesn't exist SharedObjectException if no shared object with the given name exists 7. Name of shared object to update. 7. 512 .?server.?api.?statistics.?api. updateScopeStatistics(String) public void updateScopeStatistics(String path) throws ScopeNotFoundException.7.1. Update statistics for a given scope. updateSharedObjectStatistics(String. } 7.8.2. Interface IStreamStatistics Base class for all stream statistics. org.?red5.?IStatisticsBase { // Public Methods public int getCurrentTimestamp(). ScopeNotFoundException if the given scope doesn't exist 6.?server. String) public void updateSharedObjectStatistics(String path. String name) throws ScopeNotFoundException.?statistics return the shared object containing SO statistics 6. Parameters path Path to scope to update.?red5. Parameters path name Path to scope that contains the shared object. getCurrentTimestamp() public int getCurrentTimestamp(). SharedObjectException.Package org. Update informations about a shared object in a given scope.

?statistics Return the currently active timestamp inside the stream.?server. Parameters return the timestamp in milliseconds 513 .Package org.?api.?red5.

4. Keeps track of current. // Public Methods public void decrement(). toString . hashCode . getClass . getCurrent() public int getCurrent(). public int getCurrent().1. Parameters 514 . public int getMax(). Class StatisticsCounter Counts numbers used by the statistics. finalize . Decrement statistics by one. Synopsis public class StatisticsCounter { // Public Constructors public StatisticsCounter(). wait 1.2. notify .3. equals . public int getTotal(). Get maximum number. 1. public void increment(). 1. } Methods inherited from java. decrement() public void decrement(). getMax() public int getMax(). notifyAll . Get current number. maximum and total numbers.1.Object: clone .lang. Parameters return 1.

?api. 515 . Get total number. Parameters return 1.?red5.?support return 1.?server. increment() public void increment().5. Increment statistics by one. getTotal() public int getTotal().?statistics.Package org.6.

api.messaging.stream.?server.util. boolean isAppend) throws IOException.IStreamListener> getStreamListeners(). public void setPublishedName(String name).server.3.?api. Synopsis public interface IBroadcastStream extends. public String getPublishedName(). getProvider() public org. Interface IBroadcastStream A broadcast stream is a stream source to be subscribed by clients.Collection<org. public void removeStreamListener(IStreamListener listener). public org. Parameters listener the listener to add 1.red5. public java. Broadcast stream can be saved at server-side. Provider objects are object that Parameters return 516 .red5.server.server. Get the provider corresponding to this stream.?stream.?red5.1.1. Add a listener to be notified about received packets. ResourceNotFoundException. public String getSaveFilename().IProvider getProvider().2. To subscribe a stream from your client Flash application use NetStream. addStreamListener(IStreamListener) public void addStreamListener(IStreamListener listener).messaging. public void saveAs(String filePath. 1.red5. ResourceExistException. } 1. org.IProvider getProvider().?IStream { // Public Methods public void addStreamListener(IStreamListener listener).play method.

getSaveFilename() public String getSaveFilename(). Return registered stream listeners.6.4.?red5. ResourceExistException. Get the filename the stream is being saved as.5.?server. Parameters listener the listener to remove 1. boolean isAppend) throws IOException.stream.server. boolean) public void saveAs(String filePath. Parameters return Stream publish name 1. Parameters return The filename relative to the scope or null if the stream is not being saved.7. removeStreamListener(IStreamListener) public void removeStreamListener(IStreamListener listener).IStreamListener> getStreamListeners().Package org.?api. 1. ResourceNotFoundException. saveAs(String. getStreamListeners() public java.red5. Parameters 517 . Publish name is the value of the first parameter had been passed to NetStream. getPublishedName() public String getPublishedName().publish on client side in SWF.Collection<org. Parameters return the registered listeners 1.8. Get stream publish name. Remove a listener from being notified about received packets. Save the broadcast stream as a file.?stream 1.api.util.

List<java.server. String name). } 2.server. getBroadcastStream(IScope. String name).?server.Package org. ResourceExistException Resource exist when trying to create.red5.util.9.1. File could not be created/written to.red5.api. Whether to append to the end of file.api. String) public IBroadcastStream getBroadcastStream(org.?stream filePath isAppend IOException The path of the file relative to the scope.?api. String name). // Public Methods public IBroadcastStream getBroadcastStream(org.red5.api. Get a broadcast stream by name Parameters scope name the scope to return the stream from the name of the broadcast 518 .IScope scope. 1.server.IScope scope).?red5.api. Parameters name Set stream publish name 2.IScope scope. ResourceNotFoundException Resource not exist when trying to append. public java.String> getBroadcastStreamNames(org.IScope scope. setPublishedName(String) public void setPublishedName(String name).lang.red5. Interface IBroadcastStreamService public interface IBroadcastStreamService { // Public Static Fields public static final String BROADCAST_STREAM_SERVICE = "broadcastStreamService". public boolean hasBroadcastStream(org.server.

getStatistics() public org. Interface IClientBroadcastStream A broadcast stream that comes from client. Return statistics about the stream. hasBroadcastStream(IScope.lang.api.api.?api.IScope scope.server.?stream return broadcast stream object 2.2.red5. } 3.3.String> getBroadcastStreamNames(org.1.IClientBroadcastStreamStatistics getStatistics().server.? // Public Methods public org.server. 3. getBroadcastStreamNames(IScope) public java. org.util.red5. String) public boolean hasBroadcastStream(org. otherwise false 3.?stream.red5.?api. Get a set containing the names of all the broadcasts Parameters scope return the scope to search for streams set containing all broadcast names 2.api.2.List<java.?red5. String name). Does the scope have a broadcast stream registered with a given name Parameters scope name return the scope to check for the stream name of the broadcast true is a stream exists.server.Package org. Parameters return statistics 519 .IScope scope).?server. public void startPublishing().statistics.api. org.?IClientStream.?server. Synopsis public interface IClientBroadcastStream extends.?red5.IClientBroadcastStreamStatistics getStatistics().statistics.red5.

1. public int getStreamId(). org. getConnection() public IStreamCapableConnection getConnection(). Synopsis public interface IClientStream extends.?IStream. getStreamId() public int getStreamId(). // Public Methods public IStreamCapableConnection getConnection(). startPublishing() public void startPublishing(). Parameters return the connection object or null if the connection is no longer active 4.?red5. public static final String MODE_RECORD = "record".?red5.?api.3. Get connection containing the stream. org. public static final String MODE_LIVE = "live".?a // Public Static Fields public static final String MODE_APPEND = "append". 4. Get stream id allocated in a connection. public void setClientBufferDuration(int bufferTime).?stream 3. Parameters return 520 . Notify client that stream is ready for publishing.?stream.Package org.?server.?server.3.?server.?red5. public static final String MODE_READ = "read". } 4.?api.2. 4. Interface IClientStream A stream that is bound to a client.

Interface IOnDemandStream Extends stream to add methods for on demand access.3. setClientBufferDuration(int) public void setClientBufferDuration(int bufferTime). public void play().?red5. Set the buffer duration for this stream as requested by the client. public boolean isPlaying(). public void play(int length).?server.?api.?IStream { // Public Methods public boolean isPaused().?stream. public void seek(int position). public void stop(). public void pause().Package org. isPaused() public boolean isPaused(). isPlaying() public boolean isPlaying().1. public boolean isStopped().?stream 4. Is the stream paused Parameters return true if the stream is paused 5.?api. public void resume(). 521 . org. Parameters bufferTime duration in ms the client wants to buffer 5. } 5.?server. Synopsis public interface IOnDemandStream extends.4.2.?red5. 5.

Seek to the keyframe nearest to position Parameters 522 .6. resume() public void resume().Package org. Pause the stream 5. seek(int) public void seek(int position).7. Is the stream stopped Parameters return true if the stream is stopped 5.?stream Is the stream playing Parameters return true if the stream is playing 5. play() public void play(). Start playback 5.?api.5. isStopped() public boolean isStopped().?red5.8. Parameters length maximum duration in milliseconds 5.?server. Resume a paused stream 5. pause() public void pause(). Start playback with a given maximum duration.9. play(int) public void play(int length).4.

getOnDemandStream(IScope.IScope scope. hasOnDemandStream(IScope.red5.1. public boolean hasOnDemandStream(org.IScope scope. String) public IOnDemandStream getOnDemandStream(org.?IScopeService { // Public Static Fields public static final String BEAN_NAME = "onDemandStreamService".?api.?server.IScope scope.?stream position position in milliseconds 5.api. Has the service an on-demand stream with the passed name? Parameters scope name the scope to check for the stream the name of the stream 523 .red5. String) public boolean hasOnDemandStream(org. String name).?red5.server.?red5.server. } 6. stop() public void stop(). // Public Methods public IOnDemandStream getOnDemandStream(org.server.2.Package org.?api. String name).?server. this resets the position to the start 6.IScope scope.10. Get a stream that can be used for playback of the on-demand stream Parameters scope name return the scope to return the stream from the name of the stream the on-demand stream 6. org. Interface IOnDemandStreamService public interface IOnDemandStreamService extends. Specified by: Method stop in interface IStream Stop the stream. String name).red5.api.api.api.red5. String name).server.

Play length in milliseconds. public long getSize(). Synopsis public interface IPlayItem { // Public Methods public long getLength(). getLength() public long getLength(). Get a message input for play. 524 . Interface IPlayItem Playlist item. Parameters return 7. Each playlist item has name.4. public org. Parameters return 7.Package org. The VOD or Live stream provider is found according to this name. getMessageInput() public org. getName() public String getName(). public String getName(). Get name of item.red5. 7. public long getStart(). false otherwise 7.messaging. } 7.1.?red5.messaging.red5.IMessageInput getMessageInput().?api.3.server.?server. start time. This object overrides the default algorithm for finding the appropriate VOD or Live stream provider according to the item name.?stream return true if the stream exists.server.2. length in milliseconds and message input source.IMessageInput getMessageInput().

public IPlayItem getItem(int index). Start time in milliseconds.5.1.6. Size in bytes. public IPlayItem getCurrentItem(). getStart() public long getStart().?stream Parameters return 7. public void addItem(IPlayItem item. public int getItemSize(). getSize() public long getSize().?red5. Parameters return 8. public int getCurrentItemIndex(). public boolean isRandom(). public boolean isRepeat().?server.?api. public boolean isRewind(). 525 . public boolean hasMoreItems().Package org. int index). Parameters return 7. Interface IPlaylist Playlist 8. Synopsis public interface IPlaylist { // Public Methods public void addItem(IPlayItem item).

public void setPlaylistController(IPlaylistController controller). public void removeAllItems(). public void setRepeat(boolean repeat). Add an item to the list. addItem(IPlayItem. int index). public void setRandom(boolean random). public void previousItem(). Parameters item Playlist item 8.?red5. Get currently playing item Parameters return Item 526 .?server.?stream public void nextItem().2. addItem(IPlayItem) public void addItem(IPlayItem item). int) public void addItem(IPlayItem item. public void removeItem(int index). Parameters item index Playlist item Index in list 8. Add an item to specific index. public void setItem(int index). } 8.3.?api.4. public void setRewind(boolean rewind).Package org. getCurrentItem() public IPlayItem getCurrentItem().

7.6. Return number of items in list Parameters return Number of items in list 8. Parameters return true if more items are available. Parameters return Currently playing item index.9. Whether items are randomly played. Get currently playing item index.8. 8.?red5. Parameters index return Item index Item at that index in list 8. getCurrentItemIndex() public int getCurrentItemIndex(). false otherwise 527 . isRandom() public boolean isRandom(). Check if the playlist has more items after the currently playing one. false otherwise 8. getItem(int) public IPlayItem getItem(int index). getItemSize() public int getItemSize().?api.?stream 8. Parameters return true if shuffle is on for this list.Package org. hasMoreItems() public boolean hasMoreItems(). Get the item according to the index.?server.5.

Parameters return true if playlist is rewind on end. setItem(int) public void setItem(int index). removeAllItems() public void removeAllItems(). Remove an item from list.15.13. nextItem() public void nextItem().10. Set the current item for playing.Package org.11. isRewind() public boolean isRewind(). removeItem(int) public void removeItem(int index). previousItem() public void previousItem().12.?red5.?stream 8. Parameters return true if repeat mode is on for this playlist. 528 .?api.?server. false otherwise 8. 8.16. Parameters index Index in list 8.14. false otherwise 8. 8. 8. Whether rewind the list. Whether repeat playing an item. Go for next item decided by controller logic. Go for the previous played item. Remove all items. isRepeat() public boolean isRepeat().

Set list controller. setPlaylistController(IPlaylistController) public void setPlaylistController(IPlaylistController controller). Set whether repeat playing an item. Set whether items should be randomly played.1. Parameters rewind New vallue for rewind flag 9. Parameters controller Playlist controller 8.18. Interface IPlaylistController A play list controller that controls the order of play items. setRepeat(boolean) public void setRepeat(boolean repeat). Parameters repeat New value for item playback repeat flag 8.17.20. setRandom(boolean) public void setRandom(boolean random).?server.Package org. Parameters random Shuffle flag 8.?api. Set whether rewind the list. 9.?stream Parameters index Position in list 8.?red5.19. setRewind(boolean) public void setRewind(boolean rewind). Synopsis public interface IPlaylistController { // Public Methods 529 .

?red5. The previous item index to play. The current item index. Get previous item to play. nextItem(IPlaylist.3. public int previousItem(IPlaylist playlist.?stream public int nextItem(IPlaylist playlist. org. Interface IPlaylistSubscriberStream IPlaylistSubscriberStream has methods of both ISubscriberStream and IPlaylist but adds nothing new 10.server.?red5. } 9. int) public int previousItem(IPlaylist playlist.api.statistics. The next item index to play. -1 indicates to retrieve the first item for play.?server.IPlaylistSubscriberStreamStatistics getStatistics(). return 10.red5.Package org.?api.?ISubscriberStream // Public Methods public org. int) public int nextItem(IPlaylist playlist. int itemIndex). int itemIndex). int itemIndex). IPlaylist.?api. Parameters playlist itemIndex The related play list. -1 reaches the beginning. Synopsis public interface IPlaylistSubscriberStream extends. Parameters playlist itemIndex The related play list. Get next item to play. The current item index.?stream.2.itemSize indicated to retrieve the last item for play. } 530 . -1 reaches the end. int itemIndex). return 9.?server. previousItem(IPlaylist.1.

// Public Methods public void pause().api. } 11.?server.?red5. It represents a stream broadcasted from the server.red5. Parameters position new playback position in milliseconds 12.?server.1. Seek to a given position in the stream. Synopsis public interface IServerStream extends. Synopsis public interface ISingleItemSubscriberStream extends. 11.?server.?stream 10. Parameters return statistics 11.?stream.?api. Interface IServerStream IServerStream has both IPlaylist and IBroadcastStream methods but add nothing new. Toggles the paused state.?red5. org.?red5.?ISubscriberStre 531 . getStatistics() public org.2.3.server. Return statistics about this stream.?api. public void seek(int position).?stream. seek(int) public void seek(int position).IPlaylistSubscriberStreamStatistics getStatistics().1.Package org.?api.?server. 11. Interface ISingleItemSubscriberStream A subscriber stream that has only one item for play.2.statistics. org. org.?red5. 12. pause() public void pause().?IPlaylist.

13.server. } 12. setPlayItem(IPlayItem) public void setPlayItem(IPlayItem item).?red5. Interface IStream Base interface for stream objects. public void start(). Setter for property 'playItem'. Close this stream. Synopsis public interface IStream { // Public Methods public void close().?stream // Public Methods public void setPlayItem(IPlayItem item).3.IScope getScope(). } 13. Get Codec info for a stream. public void stop(). public org. public IStreamCodecInfo getCodecInfo().?server. 13.2. getCodecInfo() public IStreamCodecInfo getCodecInfo(). close() public void close(). public String getName().?api.Package org. A stream object is always associated with a scope. Parameters item Value to set for property 'playItem'.api. 532 . 13.red5.2.1.

getName() public String getName().?red5. 14. Interface IStreamAwareScopeHandler A scope handler that is stream aware.?server.IScope getScope().api.7.5. 13. This is just an id of the stream and NOT the name that is used at client side to subscribe to the stream.6. Parameters return scope object 13. IPlayItem item. Synopsis public interface IStreamAwareScopeHandler extends.?api. Get the name of the stream. getScope() public org. use getPublishedName() Parameters return the name of the stream 13. org.red5.server. The name is unique across the server. public void streamPlaylistItemPlay(IPlaylistSubscriberStream stream. Stop this stream.?IScopeHandler { // Public Methods public void streamBroadcastClose(IBroadcastStream stream). 14. For that name. 533 . stop() public void stop().1.?stream Parameters return 13. public void streamBroadcastStart(IBroadcastStream stream).?server. Get the scope this stream is associated with. Start this stream.?api.Package org.?red5. start() public void start().4.

IPlayItem. public void streamPlaylistVODItemSeek(IPlaylistSubscriberStream stream. IPlayItem item. public void streamRecordStart(IBroadcastStream stream).4. Notified when a broadcaster closes. } 14. boolean) public void streamPlaylistItemPlay(IPlaylistSubscriberStream stream.?api. int position).3.?stream boolean isLive).Package org. IPlayItem item. streamBroadcastClose(IBroadcastStream) public void streamBroadcastClose(IBroadcastStream stream). IPlayItem item. public void streamSubscriberClose(ISubscriberStream stream). int position). IPlayItem item.2. boolean isLive). public void streamPublishStart(IBroadcastStream stream). streamPlaylistItemPlay(IPlaylistSubscriberStream. public void streamPlaylistVODItemResume(IPlaylistSubscriberStream stream. public void streamPlaylistVODItemPause(IPlaylistSubscriberStream stream.?server. Parameters stream 14. 534 . public void streamSubscriberStart(ISubscriberStream stream). Parameters stream 14. IPlayItem item). public void streamPlaylistItemStop(IPlaylistSubscriberStream stream. int position).?red5. streamBroadcastStart(IBroadcastStream) public void streamBroadcastStart(IBroadcastStream stream). Notified when a broadcaster starts.

IPlayItem) public void streamPlaylistItemStop(IPlaylistSubscriberStream stream. streamPlaylistItemStop(IPlaylistSubscriberStream. Parameters stream item isLive TODO 14.?stream Notified when a playlist item plays. IPlayItem item.6.5. IPlayItem item).Package org.?api. Parameters stream item position 535 . IPlayItem. Parameters stream item 14. int position). Notified when a playlist item stops. streamPlaylistVODItemPause(IPlaylistSubscriberStream. int) public void streamPlaylistVODItemResume(IPlaylistSubscriberStream stream.7.?server. IPlayItem. IPlayItem item. streamPlaylistVODItemResume(IPlaylistSubscriberStream.?red5. Parameters stream item position 14. Notified when a playlist vod item resumes. Notified when a playlist vod item pauses. int position). int) public void streamPlaylistVODItemPause(IPlaylistSubscriberStream stream.

?red5.11.12. Parameters stream 14. IPlayItem. Parameters stream item position 14. int position). Notified when a subscriber closes.Package org. Notified when a playlist vod item seeks. streamSubscriberStart(ISubscriberStream) public void streamSubscriberStart(ISubscriberStream stream).?server. Parameters stream 14.9.?api. Parameters stream 14. A broadcast stream starts being recorded. streamPublishStart(IBroadcastStream) public void streamPublishStart(IBroadcastStream stream). A broadcast stream starts being published.8. int) public void streamPlaylistVODItemSeek(IPlaylistSubscriberStream stream. IPlayItem item.?stream 14. This will be called when the first video packet has been received. Notified when a subscriber starts.10. streamRecordStart(IBroadcastStream) public void streamRecordStart(IBroadcastStream stream). This will be called when the first video packet has been received. streamSubscriberClose(ISubscriberStream) public void streamSubscriberClose(ISubscriberStream stream). 536 . streamPlaylistVODItemSeek(IPlaylistSubscriberStream.

Interface IStreamCapableConnection A connection that supports streaming. Parameters streamId ID of stream to delete 15.?se // Public Methods public void deleteStreamById(int streamId). Synopsis public interface IStreamCapableConnection extends. 15. public IClientStream getStreamById(int streamId).3.1. public IClientBroadcastStream newBroadcastStream(int streamId). deleteStreamById(int) public void deleteStreamById(int streamId). public IPlaylistSubscriberStream newPlaylistSubscriberStream(int streamId). public void unreserveStreamId(int streamId). org.?api. } 15.?red5. public long getPendingVideoMessages(int streamId).?stream Parameters stream 15.?red5. public ISingleItemSubscriberStream newSingleItemSubscriberStream(int streamId). getPendingVideoMessages(int) public long getPendingVideoMessages(int streamId).?IConnection. public int reserveStreamId(). Total number of video messages that are pending to be sent to a stream.?server.Package org.?red5. org. Deletes the stream with the given id. Parameters streamId return Stream id Number of pending video messages 537 .2.?server.?api.

?stream 15. Parameters streamId return Stream id New subscriber stream that can play only one item 15. Create a stream that can play a list.8. Return a reserved stream id for use. Create a broadcast stream.Package org. Get a stream by its id.4. Create a stream that can play only one item.7. newBroadcastStream(int) public IClientBroadcastStream newBroadcastStream(int streamId). Parameters streamId return Stream id New broadcast stream 15. newSingleItemSubscriberStream(int) public ISingleItemSubscriberStream newSingleItemSubscriberStream(int streamId). the base is 1. Parameters streamId return Stream id Stream with given id 15. Parameters streamId return Stream id New stream that can play sequence of items 15.?server.6. newPlaylistSubscriberStream(int) public IPlaylistSubscriberStream newPlaylistSubscriberStream(int streamId).5. According to FCS/FMS regulation.?red5.?api. Parameters 538 . reserveStreamId() public int reserveStreamId(). getStreamById(int) public IClientStream getStreamById(int streamId).

?server. Synopsis public interface IStreamCodecInfo { // Public Methods public String getAudioCodecName(). public IVideoStreamCodec getVideoCodec(). Return video codec Parameters return Video codec used by stream codec 539 . Interface IStreamCodecInfo Stream codec information 16.9.?red5. } 16.3.?stream return Reserved stream id 15. getVideoCodec() public IVideoStreamCodec getVideoCodec(). Unreserve this id for future use.2.Package org.1. unreserveStreamId(int) public void unreserveStreamId(int streamId).?api. public boolean hasAudio(). getAudioCodecName() public String getAudioCodecName(). public String getVideoCodecName(). Parameters streamId ID of stream to unreserve 16. public boolean hasVideo(). Getter for audio codec name Parameters return Audio codec name 16.

?red5. 17. } 540 .5.stream. String name.IStreamFilenameGenerator.red5. Interface IStreamFilenameGenerator A class that can generate filenames for streams.?api. org. org.stream. getVideoCodecName() public String getVideoCodecName().?api.api.IScope scope.IScope scope.?stream 16. Has audio support? Parameters return true if stream codec has audio support. Synopsis public interface IStreamFilenameGenerator extends.GenerationType public String generateFilename(org.server.server.red5. hasAudio() public boolean hasAudio().4.GenerationType public boolean resolvesToAbsolutePath().red5. String name. hasVideo() public boolean hasVideo().?server. String extension.6. false otherwise 16. org. Getter for video codec name Parameters return Video codec name 16.Package org.server.red5.1.IStreamFilenameGenerator. // Public Methods public String generateFilename(org. false otherwise 17.api.api.?IScopeService { // Public Static Fields public static final String BEAN_NAME = "streamFilenameGenerator". Has video support? Parameters return true if stream codec has video support.?server.server.?red5.api.

Name of the bean to setup a custom filename generator in an application.red5.getContext().?stream 17.IScope scope.IScope scope.GenerationType) public String generateFilename(org.stream. BEAN_NAME public static final String BEAN_NAME = "streamFilenameGenerator". True if returned filename is an absolute path. IStreamFilenameGenerator.server. String name.IStreamFilenameGenerator.GenerationType ty Generate a filename with an extension.api.?api.api. String name. org.GenerationType ty Generate a filename without an extension.IStreamFilenameGenerator. String.api.Package org. If relative to application.?red5.red5. Parameters scope name type return Scope to use Stream name Generation strategy (either playback or record) Full filename 17.4. 17.2. IStreamFilenameGenerator.api.server. String extension. else relative to application.3.5. String.stream.getResources(fileName) 541 . String.red5. you need to use scope.GenerationType) public String generateFilename(org. resolvesToAbsolutePath() public boolean resolvesToAbsolutePath().?server.server.red5. Parameters scope name extension type return Scope to use Stream filename Extension Generation strategy (either playback or record) Full filename with extension 17. generateFilename(IScope. org.server. generateFilename(IScope.

red5. toString . name . public void onBroadcastStreamSubscribe(IBroadcastStream stream).api.server. ordinal . compareTo .Enum: clone . public static final org.getFile() to resolve this to a file.GenerationType PLAYBACK .GenerationType valueOf(String na public static org. 542 .GenerationType[] values(). Synopsis public static final class IStreamFilenameGenerator.red5. public void onStreamPublishStart(IStream stream). public void onOnDemandStreamDisconnect(IOnDemandStream stream).?Enum { // Public Static Fields public static final org. notifyAll .1.api. If absolute (ie returns true) simply use new File(generateFilename(scope.server.IStreamFilenameGenerator. java.api.lang.server.GenerationType Possible filename generation types. public void onBroadcastStreamUnsubscribe(IBroadcastStream stream). 18.?api. notify . public void onOnDemandStreamConnect(IOnDemandStream stream). Class IStreamFilenameGenerator. public void onRecordStreamStart(IStream stream).lang. name)) Parameters return 18.stream.stream.stream. hashCode .?stream [0]. equals .red5.Object: getClass . wait 19.Package org.red5.?red5.stream.?lang.?server.server. // Public Static Methods public static org. public void onRecordStreamStop(IStream stream).api.IStreamFilenameGenerator.IStreamFilenameGenerator. valueOf Methods inherited from java. Interface IStreamHandler public interface IStreamHandler { // Public Methods public void onBroadcastStreamStart(IStream stream). getDeclaringClass . finalize .GenerationType RECORD .GenerationType extends. } Methods inherited from java.IStreamFilenameGenerator.

5. onBroadcastStreamStart(IStream) public void onBroadcastStreamStart(IStream stream).2.1.?red5. onOnDemandStreamDisconnect(IOnDemandStream) public void onOnDemandStreamDisconnect(IOnDemandStream stream).Package org. Called when a client subscribes to a broadcast Parameters stream the stream object 19. Called when a client unsubscribes from a broadcast Parameters stream the stream object 19. Called when a client connects to an on demand stream Parameters stream the stream object 19.4.?api. onOnDemandStreamConnect(IOnDemandStream) public void onOnDemandStreamConnect(IOnDemandStream stream).3. onBroadcastStreamUnsubscribe(IBroadcastStream) public void onBroadcastStreamUnsubscribe(IBroadcastStream stream). Called when the broadcast starts Parameters stream the stream object 19.?server. } 19. Called when a client disconnects from an on demand stream Parameters 543 .?stream public void onStreamPublishStop(IStream stream). onBroadcastStreamSubscribe(IBroadcastStream) public void onBroadcastStreamSubscribe(IBroadcastStream stream).

onRecordStreamStart(IStream) public void onRecordStreamStart(IStream stream). Interface IStreamListener Listener that is notified about packets received from a stream. Called when the client stops publishing Parameters stream the stream object 20.9.7. Called when a recording starts Parameters stream the stream object 19. 20.8. 544 . Synopsis public interface IStreamListener { // Public Methods public void packetReceived(IBroadcastStream stream. onStreamPublishStop(IStream) public void onStreamPublishStop(IStream stream).?stream stream the stream object 19. Called when a recording stops Parameters stream the stream object 19.1.?red5. onStreamPublishStart(IStream) public void onStreamPublishStart(IStream stream). Called when the client begins publishing Parameters stream the stream object 19.6.Package org.?api. onRecordStreamStop(IStream) public void onRecordStreamStop(IStream stream).?server.

Package org.?stream IStreamPacket packet).?api.common. IStreamPacket) public void packetReceived(IBroadcastStream stream.?red5.mina.mina. Parameters stream packet the stream the packet has been received for the packet received 21.apache. Parameters return the contents 21. Synopsis public interface IStreamPacket { // Public Methods public org. getDataType() public byte getDataType(). Interface IStreamPacket Packet containing stream data.ByteBuffer getData().3.apache. public int getTimestamp().common. This is one of the TYPE_ constants. public byte getDataType().?server.1. Parameters 545 .2. getData() public org. A packet has been received from a stream. } 20. } 21. Packet contents. Type of this packet. IStreamPacket packet).2.ByteBuffer getData(). 21. packetReceived(IBroadcastStream.

Interface IStreamPublishSecurity 546 . int start. Duration to play (in milliseconds).api. Parameters return the timestamp in milliseconds 22.?server. Position to start playback from (in milliseconds).?api. boolean) public boolean isPlaybackAllowed(org.?stream return the type 21. int. Name of the stream to play.2. int.?red5.Package org.IScope scope.red5. isPlaybackAllowed(IScope. String name. } 22. int start. Check if playback of a stream with the given name is allowed.api. String. getTimestamp() public int getTimestamp(). Synopsis public interface IStreamPlaybackSecurity { // Public Methods public boolean isPlaybackAllowed(org. boolean flushPlaylist). Timestamp of this packet.red5. Parameters scope name start length flushPlaylist return Scope the stream is about to be played back from. int length.server. int length. boolean flushPlaylist).server. otherwise False 23. 22. String name.IScope scope. Interface IStreamPlaybackSecurity Interface for handlers that control access to stream playback. Flush playlist? True if playback is allowed.1.4.

Set<org.?server. String mode). public void unregisterStreamPublishSecurity(IStreamPublishSecurity handler). String mode). Name of the stream to publish.api. 23.stream. Synopsis public interface IStreamSecurityService extends.red5.2. Publishing mode. String.server.red5.1.server.?api. 24.IScope scope. True if publishing is allowed.IScope scope.api.api.?red5.IStreamPublishSecurity> getStreamPublishSecurity() public void registerStreamPlaybackSecurity(IStreamPlaybackSecurity handler).Package org.?red5. 547 .1.api.util.server. Synopsis public interface IStreamPublishSecurity { // Public Methods public boolean isPublishAllowed(org. Parameters scope name mode return Scope the stream is about to be published in. isPublishAllowed(IScope. } 23.?server. // Public Methods public java.server.util. public void registerStreamPublishSecurity(IStreamPublishSecurity handler).red5.IStreamPlaybackSecurity> getStreamPlaybackSecurity public java.?api. Check if publishing a stream with the given name is allowed. org. String name. public void unregisterStreamPlaybackSecurity(IStreamPlaybackSecurity handler).?stream Interface for handlers that control access to stream publishing.stream.red5.?IScopeService { // Public Static Fields public static final String BEAN_NAME = "streamSecurityService". Interface IStreamSecurityService Service that supports protecting access to streams.Set<org. otherwise False 24. String name. String) public boolean isPublishAllowed(org.

stream.Set<org. Get handlers that protect stream publishing. registerStreamPlaybackSecurity(IStreamPlaybackSecurity) public void registerStreamPlaybackSecurity(IStreamPlaybackSecurity handler). Parameters return list of handlers 24.util.Set<org.3.api.server.?stream } 24.IStreamPublishSecurity> getStreamPublishSecurity(). 24. BEAN_NAME public static final String BEAN_NAME = "streamSecurityService". getStreamPublishSecurity() public java. 24.6. 24. unregisterStreamPlaybackSecurity(IStreamPlaybackSecurity) public void unregisterStreamPlaybackSecurity(IStreamPlaybackSecurity handler).stream.api. Parameters handler Handler to add. Add handler that protects stream publishing.red5.5.4.?api. Add handler that protects stream playback. registerStreamPublishSecurity(IStreamPublishSecurity) public void registerStreamPublishSecurity(IStreamPublishSecurity handler).util.IStreamPlaybackSecurity> getStreamPlaybackSecurity() Get handlers that protect stream plaback.?server.Package org. getStreamPlaybackSecurity() public java.server. Name of a bean defining that scope service. Parameters return list of handlers 24.?red5. Parameters handler Handler to add.7.2.red5. 548 .

?api.Package org. Interface IStreamService This interface represents the stream methods that can be called throug RTMP. public void deleteStream(int streamId). 25. Remove handler that protects stream publishing. int length). unregisterStreamPublishSecurity(IStreamPublishSecurity) public void unregisterStreamPublishSecurity(IStreamPublishSecurity handler). public void pause(boolean pausePlayback. public void play(String name).?stream Remove handler that protects stream playback.?red5. public int createStream(). int start. public void play(Boolean dontStop).?red5.?server. public void play(String name. org. 25. int start. int start). 24. int length. // Public Methods public void closeStream().8. 549 . int position). Parameters handler Handler to remove.1.?IScopeService { // Public Static Fields public static final String BEAN_NAME = "streamService". int streamId). Parameters handler Handler to remove. public void deleteStream(IStreamCapableConnection conn. public void play(String name. public void play(String name.?api. boolean flushPlaylist). Synopsis public interface IStreamService extends.?server.

public void releaseStream(String streamName). Delete stream Parameters 550 . Close the stream if not been closed. deleteStream(int) public void deleteStream(int streamId). public void publish(String name). int streamId).Package org.3. } 25. Parameters streamId Stram id 25. public void publish(String name. public void receiveAudio(boolean receive). Create a stream and return a corresponding id.2.?red5. public void receiveVideo(boolean receive). closeStream() public void closeStream().?stream public void publish(Boolean dontStop). Parameters return ID of created stream 25.?api.?server. int) public void deleteStream(IStreamCapableConnection conn. deleteStream(IStreamCapableConnection. Close the stream but not deallocate the resources. public void seek(int position). String mode).4. createStream() public int createStream().5. Deallocate the related resources. 25.

int start). int.?stream conn streamId Stream capable connection Stream id 25.?api.6.8.Package org. pause(boolean. play(String. int start. int) public void play(String name. play(String) public void play(String name). Pauses playback Parameters pausePlayback position Pause flah Pause position 25. int) public void pause(boolean pausePlayback. Play stream without initial stop Parameters dontStop Stoppage flag 25. int position).?server.9.?red5. play(Boolean) public void play(Boolean dontStop). play(String.7. int) public void play(String name. Play stream with name Parameters name Stream name 25. 551 .10. Play stream with name from start position Parameters name start Stream name Start position 25.

String mode).11.Package org.13. boolean) public void play(String name. int start. publish(String) public void publish(String name). Publish Parameters dontStop Whether need to stop first 25. Play stream with name from start position and for given amount if time Parameters name start length Stream name Start position Playback length 25. publish(Boolean) public void publish(Boolean dontStop).12. int. int.?stream int length). int length. boolean flushPlaylist).14. Publishes stream with given name Parameters name Stream published name 25. play(String.?red5. String) public void publish(String name. 552 . publish(String.?server. Publishes stream from given position for given amount of time Parameters name start length flushPlaylist Stream published name Start position Playback length Flush playlist? 25.?api.

releaseStream(String) public void releaseStream(String streamName).16. seek(int) public void seek(int position). That is.?server.17.15. receiveAudio(boolean) public void receiveAudio(boolean receive). receiveVideo(boolean) public void receiveVideo(boolean receive).?stream Publishes stream with given name and mode Parameters name mode Stream published name Stream publishing mode 25.?api.Package org. Seek to position Parameters position Seek position 26.18.?red5. pause or seek. 553 . Parameters streamName 25. Can recieve video? Parameters receive Boolean flag 25. Can recieve audio? Parameters receive Boolean flag 25. Interface ISubscriberStream ISubscriberStream is a stream from subscriber's point of view. Called by FME. it provides methods for common stream operations like play.

2. Start playing.?server.4. public void play() throws IOException. Synopsis public interface ISubscriberStream extends. IOException if an IO error occurred while starting to play the stream 554 . public void resume(int position).1. public void stop(). 26.?api. public void receiveVideo(boolean receive). org. Parameters return 26.?stream 26.3.?api.?IClientStream { // Public Methods public boolean isPaused().Package org. Pause at a position for current playing item. Check if the stream is currently paused.?stream. Parameters position Position for pause in millisecond. } 26. pause(int) public void pause(int position). public void receiveAudio(boolean receive). play() public void play() throws IOException.?red5. public void pause(int position). public void seek(int position) throws OperationNotSupportedException. isPaused() public boolean isPaused().?red5.?server.

9. Parameters position Position for resume in millisecond. org.7. Interface ISubscriberStreamService public interface ISubscriberStreamService extends. Resume from a position for current playing item.Package org. resume(int) public void resume(int position). Parameters position Position for seek in millisecond.?api. 26. stop() public void stop().?IScopeService { // Public Static Fields 555 .?server.8.?red5. Should the stream send video to the client? Parameters receive 26. OperationNotSupportedException if the stream doesn't support seeking. receiveVideo(boolean) public void receiveVideo(boolean receive). Seek into a position for current playing item.?api.?server. Should the stream send audio to the client? Parameters receive 26.6. receiveAudio(boolean) public void receiveAudio(boolean receive). seek(int) public void seek(int position) throws OperationNotSupportedException.5. 26.?stream 26. 27.?red5. Stop playing.

ByteBuffer data).apache.common.apache. } 28.red5.server. String name).mina.subscribe". // Public Methods public ISubscriberStream getSubscriberStream(org.common. public String getName(). Parameters scope name return the scope to return the stream from the name of the stream the stream object 28. } 27. Returns a stream that can subscribe a broadcast stream with the given name using "IBroadcastStream.ByteBuffer data). public void reset(). getSubscriberStream(IScope. public org.api. public boolean canHandleData(org.1.common.apache.IScope scope.apache.mina. Parameters 556 . Interface IVideoStreamCodec public interface IVideoStreamCodec { // Public Methods public boolean addData(org. public boolean canDropFrames().1.?api. String name).red5.api.mina. addData(ByteBuffer) public boolean addData(org.?server.common.ByteBuffer getKeyframe().server.mina.?red5.Package org.ByteBuffer data). String) public ISubscriberStream getSubscriberStream(org. Update the state of the codec with the passed data.IScope scope.?stream public static final String BEAN_NAME = "subscriberStreamService".

apache.?stream data return 28. Reset the codec to its initial state.6. getName() public String getName().Package org.2. canDropFrames() public boolean canDropFrames(). Returns true if the codec knows how to handle the passed stream data. Check if the codec supports frame dropping.3. canHandleData(ByteBuffer) public boolean canHandleData(org. Parameters return 28. Parameters return 28. Return the name of the video codec. getKeyframe() public org.?server.mina.?api.common.5.apache.mina. Return the data for a keyframe.4. Exception OperationNotSupportedException 557 . 29. reset() public void reset().ByteBuffer getKeyframe().ByteBuffer data).?red5. Parameters data return 28.common. Parameters return 28.

?Exception { // Public Constructors public OperationNotSupportedException(). notify . getMessage .Throwable: fillInStackTrace . } Methods inherited from java.?lang. 31.Object: clone .?red5. Constructs a new ResourceExistException. Synopsis public class OperationNotSupportedException extends.1. getStackTrace . printStackTrace .?stream The requested operation is not supported by the stream.?lang. getStackTrace . initCause . getCause . finalize . getCause . getMessage .lang.?lang. java. hashCode . toString Methods inherited from java. initCause . getClass . java. printStackTrace . ResourceExistException() public ResourceExistException().?api.lang.Object: clone . equals . public ResourceExistException(Throwable cause). setStackTrace . setStackTrace . getLocalizedMessage . finalize .lang. getClass . Exception ResourceNotFoundException public class ResourceNotFoundException extends.?Exception { // Public Constructors 558 . notifyAll . Throwable cause). equals .?Exception { // Public Constructors public ResourceExistException(). Exception ResourceExistException public class ResourceExistException extends.lang.?server. wait 30. notify .Package org. notifyAll .Throwable: fillInStackTrace .1. wait 30. java. public ResourceExistException(String message). hashCode . getLocalizedMessage . public ResourceExistException(String message. toString Methods inherited from java. } Methods inherited from java. 29.

notify . Throwable cause).lang. setStackTrace .?api. finalize . public ResourceNotFoundException(String message. getMessage . Constructs a new ResourceNotFoundException.1. public ResourceNotFoundException(String message). toString Methods inherited from java. getCause .Package org.Throwable: fillInStackTrace . public ResourceNotFoundException(Throwable cause). initCause . hashCode . printStackTrace .?red5. getClass . notifyAll . ResourceNotFoundException() public ResourceNotFoundException(). getStackTrace .?server. getLocalizedMessage . equals .?stream public ResourceNotFoundException(). 559 . wait 31.lang.Object: clone . } Methods inherited from java.

6. boolean flushPlaylist). wait 1.api. notify .?red5. o // Public Constructors public DenyAllStreamAccess(). getClass .api.red5.server.1.2.server. } Methods inherited from java. 1. hashCode . int start. int length. Class DenyAllStreamAccess Stream security handler that denies access to all streams. Synopsis public class DenyAllStreamAccessimplements. boolean) public boolean isPlaybackAllowed(org.3. String name. String. 1.?server.server.IScope scope. notifyAll . String) public boolean isPublishAllowed(org. 2.api. String name. isPlaybackAllowed(IScope.IScope scope.lang.api.red5.?api. // Public Methods public boolean isPlaybackAllowed(org. String mode). Specified by: Method isPlaybackAllowed in interface IStreamPlaybackSecurity Check if playback of a stream with the given name is allowed. toString .IScope scope. equals . int start. org. String. boolean flushPlaylist). Class SimpleBandwidthConfigure This class is the only IBandwidthConfigure implementation provided in 0.red5. Specified by: Method isPublishAllowed in interface IStreamPublishSecurity Check if publishing a stream with the given name is allowed. String mode).IScope scope.server. int.Object: clone . String name. int. int length.?IStreamPublishSecurity.?stream. isPublishAllowed(IScope. It's a kind of ValueObject (item with a set of values that just stores data) that is used to configure Red5 560 . public boolean isPublishAllowed(org.red5. finalize . String name.1.

video.red5.?api.server.stream. notifyAll .IConnectionBWConfig instead. the value of the first three elements will be ignored.2. Description copied from interface: getChannelBandwidth 2. org. } Direct known subclasses: org. The last element is the overall bandwidth.?red5.?server. getChannelInitialBurst() public long[] getChannelInitialBurst().?api. The unit is bit per second.?red5. Note: To configure the connection's bandwidth.?server. getChannelBandwidth() public long[] getChannelBandwidth(). wait See Also org. // Protected Methods protected Object clone() throws CloneNotSupportedException. data and the overall bandwidth.SimpleConnectionBWConfig 2. Parameters return The 4-element array of bandwidth configure. public long[] getChannelInitialBurst(). org.?red5.lang.api.red5.server.?support application bandwidth settings.red5.api. toString .?stream.IConnectionBWConfig .server.Package org.? SimpleConnectionBWConfig Methods inherited from java. getClass . you should use the implementation of org. notify . If it's not -1. hashCode . // Public Methods public long[] getChannelBandwidth().?server. public SimpleBandwidthConfigure(org.api. equals . A value of -1 means "don't care" so that there's no limit on bandwidth for that channel.api.support.red5.?support.?IBandwidthConfigure { // Public Constructors public SimpleBandwidthConfigure().3. finalize .?api. Synopsis public class SimpleBandwidthConfigureimplements.IBandwidthConfigure config).1. Specified by: Method getChannelBandwidth in interface IBandwidthConfigure Return the bandwidth configure for 3 channels: audio. 2.Object: clone .?stream.server. 561 .

from server to client 562 . getDownstreamBandwidth() public long getDownstreamBandwidth(). toString .support. Synopsis public class SimpleConnectionBWConfig extends. notifyAll . } Methods inherited from org.?server.?api. the default will be used per the implementation of bandwidth controller. Parameters return The 4-element array of byte count of initial burst value.?support Specified by: Method getChannelInitialBurst in interface IBandwidthConfigure Return the byte count of initial burst value for 3 channels: audio.?support.red5.?stream.2.api. data and the overall bandwidth.1. finalize .?red5.?server.?IConnectionBWConfig { // Public Constructors public SimpleConnectionBWConfig().server. If the value is -1. getChannelInitialBurst Methods inherited from java.?server.?red5. getChannelBandwidth .Package org. video. notify . Specified by: Method getDownstreamBandwidth in interface IConnectionBWConfig Getter for downstream bandwidth Parameters return Downstream bandwidth.?SimpleBandwid implements. Description copied from interface: getChannelInitialBurst 3. org. org.?stream. getClass .Object: equals . public void setUpstreamBandwidth(long bw).?api. // Public Methods public long getDownstreamBandwidth().stream.SimpleBandwidthConfigure: clone .?red5. 3.lang. hashCode . public long getUpstreamBandwidth(). Class SimpleConnectionBWConfig Simple implementation of connection bandwidth configuration. wait 3.?api.

Upstream is the data that is sent from the client to the server.?IPlayItem { // Public Constructors public SimplePlayItem().messaging.IMessageInput getMessageInput().4. Specified by: Method getUpstreamBandwidth in interface IConnectionBWConfig Get the upstream bandwidth to be notified to the client.?api. Upstream is the data that is sent from the client to the server. 563 . org.red5.?red5.?support Description copied from interface: getDownstreamBandwidth 3. // Public Methods public long getLength().?api. getUpstreamBandwidth() public long getUpstreamBandwidth().IMessageInput getMsgInput(). public String getName().?server.3. setUpstreamBandwidth(long) public void setUpstreamBandwidth(long bw). Specified by: Method setUpstreamBandwidth in interface IConnectionBWConfig Set the upstream bandwidth to be notified to the client.?stream. Parameters return Upstream (from client to server) bandwidth configuration Description copied from interface: getUpstreamBandwidth 3. Parameters bw Bandwidth Description copied from interface: setUpstreamBandwidth 4.messaging.?red5.?stream. Class SimplePlayItem Simple playlist item implementation 4.red5.server. public long getSize(). public org. public org.server. Synopsis public class SimplePlayItemimplements.?server.1.Package org.

?server.Package org.server.IMessageInput getMsgInput().lang. public void setLength(long length). Specified by: Method getLength in interface IPlayItem Returns play item length in milliseconds Parameters return Play item length in milliseconds 4. notifyAll . notify . getMsgInput() public org.server.red5.?red5. Alias for getMessageInput Parameters return Message input source 564 . Specified by: Method getMessageInput in interface IPlayItem Returns IMessageInput object. wait 4.Object: clone . hashCode .red5. public void setSize(long size). public void setName(String name). Parameters return IMessageInput object 4. finalize .?support public long getStart(). IMessageInput is an endpoint for a consumer to connect.3.red5.2.server. getMessageInput() public org.messaging. equals . public void setStart(long start).IMessageInput msgInput).messaging.messaging. getLength() public long getLength(). } Methods inherited from java.?stream.?api. public void setMsgInput(org.4. toString .IMessageInput getMessageInput(). getClass .

10. getName() public String getName().messaging. setMsgInput(IMessageInput) public void setMsgInput(org. getStart() public long getStart().IMessageInput msgInput).server.6. setName(String) public void setName(String name). Setter for length Parameters length Item length. Setter name 565 .Package org.?red5. getSize() public long getSize().?server.red5. Specified by: Method getName in interface IPlayItem Returns item name Parameters return item name 4.?stream. 4. Specified by: Method getSize in interface IPlayItem Returns size in bytes 4.9.?support 4. Setter for message input Parameters msgInput Message input 4.8. Specified by: Method getStart in interface IPlayItem Returns boolean value that specifies whether item can be played 4.7.?api. setLength(long) public void setLength(long length).5.

IScope String name). toString .server.server.api. public static org.11. public static void removeServerStream(org. public static void putServerStream(org.api.api.red5. 5.1. 5.red5. hashCode .red5. // Public Static Methods public static org.server.12.Object: clone . getClass . equals . finalize . notify . setSize(long) public void setSize(long size).red5. String name.?support Parameters name Item name 4.stream.lang. Set the size in bytes Parameters size 4. Class StreamUtils Stream helper methods.api.red5.IServerStream stream).?red5.IScope scope.api.server.?stream. Setter for start.server.api. wait 566 .stream.IServerStream createServerStream(org.?server.stream. org. } Methods inherited from java.red5. Parameters start Start position.ISco String name).?api. Synopsis public abstract class StreamUtils { // Public Constructors public StreamUtils(). String name).red5.IScope scope. notifyAll .server.IServerStream getServerStream(org. setStart(long) public void setStart(long start).server.api.Package org.

Package org. Parameters scope name return Scope of stream Name of stream IServerStream object 5.stream.server. String) public static org.api.IServerStream stream). removeServerStream(IScope.IServerStream getServerStream(org. String) public static org.?server. String.api.IScope String name).5. String name.api.red5.IServerStream createServerStream(org. createServerStream(IScope.api.IScope sc String name).3.red5.server.server.server.api.red5. Creates server stream Parameters scope name return Scope of stream Name of stream IServerStream object 5.?stream. putServerStream(IScope. String name).server. org.red5.api. getServerStream(IScope.red5.4.IScope scope. Null will be returned if the stream is not found.api.stream.2.server. String) public static void removeServerStream(org.red5.?api. IServerStream) public static void putServerStream(org.server.?support 5. Puts a server stream in the stream map Parameters scope name stream Scope of stream Name of stream ServerStream object 5. Looks up a server stream in the stream map.?red5.red5.IScope scope.stream. Removes a server stream from the stream map Parameters scope Scope of stream 567 .

?stream.?api.?red5.Package org.?support name Name of stream 568 .?server.

springframework.cache.?red5.apache. // Public Static Methods public static org.ref.ICacheable obj).?c // Protected Fields protected static org. public void put(String name. org.cache.red5.red5.api.Iterator<java.api.context.lang.server.?api.util.?springframework.lang. 1.SoftReference<? extends org. public static CacheImpl getInstance().?cache. public boolean offer(String name. } 569 .context.ByteBuffer obj).springframework.ICacheable obj).String> getObjectNames(). // Protected Methods protected void put(String name.Iterator<java.?server.ICacheable get(String name).cache.1.mina.1. public boolean remove(org. org. public boolean remove(String name).ICacheab public void init().api.cache.slf4j.red5.common. public void setApplicationContext(org. public void setMaxEntries(int max).ApplicationContext context) throws BeansException. Object obj). org. Object obj).?ICacheStore. Class CacheImpl Provides an implementation of an object cache. public java.red5. public boolean offer(String key. public org.ApplicationContext getApplicationContext().api. // Public Methods public void destroy(). org.server.util. public static long getCacheHit(). Synopsis public class CacheImplimplements.server.Logger log .server. public static long getCacheMiss(). public java.

1. notifyAll .cache. toString . getClass . getApplicationContext() public static org. 1.springframework. 1.?server. Specified by: Method get in interface ICacheStore Return a cached object with the given name.2.Object: clone .api.?cache Methods inherited from java. Specified by: Method destroy in interface ICacheStore Allows for cleanup of a cache implementation. 570 .4. notify . getCacheHit() public static long getCacheHit(). Getter for property 'applicationContext'.?red5.Package org. finalize .6. Getter for property 'cacheHit'. equals . 1. Parameters return Value for property 'applicationContext'.7. get(String) public org.ApplicationContext getApplicationContext().red5.context. hashCode .server. 1.lang. getInstance() public static CacheImpl getInstance(). Getter for property 'cacheMiss'. getCacheMiss() public static long getCacheMiss(). destroy() public void destroy(). Parameters return Value for property 'cacheMiss'.3.5. Parameters return Value for property 'cacheHit'. wait 1.ICacheable get(String name).

1. Specified by: Method put in interface ICacheStore Puts an object in the cache with the associated key. Specified by: Method getObjectNames in interface ICacheStore Return iterator over the names of all already loaded objects in the storage.13. it will not be accepted.red5. remove(ICacheable) public boolean remove(org. Specified by: Method offer in interface ICacheStore Offer an object to the cache with an associated key.Package org. 1.util. Object) public void put(String name.?cache Returns the instance of this class.server.util. put(String. getObjectNames() public java.cache.server.api. 1.Iterator<java. 1.?server. remove(String) public boolean remove(String name). Object) public boolean offer(String name. Specified by: Method remove in interface ICacheStore Delete the cached object with the given name.lang.red5.api. If the named object exists in cache.?red5.12. 571 .SoftReference<? extends org. Specified by: Method remove in interface ICacheStore Delete the passed cached object.9. getObjects() public java.lang. Object obj).Iterator<java.cache. 1.10. Object obj). offer(String.String> getObjectNames().ICacheable Specified by: Method getObjects in interface ICacheStore Return iterator over the already loaded objects in the storage.11.ICacheable obj).8. Parameters return 1.ref.

setApplicationContext(ApplicationContext) public void setApplicationContext(org.lang.Package org.mina.context.slf4j.springframework.14. public boolean isCached().?api. setMaxEntries(int) public void setMaxEntries(int max). Specified by: Method setApplicationContext in interface ApplicationContextAware 1.?cache 1. public org. Synopsis public class CacheableImplimplements.Object: clone .Logger log . org. wait 572 .15. Specified by: Method setMaxEntries in interface ICacheStore Sets the maximum number of entries for the cache.springframework. hashCode . public byte[] getBytes(). public void setCached(boolean cached). equals .common.mina. public void setName(String name).ByteBuffer getByteBuffer().?red5. // Public Constructors public CacheableImpl(Object obj). toString .apache.1. public String getName(). } Methods inherited from java.ApplicationContext context) throws BeansException.?red5.apache. protected static org. notify . Class CacheableImpl Provides an implementation of a cacheable object.?cache.?server. 2. finalize . 2.ByteBuffer buffer).?ICacheable { // Protected Fields protected org.context. public CacheableImpl(org.ApplicationContext applicationContext . // Public Methods public void addRequest().?server.common. getClass . notifyAll .

org. 2. 573 . 2.4.1. Specified by: Method getName in interface ICacheable Returns the name of the cached object.6. false otherwise.?red5. 2.?server. 3. org. 2. Specified by: Method getByteBuffer in interface ICacheable Returns a readonly byte buffer.?springframework. Specified by: Method setName in interface ICacheable Set the name of the cached object. Specified by: Method getBytes in interface ICacheable Returns the object contained within the cacheable reference.?cache 2. getName() public String getName().apache.5. setName(String) public void setName(String name). Specified by: Method setCached in interface ICacheable Sets a flag to represent the cached status of a cacheable object. getByteBuffer() public org.mina.common.2. 3.ByteBuffer getByteBuffer().?ICacheStore.?api. Class EhCacheImpl Provides an implementation of an object cache using EhCache.Package org.?red5. setCached(boolean) public void setCached(boolean cached).3. getBytes() public byte[] getBytes(). Specified by: Method isCached in interface ICacheable Returns true if the object is cached. isCached() public boolean isCached().?cache.?server.7. 2. Synopsis public class EhCacheImplimplements.

event. public static long getCacheHit().cache.CacheManagerEventListener getCacheManagerEventListener().ref. public int getDiskExpiryThreadIntervalSeconds().util.ApplicationContext getApplicationContext().api.lang.String> getObjectNames(). public String getMemoryStoreEvictionPolicy().Package org.api.CacheManagerEventListener cacheManag public void setDiskExpiryThreadIntervalSeconds(int diskExpiryThreadIntervalSeconds). public void setCacheManagerEventListener(net. public boolean remove(org. Object obj).util. public boolean remove(String name).ehcache.sf.util. public void setApplicationContext(org. public void setMaxEntries(int capacity). public static long getCacheMiss().SoftReference<? extends org.ICacheable get(String name). // Public Methods public void destroy().event.Logger log . public void put(String name.cache.ApplicationContext context) throws BeansException.lang.context. public boolean offer(String name.?red5.server.ehcache.List<net.red5.springframework.api.slf4j.?server. // Public Static Methods public static org.server. public void setDiskStore(String diskStore).Iterator<java.context. public String getDiskStore().ICacheable obj). public java. // Public Constructors public EhCacheImpl().ehcache.?cache // Protected Fields protected static org.sf.ICacheab public void init().springframework.cache.Iterator<java. public java. 574 .sf.red5. Object obj).config.red5. public org.server.CacheConfiguration> configs). public void setCacheConfigs(java. public net.

api.context. finalize . 3. equals .CacheManagerEventListener getCacheManagerEventListener().?red5.Package org.springframework.ehcache.4. wait See Also ehcache homepage [http://ehcache. hashCode .ApplicationContext getApplicationContext(). Getter for property 'applicationContext'. getApplicationContext() public static org.3.?server. destroy() public void destroy().server. notifyAll . Getter for property 'cacheManagerEventListener'. Parameters return Value for property 'applicationContext'. getCacheManagerEventListener() public net. Parameters return Value for property 'cacheHit'. Getter for property 'cacheHit'.sourceforge. Specified by: Method get in interface ICacheStore Return a cached object with the given name.2. 3.red5.cache. getClass .5.ICacheable get(String name). get(String) public org.Object: clone . } Methods inherited from java.net/] 3.sf. getCacheHit() public static long getCacheHit(). Specified by: Method destroy in interface ICacheStore Allows for cleanup of a cache implementation.6. Parameters 575 . notify . 3. 3. toString .?cache public void setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy).lang.event.

getMemoryStoreEvictionPolicy() public String getMemoryStoreEvictionPolicy(). Parameters return Value for property 'cacheMiss'. Getter for property 'diskStore'. Parameters return Value for property 'diskExpiryThreadIntervalSeconds'. 3. 3.server. getObjects() public java.?red5. Parameters return Value for property 'memoryStoreEvictionPolicy'. 3. 3.12.ICacheable 576 . getDiskExpiryThreadIntervalSeconds() public int getDiskExpiryThreadIntervalSeconds().SoftReference<? extends org.Iterator<java.9. Specified by: Method getObjectNames in interface ICacheStore Return iterator over the names of all already loaded objects in the storage.util. Getter for property 'cacheMiss'. Getter for property 'diskExpiryThreadIntervalSeconds'.ref.util.String> getObjectNames(). 3.lang.api.7. Getter for property 'memoryStoreEvictionPolicy'. getCacheMiss() public static long getCacheMiss().10.8. 3.cache.?cache return Value for property 'cacheManagerEventListener'.lang.?server.Iterator<java. Parameters return Value for property 'diskStore'. getObjectNames() public java. getDiskStore() public String getDiskStore().Package org.red5.11.

Parameters configs Value to set for property 'cacheConfigs'.13. it will not be accepted.server. put(String.14.context. Specified by: Method setApplicationContext in interface ApplicationContextAware 3.List<net. Object obj). Specified by: Method remove in interface ICacheStore Delete the passed cached object.red5. Specified by: Method offer in interface ICacheStore Offer an object to the cache with an associated key.CacheConfiguration> configs).sf.17.?cache Specified by: Method getObjects in interface ICacheStore Return iterator over the already loaded objects in the storage. offer(String.?server. 3. setApplicationContext(ApplicationContext) public void setApplicationContext(org. Specified by: Method put in interface ICacheStore Puts an object in the cache with the associated key. remove(String) public boolean remove(String name). 3.ICacheable obj).ehcache.15. Object) public void put(String name.springframework.Package org. 3. If the named object exists in cache.18.util.16.?red5.ApplicationContext context) throws BeansException. Specified by: Method remove in interface ICacheStore Delete the cached object with the given name. 3.api. 577 . Setter for property 'cacheConfigs'. Object) public boolean offer(String name. setCacheConfigs(List<CacheConfiguration>) public void setCacheConfigs(java. 3. Object obj).cache. remove(ICacheable) public boolean remove(org.config.

setDiskStore(String) public void setDiskStore(String diskStore). Setter for property 'diskExpiryThreadIntervalSeconds'. setCacheManagerEventListener(CacheManagerEventListener) public void setCacheManagerEventListener(net. 578 . setMaxEntries(int) public void setMaxEntries(int capacity).23. Setter for property 'memoryStoreEvictionPolicy'. setDiskExpiryThreadIntervalSeconds(int) public void setDiskExpiryThreadIntervalSeconds(int diskExpiryThreadIntervalSeconds). Class NoCacheImpl Provides an implementation of an object cache which actually does not provide a cache. Setter for property 'diskStore'. Parameters cacheManagerEventListenerto set for property 'cacheManagerEventListener'. Value 3.21. Parameters diskExpiryThreadIntervalSeconds for property 'diskExpiryThreadIntervalSeconds'.19.22.?red5. setMemoryStoreEvictionPolicy(String) public void setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy). Parameters memoryStoreEvictionPolicy to set for property 'memoryStoreEvictionPolicy'.ehcache. Value to set 3.?server.20. Value 4.CacheManagerEventListener cacheManager Setter for property 'cacheManagerEventListener'.sf.Package org. 3. Specified by: Method setMaxEntries in interface ICacheStore Sets the maximum number of entries for the cache.event. Parameters diskStore Value to set for property 'diskStore'.?cache 3. 3.

ref.ApplicationContext context) throws BeansException. public boolean offer(String key.String> getObjectNames(). org. } Methods inherited from java.context.server. public boolean remove(org. public void setApplicationContext(org.red5.apache. // Protected Fields protected static org.1.api. public void setMaxEntries(int max).api.lang.?ICacheStore.?red5. public java. Synopsis public class NoCacheImplimplements.cache. public static long getCacheMiss().SoftReference<? extends org. // Public Methods public void destroy().lang.cache.mina. finalize . getClass . public org.ApplicationContext getApplicationContext().Iterator<java.?cache.common. Object obj). Object obj).Package org. hashCode . Specified by: Method destroy in interface ICacheStore 579 .?springframework.?cache 4. public void put(String name.Iterator<java.util.util.2.server.ICacheab public boolean offer(String name. org.context.ByteBuffer obj).springframework. toString .?server. public java.server. notify .ICacheable get(String name).springframework.cache.api. wait 4. destroy() public void destroy(). org.red5.red5. notifyAll . // Public Static Methods public static org. public boolean remove(String name).?api. public static long getCacheHit().?red5.ICacheable obj).Logger log .slf4j.lang. public static NoCacheImpl getInstance().?server.Object: clone . equals .

4.server.red5. Getter for property 'cacheMiss'.7. getInstance() public static NoCacheImpl getInstance().Package org.3. getCacheMiss() public static long getCacheMiss(). 4. Returns the instance of this class. 4.context.util.String> getObjectNames(). Parameters return Value for property 'applicationContext'.Iterator<java.?red5.?cache Allows for cleanup of a cache implementation. 4.ICacheable get(String name).8.ApplicationContext getApplicationContext().?server. getObjectNames() public java.api.springframework. Specified by: Method get in interface ICacheStore Return a cached object with the given name.lang. Getter for property 'applicationContext'. Parameters return Value for property 'cacheMiss'. Specified by: Method getObjectNames in interface ICacheStore 580 . getCacheHit() public static long getCacheHit(). Getter for property 'cacheHit'. Parameters return Value for property 'cacheHit'. getApplicationContext() public static org. Parameters return 4.4. 4.5. get(String) public org.cache.6.

ICacheable obj).springframework.14. setApplicationContext(ApplicationContext) public void setApplicationContext(org. 4.cache. 4.cache.server. Object obj). setMaxEntries(int) public void setMaxEntries(int max).?red5.11. 4.api. 581 . offer(String. Object) public boolean offer(String name. Object obj).ApplicationContext context) throws BeansException.Iterator<java.ref. 4.lang. 4.server.10. remove(String) public boolean remove(String name).context. Specified by: Method offer in interface ICacheStore Offer an object to the cache with an associated key. Specified by: Method put in interface ICacheStore Puts an object in the cache with the associated key. Specified by: Method remove in interface ICacheStore Delete the passed cached object. remove(ICacheable) public boolean remove(org.red5.util.15.?server.?cache Return iterator over the names of all already loaded objects in the storage.ICacheable Specified by: Method getObjects in interface ICacheStore Return iterator over the already loaded objects in the storage. it will not be accepted.Package org. getObjects() public java.red5. Object) public void put(String name.SoftReference<? extends org.9. 4. Specified by: Method remove in interface ICacheStore Delete the cached object with the given name.13.api. If the named object exists in cache. put(String. Specified by: Method setApplicationContext in interface ApplicationContextAware 4.12.

?red5.?server. 582 .Package org.?cache Specified by: Method setMaxEntries in interface ICacheStore Sets the maximum number of entries for the cache.

Object params. Synopsis public class ClientDetailsException extends. notifyAll .lang. notify . java. notify . public boolean includeStacktrace().?RuntimeException { // Public Constructors public AccessDeniedException(). wait 2. printStackTrace . Exception ClientDetailsException Exception class than contains additional parameters to return to the client. getLocalizedMessage . initCause .?RuntimeException { // Public Constructors public ClientDetailsException(String message. Exception AccessDeniedException Access denied 1. notifyAll .Object: clone . getStackTrace .lang. initCause . toString Methods inherited from java.Throwable: fillInStackTrace . getStackTrace .1. getCause . finalize . toString Methods inherited from java. boolean includeStacktrace). setStackTrace . hashCode .?lang.1. equals .lang. hashCode . finalize . getMessage .lang. equals . setStackTrace . Synopsis public class AccessDeniedException extends. getMessage . 2. // Public Methods public Object getParameters(). getLocalizedMessage . getClass .?lang. java.Object: clone . getCause . wait 583 . printStackTrace . Object params). public ClientDetailsException(String message.1. } Methods inherited from java. } Methods inherited from java. getClass .Throwable: fillInStackTrace .

?exception 2. Parameters message params 2. Create new exception object from message and parameters with optional stacktrace. getParameters() public Object getParameters(). Object.5. Create new exception object from message and parameters. By default. boolean) public ClientDetailsException(String message. boolean includeStacktrace).3. Get parameters to return to the client. Object params). no stacktrace is returned to the client.2.?red5. Parameters return 2. Should the stacktrace returned to the client? Parameters return 3.?server. Object) public ClientDetailsException(String message. Parameters message params includeStacktrace 2. Exception ClientNotFoundException Client not found 584 . Object params. ClientDetailsException(String. ClientDetailsException(String.4.Package org. includeStacktrace() public boolean includeStacktrace().

Synopsis public class ClientRejectedException extends. notify .?red5. printStackTrace .Throwable: fillInStackTrace . notifyAll . getClass . Synopsis public class ClientNotFoundException extends.1. getLocalizedMessage .?RuntimeException { // Public Constructors public ClientRejectedException().lang. equals . hashCode .Package org.?exception 3. notify .lang. setStackTrace . initCause .Object: clone . // Public Methods public Object getReason(). Reason that provided with this exception is sent to client-side status event description. java.Throwable: fillInStackTrace .Object: clone . wait 585 .?server. toString Methods inherited from java. getLocalizedMessage . toString Methods inherited from java. equals . 4. getMessage . printStackTrace . java. } Methods inherited from java. Exception ClientRejectedException The client is not allowed to connect. getCause .lang. hashCode . finalize . public ClientRejectedException(Object reason). getStackTrace .?lang.?lang. setStackTrace . } Methods inherited from java. getCause . getStackTrace . notifyAll .1.lang.?RuntimeException { // Public Constructors public ClientNotFoundException(String id). getClass .2. getMessage . Create exception from given string message Parameters id 4. wait 3. ClientNotFoundException(String) public ClientNotFoundException(String id). initCause . finalize .

ScopeHandlerNotFoundException(String) public ScopeHandlerNotFoundException(String handlerName). wait 5.?lang. initCause .Throwable: fillInStackTrace . getLocalizedMessage .lang.lang. finalize . 4.1.4. printStackTrace . ClientRejectedException(Object) public ClientRejectedException(Object reason). getStackTrace . getCause .3.Package org.2. ClientRejectedException() public ClientRejectedException(). 586 . Thrown when scope handler with given name can't be found 5. Exception ScopeHandlerNotFoundException Scope handler not found.?red5. Synopsis public class ScopeHandlerNotFoundException extends. notify . equals . getClass .?exception 4. getMessage .2. toString Methods inherited from java. java. notifyAll .Object: clone . getReason() public Object getReason(). } Methods inherited from java. Constructs a new ClientRejectedException. setStackTrace .?server. Create new exception with given rejection reason Parameters reason Rejection reason 4. hashCode .?RuntimeException { // Public Constructors public ScopeHandlerNotFoundException(String handlerName). Getter for reason Parameters return Rejection reason 5.

printStackTrace .Package org. Create exception from given scope object and given child subscope Parameters scope childName Scope Subscope name 7. getStackTrace . thrown when child scope wasn't found.lang. 7.red5.lang.server. notifyAll .Throwable: fillInStackTrace . java. hashCode .IScope scope. wait 6. String) public ScopeNotFoundException(org.server.api. 6. Exception ScopeShuttingDownException Scope is currently shutting down. String childName).red5. Synopsis public class ScopeNotFoundException extends.server. equals .Object: clone . notify .1.1.?exception Create exception from given scope handler name Parameters handlerName Scope handler name 6.?red5. getLocalizedMessage . setStackTrace .?RuntimeException { // Public Constructors public ScopeShuttingDownException(org. toString Methods inherited from java.IScope scope. } Methods inherited from java.api.api. getMessage .?RuntimeException { // Public Constructors public ScopeNotFoundException(org.?lang. Synopsis public class ScopeShuttingDownException extends.red5. java. initCause .?lang.?server.2. String childName). ScopeNotFoundException(IScope.IScope scope). } 587 . getClass . getCause . Exception ScopeNotFoundException Scope not found. finalize .

2. java.1. } 588 .?RuntimeException { // Public Constructors public SharedObjectException().?RuntimeException { // Public Constructors public ServiceNotFoundException().red5.Object: clone . notify . finalize . java. notify . getCause .lang. hashCode . ScopeShuttingDownException(IScope) public ScopeShuttingDownException(org. setStackTrace .server. Exception SharedObjectException Base for all shared object-related exceptions 9.lang. getCause .1.?exception Methods inherited from java. hashCode .Object: clone . equals . equals .api. getClass . wait 9. finalize . getStackTrace .IScope scope). printStackTrace . getLocalizedMessage .Throwable: fillInStackTrace .Throwable: fillInStackTrace . notifyAll . toString Methods inherited from java.?lang.?server. getMessage . getLocalizedMessage .lang. Synopsis public class SharedObjectException extends.Package org. initCause . notifyAll . wait 7. Synopsis public class ServiceNotFoundException extends. Exception ServiceNotFoundException Thrown when server can't be found 8. getMessage .lang. getClass . setStackTrace .?lang. initCause . getStackTrace .?red5. printStackTrace . toString Methods inherited from java. } Methods inherited from java. Create exception from given scope object Parameters scope Scope 8.

toString Methods inherited from java. getCause . equals . getClass . setStackTrace .Throwable: fillInStackTrace . getMessage . finalize .lang. hashCode . setStackTrace . setStackTrace . Exception StreamControlException Stream control exception 10. Synopsis public class StreamControlException extends. } Methods inherited from java. getLocalizedMessage . printStackTrace . getMessage . notify . notify .lang.?exception Methods inherited from java. printStackTrace . hashCode . } Methods inherited from java.?lang.Object: clone . toString Methods inherited from java. Exception StreamDataException Thrown on stream data exception 11. notifyAll . java.lang.?RuntimeException { // Public Constructors public StreamControlException().?red5.Object: clone . wait 10.lang. getStackTrace . Synopsis public class StreamDataException extends. getLocalizedMessage .1.?lang.?server. java. wait 11. wait 589 . notifyAll . initCause . getClass . getLocalizedMessage .Package org.1.lang. hashCode .Throwable: fillInStackTrace . notify . notifyAll . getCause . equals . getClass . equals . initCause . finalize . initCause .?RuntimeException { // Public Constructors public StreamDataException(). printStackTrace . toString Methods inherited from java.Object: clone . getStackTrace . finalize . getMessage . getCause . getStackTrace .Throwable: fillInStackTrace .lang.

WebAppContext context). 2.jetty. Class JettyApplicationContext Class that wraps a Jetty webapp context. Wrap the passed Jetty webapp context.mortbay. wait 1.Logger log .2. notifyAll . 1.jetty.webapp. toString . Parameters context 1.mortbay.1.lang.?red5.4.Logger log .Object: clone . // Public Methods public void stop(). Logger 1. Class JettyApplicationLoader Class that can load new applications in Jetty. } Methods inherited from java. hashCode . Specified by: Method stop in interface IApplicationContext Stop the web application.?api. stop() public void stop().?IApplicationContext { // Protected Fields protected static org. finalize .1. log protected static org. notify . org. equals .?server. Synopsis public class JettyApplicationContextimplements.3.webapp. // Protected Constructors protected JettyApplicationContext(org. getClass . 590 .WebAppContext context).slf4j.slf4j. JettyApplicationContext(WebAppContext) protected JettyApplicationContext(org.

springframework. org.mortbay.context.context.3. org.Server server. // Protected Constructors protected JettyApplicationLoader(org. Specified by: Method getRootContext in interface IApplicationLoader Return the root org.context. JettyApplicationLoader(Server.mortbay.ApplicationContext getRootContext(). Parameters server 2.slf4j.?server.?jetty 2. 2. // Public Methods public org.ApplicationContext rootCtx).ApplicationContext getRootContext().lang. Logger 2. } Methods inherited from java. public void loadApplication(String contextPath. org. notifyAll .Object: clone .?red5.2.5.?red5. log protected static org.Logger log . equals .ApplicationContext rootCtx).jetty.springframework. String) public void loadApplication(String contextPath. String virtualHosts. getRootContext() public org. notify .springframework. Synopsis public class JettyApplicationLoaderimplements.?api.springframework.jetty.4.Package org. String. loadApplication(String.slf4j. hashCode . toString .Logger log . getClass . wait 2. finalize . Create new application loader for Jetty servers. ApplicationContext) protected JettyApplicationLoader(org.springframework.context.?IApplicationLoader { // Protected Fields protected static org.Server server. String directory) 591 .ApplicationContext.context.?server. String virtualHosts. String directory) throws Exception.1.

setApplicationLoader .?LoaderMBean { // Protected Fields protected String defaultWebConfig .?red5. org. setApplicationContext . setWebappFolder Methods inherited from java. protected org. loader . protected static org.server.Object: clone . hashCode .lang. Specified by: Method loadApplication in interface IApplicationLoader Load a new application for the given context path from a directory. org. getApplicationLoader .?jetty throws Exception. Synopsis public class JettyLoader extends. removeContext .?server.1. protected String jettyConfig . // Public Methods public void init().LoaderBase: applicationContext .red5. removeRed5ApplicationContext .?server. 592 . } Methods inherited from org. defaultWebConfig protected String defaultWebConfig .Package org. finalize . Class JettyLoader Class that loads Red5 applications using Jetty.?red5.?LoaderBase implements.server. 3.?server. webappFolder 3.LoaderBase: getApplicationContext . public void shutdown(). toString .Server jetty . public void removeContext(String path). red5AppCtx . setRed5ApplicationContext .slf4j. equals .Logger log .mortbay. // Public Constructors public JettyLoader(). getClass .2.red5. public void registerJMX().jetty. notifyAll . wait Fields inherited from org.?red5. getRed5ApplicationContext . notify . 3.

?jetty Default web config filename 3.?Configuration. shutdown() public void shutdown(). Specified by: Method removeContext in interface LoaderMBean Remove context from the current host.WebAppContext _context .4.?jetty.jetty. jetty protected org. org.3.6. Jetty config path 3.Server jetty .slf4j. IServer implementation 3.?mortbay. Parameters path Path 3. Logger 3. ja // Protected Fields protected org.?webapp.7.mortbay. Specified by: Method shutdown in interface LoaderMBean Shut server down 4.5.?server.webapp.Logger log . log protected static org.Logger log . // Public Constructors 593 . jettyConfig protected String jettyConfig .1.slf4j.?red5.Package org. Synopsis public class Red5WebPropertiesConfigurationimplements. protected static org.jetty.mortbay. Class Red5WebPropertiesConfiguration Red web properties configuration 4. removeContext(String) public void removeContext(String path).

WebAppContext context).WebAppContext getWebAppContext(). log protected static org. public void deconfigureWebApp() throws Exception. Logger 4.jetty. Specified by: Method configureClassLoader in interface Configuration 4.Logger log .WebAppContext _context . Specified by: Method configureDefaults in interface Configuration 4. notify .4. hashCode . equals . public void setWebAppContext(org. // Public Methods public void configureClassLoader() throws Exception. _context protected org. configureClassLoader() public void configureClassLoader() throws Exception.Package org. } Methods inherited from java.webapp. wait 4.Object: clone . finalize . configureDefaults() public void configureDefaults() throws Exception. toString . Web application context 4. public org.mortbay.6.jetty.slf4j.?server. public void configureDefaults() throws Exception.mortbay. getClass . public void configureWebApp() throws Exception.3. configureWebApp() public void configureWebApp() 594 .webapp.?jetty public Red5WebPropertiesConfiguration().mortbay.jetty.5.?red5. notifyAll .webapp.lang.2.

?server.webapp.webapp.jetty.WebAppContext getWebAppContext().?red5.WebAppContext context).jetty. setWebAppContext(WebAppContext) public void setWebAppContext(org.?jetty throws Exception.7. Specified by: Method deconfigureWebApp in interface Configuration 4.mortbay. Specified by: Method getWebAppContext in interface Configuration 4.8. getWebAppContext() public org. deconfigureWebApp() public void deconfigureWebApp() throws Exception.mortbay.9.Package org. Specified by: Method setWebAppContext in interface Configuration 595 . Specified by: Method configureWebApp in interface Configuration 4.

public static String trimClassName(String className). // Public Methods public String getHtmlAdapterPort(). public static boolean updateMBeanAttribute(javax. String key. Object handback).management. public void init().ObjectName name). javax.?NotificationListener { // Public Constructors public JMXAgent(). public static boolean updateMBeanAttribute(javax. public void setEnableHtmlAdapter(boolean enableHtmlAdapter).management. public static boolean unregisterMBean(javax. String className. Class interfaceClass. String key. public static boolean registerMBean(Object instance.management. Class interfaceClass).ObjectName oName.?management.ObjectName oName. public void setEnableHtmlAdapter(String enableHtmlAdapterString). int value).ObjectName oName). 1. String className. String className. // Public Static Methods public static boolean isEnableMinaMonitor().Notification notification. public void setEnableMinaMonitor(boolean enableMinaMonitor). public void handleNotification(javax. 596 . public static boolean registerMBean(Object instance. Class interfaceClass. Synopsis public class JMXAgentimplements.1.management. String name). public static boolean registerMBean(Object instance.1. Class JMXAgent Provides the connection adapters as well as registration and unregistration of MBeans.management. public static void shutdown(). String value). javax.

public void setEnableRmiAdapter(boolean enableRmiAdapter). hashCode .ObjectName oName). public void setStartRegistry(boolean startRegistry). wait 1. equals .?server. public void setRmiAdapterRemotePort(String rmiAdapterRemotePort). public void setRmiAdapterHost(String rmiAdapterHost).Package org. public void setRemotePasswordProperties(String remotePasswordProperties). shutdown() public static void shutdown(). public void setRemoteSSLKeystorePass(String remoteSSLKeystorePass). Parameters className return 1. notify . 597 .4.Object: clone . toString . Shuts down any instanced connectors. } Methods inherited from java. public void setHtmlAdapterPort(String htmlAdapterPort). Convienence to remove packages etc from a class name.?red5.?jmx public void setEnableMinaMonitor(String enableMinaMonitor). unregisterMBean(ObjectName) public static boolean unregisterMBean(javax. public void setRemoteSSLKeystore(String remoteSSLKeystore). public void setRmiAdapterPort(String rmiAdapterPort). finalize .3.management. public void setEnableRmiAdapter(String enableRmiAdapterString). notifyAll . getClass .2. trimClassName(String) public static String trimClassName(String className). public void setEnableSsl(boolean enableSsl). public void setRemoteAccessProperties(String remoteAccessProperties). 1. public void setEnableSsl(String enableSslString).lang.

For most classes the creation and registration is performed using StandardMBean wrappers. int) public static boolean updateMBeanAttribute(javax. If the instance is not found or if a failure occurs. updateMBeanAttribute(ObjectName. Parameters oName key value return 1.html?page=1 http:// java.5.sun. updateMBeanAttribute(ObjectName.management. Updates a named attribute of a registered mbean. int value).ObjectName oName.management.?red5.html 598 .com/javase/6/docs/technotes/guides/jmx/examples. Class JMXFactory Provides access to the MBeanServer as well as registration and creation of new MBean instances.?server. String) public static boolean updateMBeanAttribute(javax.Package org. String.com/pub/a/onjava/2004/09/29/tigerjmx. String key.com/developer/JDCTechTips/2005/tt0315. String.html#2 Examples: http://java. Updates a named attribute of a registered mbean. Parameters oName return 1. References: http://www. Parameters oName key value return 2. false will be returned.ObjectName oName. String value). String key.onjava.6.?jmx Unregisters an mbean instance.sun.

hashCode . String name).?red5. public static boolean registerNewMBean(String className. // Public Methods public String getDomain(). toString . equals .?server. wait 3.Package org. notify . Synopsis public class JMXFactory { // Public Constructors public JMXFactory().ObjectName name).ObjectName createObjectName(String[] strings). public static boolean registerNewMBean(String className. public static javax.lang. Class interfaceClass).management. Class interfaceClass. Class JMXUtil Helper methods for working with ObjectName or MBean instances.?jmx 2.management.management. getClass . javax.1. public static javax. 599 . notifyAll .management. public static javax.ObjectName objectName.MBeanServer getMBeanServer(). String objectNameStr).ObjectName createSimpleMBean(String className. // Public Static Methods public static void printMBeanInfo(javax.1.ObjectName createMBean(String className. 3. finalize .Object: clone . String attributes).management. Class interfaceClass. Synopsis public class JMXUtil { // Public Constructors public JMXUtil(). } Methods inherited from java.management. public void setDomain(String domain). // Public Static Methods public static javax. public static String getDefaultDomain(). public static boolean registerNewMBean(String className.

} Methods inherited from java.Package org.Object: clone .?jmx String className).?server. toString .?red5.lang. notify . wait 600 . hashCode . getClass . equals . finalize . notifyAll .

byte value).?server. Synopsis public class AbstractMessageimplements. public int getIntProperty(String name).?messaging. public void setCorrelationID(String id). protected java. public String getStringProperty(String name). protected String messageType . 601 .1. public Object getObjectProperty(String name). boolean value). public void setDoubleProperty(String name. org.?IMessage { // Protected Fields protected String correlationID . public String getCorrelationID(). public String getMessageID(). public String getMessageType(). public float getFloatProperty(String name). public double getDoubleProperty(String name). protected String messageID .1.util. public byte getByteProperty(String name). // Public Constructors public AbstractMessage(). // Public Methods public boolean getBooleanProperty(String name).?red5. public long getLongProperty(String name). Class AbstractMessage Abstract base for all messages 1. public void setBooleanProperty(String name. public short getShortProperty(String name).Map extraHeaders . public void setByteProperty(String name.

public void setFloatProperty(String name. String value). org.?RTMPMessage .?stream.?ResetMessage . hashCode . public void setShortProperty(String name.IMessage 1. public void setIntProperty(String name.?stream. } Direct known subclasses: org. public void setMessageType(String type).util. org.?red5. notify .lang. 1.messaging. extraHeaders protected java.Package org. public void setStringProperty(String name. public void setLongProperty(String name.?server.server. wait See Also org. public void setMessageID(String id).? StatusMessage Methods inherited from java.?server.?stream. 1. correlationID protected String correlationID .? red5.Map extraHeaders . Object value).?red5. float value).?server. getClass . equals . 1.?message. notifyAll . short value). finalize . messageType protected String messageType .?server. int value). 602 .?message.2.3. messageID protected String messageID . toString .Object: clone . public void setObjectProperty(String name.?message.red5.5. long value).4.?messaging double value).?red5.

getDoubleProperty(String) public double getDoubleProperty(String name).6. getBooleanProperty(String) public boolean getBooleanProperty(String name). Specified by: Method getFloatProperty in interface IMessage Return float property by name 1.7. Specified by: Method getLongProperty in interface IMessage 603 .11.Package org.9. getByteProperty(String) public byte getByteProperty(String name). getCorrelationID() public String getCorrelationID().?red5. Specified by: Method getBooleanProperty in interface IMessage Getter for boolean property 1. getLongProperty(String) public long getLongProperty(String name).?messaging 1. Specified by: Method getByteProperty in interface IMessage Add byte property to message 1.?server. Specified by: Method getIntProperty in interface IMessage Return int property by name 1.12.10. Specified by: Method getDoubleProperty in interface IMessage Return double property by name 1. getFloatProperty(String) public float getFloatProperty(String name). Specified by: Method getCorrelationID in interface IMessage Return correlation id 1.8. getIntProperty(String) public int getIntProperty(String name).

getStringProperty(String) public String getStringProperty(String name).?server. Specified by: Method getObjectProperty in interface IMessage Return object property to message 1. boolean value).16. byte) public void setByteProperty(String name. boolean) public void setBooleanProperty(String name. getShortProperty(String) public short getShortProperty(String name). Specified by: Method getMessageID in interface IMessage Return message id 1. getObjectProperty(String) public Object getObjectProperty(String name).Package org. Specified by: Method getShortProperty in interface IMessage Return short property to message 1. 604 . getMessageType() public String getMessageType(). Specified by: Method getMessageType in interface IMessage Return message type 1. Specified by: Method setBooleanProperty in interface IMessage Add boolean property to message 1.?red5.?messaging Return long property to message 1. setBooleanProperty(String.13. setByteProperty(String.18.17.14.19.15. getMessageID() public String getMessageID(). Specified by: Method getStringProperty in interface IMessage Return string property to message 1.

?server. Specified by: Method setLongProperty in interface IMessage Add long property to message 1.24. Specified by: Method setFloatProperty in interface IMessage Add float property to message 1.20. setFloatProperty(String. float) public void setFloatProperty(String name. Specified by: Method setDoubleProperty in interface IMessage Add double property to message 1. Specified by: Method setIntProperty in interface IMessage Add int property to message 1.Package org. Specified by: Method setByteProperty in interface IMessage Add byte property to message 1.?red5. int value).?messaging byte value). int) public void setIntProperty(String name. double) public void setDoubleProperty(String name. Specified by: Method setMessageID in interface IMessage 605 .21. setLongProperty(String. double value). setDoubleProperty(String. long) public void setLongProperty(String name. setIntProperty(String.22.25. long value). setMessageID(String) public void setMessageID(String id). setCorrelationID(String) public void setCorrelationID(String id).23. Specified by: Method setCorrelationID in interface IMessage Setter for correlation id 1. float value).

setStringProperty(String.?messaging Setter for new message id 1.List<org. protected volatile java.messaging. Object value).List<org. Aim to ease the implementation of concrete pipes. short value). setObjectProperty(String. Specified by: Method setStringProperty in interface IMessage Add string property to message 2. String) public void setStringProperty(String name.server. Synopsis public abstract class AbstractPipeimplements.server. Specified by: Method setShortProperty in interface IMessage Add short property to message 1.IProvider> providers .messaging.IPipeConnectionListener> listeners .?IPipe { // Protected Fields protected volatile java. // Public Constructors 606 .IConsumer> consumers . String value). Class AbstractPipe Abstract pipe that books providers/consumers and listeners.26.?server. see IPipe interface documentation.?server.red5.28.util. org.server.util.1. For more information on what pipe is. Specified by: Method setMessageType in interface IMessage Setter for message type 1.Package org. setShortProperty(String. short) public void setShortProperty(String name.util.?messaging. Object) public void setObjectProperty(String name.messaging. setMessageType(String) public void setMessageType(String type).List<org.?red5. 2.?red5.red5.29.red5. protected volatile java. Specified by: Method setObjectProperty in interface IMessage Add object property to message 1.27.

server.List<org.IProvider> getProviders(). int type.IPipeConnectionListener> getListeners(). // Public Methods public void addPipeConnectionListener(IPipeConnectionListener listener).Map paramMap).messaging. OOBControlMessage oobCtrlMsg).?server. public void sendOOBControlMessage(IConsumer consumer. public void sendOOBControlMessage(IProvider provider.?server. hashCode .Map paramMap). public void setListeners(java.?messaging. notifyAll .?messaging public AbstractPipe().util.util.?InMemoryPushPushPipe Methods inherited from java.2. java. public java. protected void firePipeConnectionEvent(PipeConnectionEvent event).Map paramMap).messaging.lang.IPipeConnectionListener> listene public boolean subscribe(IConsumer consumer.util.red5.server.util. public boolean unsubscribe(IConsumer consumer).messaging.util.messaging.util. int type. public java. equals . consumers 607 .server.Package org.IConsumer> getConsumers().Map paramMap).?InMemoryPullPullPipe .red5.List<org.?red5. toString . finalize . } Direct known subclasses: org.util. wait See Also org.red5. public boolean subscribe(IProvider provider.IPipe 2.?server.server. protected void fireProviderConnectionEvent(IProvider provider.List<org. java. public void removePipeConnectionListener(IPipeConnectionListener listener).messaging. public boolean unsubscribe(IProvider provider). // Protected Methods protected void fireConsumerConnectionEvent(IConsumer consumer. getClass .Object: clone . org.?messaging.red5.List<org. java.util. java. notify .?red5. public java. OOBControlMessage oobCtrlMsg).?red5.server.red5.

List<org.red5. Map) protected void fireConsumerConnectionEvent(IConsumer consumer.List<org.List<org. Pipe consumers list 2.6.messaging.red5. Event listeners 2.?server.util.util.util. firePipeConnectionEvent(PipeConnectionEvent) protected void firePipeConnectionEvent(PipeConnectionEvent event).5. Fire any pipe connection event and run all it's tasks Parameters event Pipe connection event 608 .server. Pipe providers list 2.messaging. listeners protected volatile java. int type. providers protected volatile java.util.messaging.7.red5.server. Broadcast consumer connection event Parameters consumer type paramMap Consumer that has connected Event type Parameters passed with connection 2.4.server. fireConsumerConnectionEvent(IConsumer.IProvider> providers .3.IConsumer> consumers .IPipeConnectionListener> listeners .?red5.?messaging protected volatile java. addPipeConnectionListener(IPipeConnectionListener) public void addPipeConnectionListener(IPipeConnectionListener listener).Package org. Specified by: Method addPipeConnectionListener in interface IPipe Registers pipe connect events listener Parameters listener Listener 2.Map paramMap). java. int.

Getter for providers Parameters return Providers list 2.IConsumer> getConsumers().red5.util. Specified by: Method removePipeConnectionListener in interface IPipe Removes pipe connection listener 609 .Package org.messaging.IProvider> getProviders().10. Getter for consumers Parameters return consumers list 2.server. getListeners() public java.List<org. Getter for pipe connection events listeners Parameters return Listeners 2.server.red5. java.util.red5.?server.8. getProviders() public java.util. Map) protected void fireProviderConnectionEvent(IProvider provider. Broadcast provider connection event Parameters provider type paramMap Provider that has connected Event type Parameters passed with connection 2.server.Map paramMap). removePipeConnectionListener(IPipeConnectionListener) public void removePipeConnectionListener(IPipeConnectionListener listener).11.IPipeConnectionListener> getListeners().messaging. int type.List<org.12.?messaging 2.9. getConsumers() public java. int.List<org.messaging.util.?red5. fireProviderConnectionEvent(IProvider.

util. Connect consumer to this pipe.15.red5.?server.Map paramMap). OOBControlMessage) public void sendOOBControlMessage(IProvider provider. Doesn't allow to connect one consumer twice.Package org. java.util. OOBControlMessage oobCtrlMsg). Send out-of-band ("special") control message to all providers Parameters consumer oobCtrlMsg Consumer.IPipeConnectionListener> listeners Setter for pipe connection events listeners Parameters listeners Listeners 2.List<org. Map) public boolean subscribe(IConsumer consumer. may be used in concrete implementations Out-of-band control message 2. used in concrete pipe implementations 610 . sendOOBControlMessage(IConsumer.messaging.server. Parameters consumer paramMap Consumer Parameters passed with connection. Does register event listeners if instance of IPipeConnectionListener is given.16. sendOOBControlMessage(IProvider. setListeners(List<IPipeConnectionListener>) public void setListeners(java. OOBControlMessage) public void sendOOBControlMessage(IConsumer consumer. Send out-of-band ("special") control message to all consumers Parameters provider oobCtrlMsg Provider.14. OOBControlMessage oobCtrlMsg). subscribe(IConsumer.?red5. may be used in concrete implementations Out-of-band control message 2.13.?messaging Parameters listener Listener 2.

unsubscribe(IProvider) public boolean unsubscribe(IProvider provider).?server. Parameters provider return Provider that should be removed true on success. org. false otherwise 3.17. subscribe(IProvider.?red5.1. Parameters consumer return Consumer that should be removed true on success.?messaging return true if consumer was added. Does register event listeners if instance of IPipeConnectionListener is given. Doesn't allow to connect one provider twice. false otherwise 2. Fires pipe connection event. Interface IConsumer Signature for the message consumer. unsubscribe(IConsumer) public boolean unsubscribe(IConsumer consumer).util.Map paramMap). 3. Fires pipe connection event. Map) public boolean subscribe(IProvider provider.?IMessageComponent { } 611 . Parameters provider paramMap Provider Parameters passed with connection.Package org. false otherwise 2.?messaging. Disconnects provider from this pipe. false otherwise 2. Connect provider to this pipe. Disconnects consumer from this pipe.19. java. used in concrete pipe implementations true return if provider was added.?server.18. Synopsis public interface IConsumer extends.?red5.

Synopsis } public interface IFilter extends. Structure of messages is designed according to JMS Message interface.?red5. public int getIntProperty(String name). org.1.?messagi 5.?server.?messaging 4.?messaging. public long getLongProperty(String name). 612 . public String getStringProperty(String name). Each message has correlation ID that is never used so far and is subject to be removed in future. public byte getByteProperty(String name). Synopsis public interface IMessage { // Public Methods public boolean getBooleanProperty(String name).Package org. 5. public Object getObjectProperty(String name). public String getCorrelationID(). public void setBooleanProperty(String name.?server. Interface IMessage Common interface for all messages. org.?red5. Message is composed of header and body.?server. public float getFloatProperty(String name). public String getMessageID(). public short getShortProperty(String name). Interface IFilter Filter marker interface groups consumer and provider interfaces 4.?red5.?IConsumer. Message has type and number of properties. public String getMessageType(). public double getDoubleProperty(String name).1. Header contains commonly used pre-defined headers and extensible headers.

public void setObjectProperty(String name. getByteProperty(String) public byte getByteProperty(String name). getBooleanProperty(String) public boolean getBooleanProperty(String name).?red5.Package org. public void setStringProperty(String name. public void setIntProperty(String name. double value).?messaging boolean value). public void setFloatProperty(String name.2. public void setDoubleProperty(String name. public void setLongProperty(String name.?server. float value). } 5. Getter for boolean property Parameters name return Boolean property name Boolean property 5. public void setByteProperty(String name. long value). byte value). public void setCorrelationID(String id). short value). int value).3. public void setShortProperty(String name. public void setMessageID(String id). public void setMessageType(String type). Add byte property to message Parameters name Byte property name 613 . Object value). String value).

4. Return double property by name Parameters name return Double property name Double property value 5. Return correlation id Parameters return Correlation id 5.5.7.?messaging return Byte property value 5. getCorrelationID() public String getCorrelationID(). getFloatProperty(String) public float getFloatProperty(String name). getDoubleProperty(String) public double getDoubleProperty(String name). Return long property to message 614 .6.8. Return int property by name Parameters name return Int property name Int property value 5. getIntProperty(String) public int getIntProperty(String name). Return float property by name Parameters name return Float property name Float property value 5.?server. getLongProperty(String) public long getLongProperty(String name).Package org.?red5.

getStringProperty(String) public String getStringProperty(String name). getMessageID() public String getMessageID().Package org.13. Return message type Parameters return Message type 5.9. Return message id Parameters return Message id 5. 615 . Return short property to message Parameters name return Short property name Short property value 5. getObjectProperty(String) public Object getObjectProperty(String name). getShortProperty(String) public short getShortProperty(String name).?red5. getMessageType() public String getMessageType(). Return object property to message Parameters name return Object property name Object property value 5.?messaging Parameters name return Long property name Long property value 5.?server.10.11.12.

15. double value). setBooleanProperty(String. Add boolean property to message Parameters name value Boolean property name Boolean property value 5. setCorrelationID(String) public void setCorrelationID(String id).Package org. byte value). boolean) public void setBooleanProperty(String name. Setter for correlation id Parameters id Correlation id 5. double) public void setDoubleProperty(String name.?server.16.?messaging Return string property to message Parameters name return String property name String property value 5.?red5. boolean value). Add byte property to message Parameters name value Byte property name Byte property value 5. setDoubleProperty(String.17. byte) public void setByteProperty(String name.14. setByteProperty(String. Add double property to message Parameters name Double property name 616 .

long value). float) public void setFloatProperty(String name. int value). setFloatProperty(String. Setter for new message id Parameters id Message id 5. int) public void setIntProperty(String name. Add int property to message Parameters name value Int property name Int property value 5. setMessageID(String) public void setMessageID(String id).20. setMessageType(String) public void setMessageType(String type).?messaging value Double property value 5. long) public void setLongProperty(String name. Add float property to message Parameters name value Float property name Float property value 5. setLongProperty(String. Add long property to message Parameters name value Long property name Long property value 5.21.22. 617 . float value).18.19. setIntProperty(String.Package org.?red5.?server.

?red5. Synopsis public interface IMessageComponent { // Public Methods public void onOOBControlMessage(IMessageComponent source. Object value). setObjectProperty(String.24.?messaging Setter for message type Parameters type Message type 5.23. short) public void setShortProperty(String name. setShortProperty(String. String value).Package org. short value). Add object property to message Parameters name value Object property name Object property value 5.?server. Add string property to message Parameters name value String property name String property value 6.25. String) public void setStringProperty(String name. setStringProperty(String.1. 618 . Interface IMessageComponent Message component handles out-of-band control messages 6. Add short property to message Parameters name value Short property name Short property value 5. Object) public void setObjectProperty(String name.

onOOBControlMessage(IMessageComponent.server.List<org.Map paramMap). } 7. public IMessage pullMessage() throws IOException. public void sendOOBControlMessage(IConsumer consumer. OOBControlMessage) public void onOOBControlMessage(IMessageComponent source. OOBControlMessage oobCtrlMsg). public boolean subscribe(IConsumer consumer.List<org. Interface IMessageInput Input Endpoint for a consumer to connect.red5. public IMessage pullMessage(long wait).util. java. IPipe pipe.?messaging IPipe pipe.util.messaging.?server. OOBControlMessage oobCtrlMsg).IConsumer> getConsumers().util.1. public boolean unsubscribe(IConsumer consumer).IConsumer> getConsumers().2. getConsumers() public java.Package org. 619 . } 6. IPipe. Getter for consumers list.?red5. Parameters source pipe oobCtrlMsg Message component source Connection pipe TODO Out-of-band control message 7.red5.messaging.server. Synopsis public interface IMessageInput { // Public Methods public java.2. 7. OOBControlMessage oobCtrlMsg).

4.util. 7. pullMessage(long) public IMessage pullMessage(long wait). Parameters return The pulled message or null if message is not available. Wait wait milliseconds if message is not available. 620 . Return w/o waiting. OOBControlMessage) public void sendOOBControlMessage(IConsumer consumer.Package org. 7. OOBControlMessage oobCtrlMsg). 7. Parameters wait return milliseconds to wait when message is not available.?messaging Parameters return Consumers. Map) public boolean subscribe(IConsumer consumer. Parameters consumer paramMap return Consumer Parameters map true when successfully subscribed.5. Connect to a consumer.3.?red5. Pull message from this input endpoint. subscribe(IConsumer. Send OOB Control Message to all providers on the other side of pipe. pullMessage() public IMessage pullMessage() throws IOException. Pull message from this input endpoint.?server.6. Parameters consumer oobCtrlMsg The consumer that sends the message Out-of-band control message 7. false otherwise.Map paramMap). java. The pulled message or null if message is not available. sendOOBControlMessage(IConsumer.

pushMessage(IMessage) public void pushMessage(IMessage message) throws IOException.IProvider> getProviders(). May block the pusher when output can't handle the message at the time. Push a message to this output endpoint.server.?server.?red5. unsubscribe(IConsumer) public boolean unsubscribe(IConsumer consumer).?messaging 7. Getter for providers Parameters return Providers 8.util. Synopsis public interface IMessageOutput { // Public Methods public java.7.1.util. } 8. public boolean subscribe(IProvider provider.Package org.3. 8.Map paramMap).IProvider> getProviders(). Parameters consumer return Consumer to disconnect true when successfully unsubscribed.2. getProviders() public java.messaging.List<org. Disconnect from a consumer. public void pushMessage(IMessage message) throws IOException. 8.List<org.util.red5. false otherwise. OOBControlMessage oobCtrlMsg).red5. java. 621 . public void sendOOBControlMessage(IProvider provider.server. Interface IMessageOutput Output Endpoint for a provider to connect.messaging. public boolean unsubscribe(IProvider provider).

OOBControlMessage oobCtrlMsg).Map paramMap). Disconnect from a provider.?red5.connect in client-side Flex/Flash RIA. false otherwise.6.?messaging Parameters message IOException Message to be pushed. java. Parameters provider paramMap return Provider Params passed with connection true when successfully subscribed. 9.util. 8. 8. unsubscribe(IProvider) public boolean unsubscribe(IProvider provider).4. subscribe(IProvider. Map) public boolean subscribe(IProvider provider. sendOOBControlMessage(IProvider. If message could not be written. OOBControlMessage) public void sendOOBControlMessage(IProvider provider. Connect to a provider. Interface IPassive Signature to mark a provider/consumer never actively providers/consumers messages.Package org. Parameters provider return Provider true when successfully unsubscribed. Synopsis public interface IPassive { 622 .1.5.?server. 9. false otherwise. Note that params passed has nothing to deal with NetConnection. Send OOB Control Message to all consumers on the other side of pipe. Parameters provider oobCtrlMsg The provider that sends the message Out-of-band control message 8.

Package org. org. public void removePipeConnectionListener(IPipeConnectionListener listener). org.?messa // Public Methods public void addPipeConnectionListener(IPipeConnectionListener listener). removePipeConnectionListener(IPipeConnectionListener) public void removePipeConnectionListener(IPipeConnectionListener listener).?messaging. 11.3.1.2. Its main function is to transport messages in kind of ways it provides. } 10.1.?server.?server. } 10. Interface IPipe A pipe is an object that connects message providers and message consumers.?red5. these events are common way to work with pipes for higher level parts of server. Pipes fire events as they go. 10. Synopsis public interface IPipe extends.?red5.?red5.?messaging // Public Static Fields public static final String KEY . addPipeConnectionListener(IPipeConnectionListener) public void addPipeConnectionListener(IPipeConnectionListener listener).?IMessageInput.?server. Interface IPipeConnectionListener A listener that wants to listen to events when provider/consumer connects to or disconnects from a specific pipe. Add connection event listener to pipe Parameters listener Connection event listener 11. Synopsis public interface IPipeConnectionListener { 623 . Add connection event listener to pipe Parameters listener Connection event listener 10.

Synopsis public interface IProvider extends. org. Interface IProvider Signature for message provider. } 14. Pipe connection event handler Parameters event Pipe connection event 12.Package org.?server.?red5.?IProvider { // Public Static Fields public static final String KEY .?messaging.?red5. onPipeConnectionEvent(PipeConnectionEvent) public void onPipeConnectionEvent(PipeConnectionEvent event). 12.?red5.?server.?messaging.1.2. 13. } 11. // Public Methods public IMessage pullMessage(IPipe pipe) throws IOException. Interface IPullableProvider A provider that supports passive pulling of messages. public IMessage pullMessage(IPipe pipe.?server. long wait) throws IOException.?messaging // Public Methods public void onPipeConnectionEvent(PipeConnectionEvent event).1. Synopsis public interface IPullableProvider extends. org. Interface IPushableConsumer 624 .?IMessageComponent { } 13.

Package org.?server. } 14. public void pushMessage(IMessage message). Pushes message through pipe Parameters pipe message IOException Pipe Message if message could not be written 15.?messaging A consumer that supports event-driven message handling and message pushing through pipes. It is triggered by an active consumer that pulls messages through it from a pullable provider. IMessage message) throws IOException. // Public Methods public IMessage pullMessage() throws IOException.?messaging.1. IMessage message) throws IOException.?server. Class InMemoryPullPullPipe A simple in-memory version of pull-pull pipe. 15.?messaging. // Public Methods public void pushMessage(IPipe pipe.?IConsumer { // Public Static Fields public static final String KEY . IMessage) public void pushMessage(IPipe pipe.?red5. 14. org. pushMessage(IPipe.1. 625 .2.?red5.?server. Synopsis public class InMemoryPullPullPipe extends. Synopsis public interface IPushableConsumer extends.?red5.?AbstractPipe { // Public Constructors public InMemoryPullPullPipe(). org. public IMessage pullMessage(long wait).

notifyAll . subscribe(IProvider.?AbstractPipe { // Public Constructors 626 .util. pushMessage(IMessage) public void pushMessage(IMessage message). org.red5. 15. Map) public boolean subscribe(IProvider provider. notify . providers 15.messaging.lang. removePipeConnectionListener . fireProviderConnectionEvent . setListeners . listeners . java.4.3.util.?red5. unsubscribe Methods inherited from java. sendOOBControlMessage .Map paramMap). Class InMemoryPushPushPipe A simple in-memory version of push-push pipe.messaging. 15.2. getProviders .?server. 16.server. 15. public boolean subscribe(IProvider provider. getListeners .?server. pullMessage() public IMessage pullMessage() throws IOException. equals .util. 16. getClass .5. wait Fields inherited from org. fireConsumerConnectionEvent . subscribe(IConsumer.?messaging.Map paramMap).red5. java. Synopsis public class InMemoryPushPushPipe extends. hashCode .?red5. pullMessage(long) public IMessage pullMessage(long wait).Map paramMap).AbstractPipe: consumers . toString . 15. getConsumers .Package org.1.Object: clone . Map) public boolean subscribe(IConsumer consumer.server.util.AbstractPipe: addPipeConnectionListener .Map paramMap). } Methods inherited from org. It is triggered by an active provider to push messages through it to an event-driven consumer. java.?messaging public boolean subscribe(IConsumer consumer. subscribe . firePipeConnectionEvent .6. finalize . java.

Pushes a message out to all the PushableConsumers. getConsumers . fireConsumerConnectionEvent . equals . // Public Methods public IMessage pullMessage(). subscribe(IProvider.Map paramMap). fireProviderConnectionEvent . pullMessage(long) public IMessage pullMessage(long wait). pullMessage() public IMessage pullMessage(). public void pushMessage(IMessage message) throws IOException. 16.AbstractPipe: addPipeConnectionListener . notifyAll . public IMessage pullMessage(long wait).server. listeners .server.?red5.?server. pushMessage(IMessage) public void pushMessage(IMessage message) throws IOException. hashCode . getListeners . notify .messaging.4. getProviders .5. subscribe . toString . 16.lang. finalize .messaging. unsubscribe Methods inherited from java. providers 16. Map) public boolean subscribe(IConsumer consumer.2. firePipeConnectionEvent . } Methods inherited from org. 16.util. wait Fields inherited from org.red5.util. 16. subscribe(IConsumer. Map) public boolean subscribe(IProvider provider.util. sendOOBControlMessage .Object: clone . removePipeConnectionListener . public boolean subscribe(IConsumer consumer.Map paramMap).Package org. public boolean subscribe(IProvider provider.Map paramMap). java. setListeners . 627 .?messaging public InMemoryPushPushPipe(). java. getClass .AbstractPipe: consumers .6.red5. java.3.

public String getTarget().3. Out-of-band data is a separate data stream used for specific purposes (in TCP it's referenced as "urgent data"). finalize . } Methods inherited from java.?messaging java. 'Target' is used to represent the receiver who may be interested for receiving. 628 . public void setServiceName(String serviceName). Synopsis public class OOBControlMessageimplements. // Public Methods public Object getResult(). hashCode .Object: clone . public java. getResult() public Object getResult().?io.util. toString . wait 17. It's a string of any form. Getter for property 'result'. public void setResult(Object result).instance"? 17.1.lang.Map paramMap). notifyAll .?Serializable { // Public Constructors public OOBControlMessage(). Class OOBControlMessage Out-of-band control message used by inter-components communication which are connected with pipes. notify . XXX shall we design a standard form for Target. getServiceName() public String getServiceName(). 17. like "class.util. public String getServiceName(). java. 17. getClass .Map serviceParamMap). like lifecycle control. public void setTarget(String target). public void setServiceParamMap(java.Package org.2.util.?red5. equals .?server. Parameters return Value for property 'result'.Map getServiceParamMap().

17. Getter for property 'serviceParamMap'. 17.7. 17.?server. setResult(Object) public void setResult(Object result). Setter for property 'serviceParamMap'. Setter for property 'serviceName'.6. getServiceParamMap() public java.Map serviceParamMap). setServiceName(String) public void setServiceName(String serviceName).Map getServiceParamMap(). Parameters result Value to set for property 'result'.8. Parameters return Value for property 'target'.?messaging Getter for property 'serviceName'. getTarget() public String getTarget().util. Parameters return Value for property 'serviceName'. Setter for property 'result'.util. Parameters serviceName Value to set for property 'serviceName'. setServiceParamMap(Map) public void setServiceParamMap(java. Parameters return Value for property 'serviceParamMap'. Getter for property 'target'. 17.5.Package org. 17.4. Parameters 629 .?red5.

public int getType(). 18. // Public Constructors public PipeConnectionEvent(Object source).util. public IProvider getProvider().1.Package org. public IConsumer getConsumer().?messaging serviceParamMap Value to set for property 'serviceParamMap'. public static final int PROVIDER_CONNECT_PULL = 0. setTarget(String) public void setTarget(String target). Parameters target Value to set for property 'target'. 17. 18. public java. java.?red5. public void setConsumer(IConsumer consumer).Map paramMap). public static final int CONSUMER_CONNECT_PUSH = 4.util. 630 .?util. Setter for property 'target'. public static final int PROVIDER_CONNECT_PUSH = 1. Synopsis public class PipeConnectionEvent extends.9. public void setParamMap(java. Class PipeConnectionEvent Event object corresponds to the connect/disconnect events among providers/consumers and pipes. // Public Methods public void addTask(Runnable task).?server.?EventObject { // Public Static Fields public static final int CONSUMER_CONNECT_PULL = 3.Map getParamMap(). public static final int CONSUMER_DISCONNECT = 5. public void setProvider(IProvider provider). public static final int PROVIDER_DISCONNECT = 2.

CONSUMER_DISCONNECT public static final int CONSUMER_DISCONNECT = 5. CONSUMER_CONNECT_PUSH public static final int CONSUMER_CONNECT_PUSH = 4. 18.?messaging public void setType(int type). hashCode .?server.6.lang. 18. 18. equals . PROVIDER_CONNECT_PULL public static final int PROVIDER_CONNECT_PULL = 0. } Methods inherited from java.util. PipeConnectionEvent(Object) public PipeConnectionEvent(Object source). notify . CONSUMER_CONNECT_PULL public static final int CONSUMER_CONNECT_PULL = 3. 18.3. wait Fields inherited from java. A consumer connects as push mode.7.EventObject: source 18. 18. PROVIDER_DISCONNECT 631 . PROVIDER_CONNECT_PUSH public static final int PROVIDER_CONNECT_PUSH = 1.Package org.8. Construct an object with the specific pipe as the source Parameters source A pipe that triggers this event. getClass . A provider connects as pull mode.Object: clone . notifyAll . 18.2.4.5. A consumer connects as pull mode.?red5. toString Methods inherited from java. A consumer disconnects.EventObject: getSource . A provider connects as push mode.util. finalize .

13.Map getParamMap(). Return event type Parameters return Event type 632 .10. Return event parameters as Map Parameters return Event parameters as Map 18.util. getProvider() public IProvider getProvider().12. Return pipe connection consumer Parameters return Consumer 18.11. 18. addTask(Runnable) public void addTask(Runnable task). Return pipe connection provider Parameters return Provider 18. A provider disconnects.9.?server.Package org. getParamMap() public java. Add task to list Parameters task Task to add 18.?red5.?messaging public static final int PROVIDER_DISCONNECT = 2. getType() public int getType(). getConsumer() public IConsumer getConsumer().

util.15. Class PipeUtils Helper class for pipe structure. setType(int) public void setType(int type). Setter for pipe connection consumer Parameters consumer Consumer 18. Synopsis public class PipeUtils { // Public Constructors public PipeUtils().14. // Public Static Methods public static void connect(IProvider provider.?red5.?messaging 18.Package org. Setter for event type Parameters type Event type 19. setParamMap(Map) public void setParamMap(java. Setter for pipe connection provider Parameters provider Provider 18.1.Map paramMap). setProvider(IProvider) public void setProvider(IProvider provider).?server. 633 .17. 19. setConsumer(IConsumer) public void setConsumer(IConsumer consumer). Setter for event parameters map Parameters paramMap Event parameters as Map 18.16.

hashCode .lang. Parameters provider pipe consumer Provider Pipe that used to estabilish connection Consumer 19. disconnect(IProvider.3. wait 19.2. IConsumer) public static void disconnect(IProvider provider. connect(IProvider.?messaging IPipe pipe.?server. IPipe. Connect a provider/consumer with a pipe. getClass . Parameters provider pipe consumer Provider Pipe to disconnect from Consumer 634 . public static void disconnect(IProvider provider. IConsumer consumer). toString . IConsumer) public static void connect(IProvider provider. IPipe pipe. IPipe. IConsumer consumer). } Methods inherited from java. equals . IPipe pipe. IConsumer consumer).Package org. notifyAll . IConsumer consumer).?red5. notify .Object: clone . Disconnect a provider/consumer from a pipe. IPipe pipe. finalize .

hashCode .MidiDevice getMidiDevice(String name).Object: clone .io.File midiFile).sound. public boolean connect().sound.so. // Public Static Methods public static void main(String[] args). hashCode .lang. finalize . notifyAll . equals .midi. toString . toString .1. wait 3. // Public Constructors public SharedMidiObject(String deviceName. getClass .ISharedObject so . } Methods inherited from java.lang.red5. equals . notify .server. org.Object: clone . // Public Static Methods public static javax. Synopsis public class MidiPlayer { // Public Constructors public MidiPlayer(java.ISharedObject so). protected String deviceName . getClass .api.red5. // Public Methods public void close().so.api. protected org. Class SharedMidiObject. Class SharedMidiObject public class SharedMidiObject { // Protected Fields protected javax.MidiDevice dev .1.midi. } Methods inherited from java. wait 2.MidiReceiver 635 . notify . finalize .server. Class MidiPlayer Plays a midi file provided on command line 1. notifyAll .

equals .Object: clone . hashCode .MidiMessage midi. long time). finalize . notify . toString . // Public Methods public void close().2.?Receiver { // Public Constructors public SharedMidiObject. public static void main(String[] args) throws Exception.MidiMessage midi.1. } Methods inherited from java. equals . wait 636 . long time).Package org. finalize .?red5.Object: clone .?sound.lang. Specified by: Method close in interface Receiver 3.midi. } Methods inherited from java.lang. send(MidiMessage.MidiDevice getMidiDevice(String name). Specified by: Method send in interface Receiver 4. // Public Static Methods public static javax.sound. close() public void close(). hashCode . Class Test public class Test { // Protected Fields protected static org. javax. getClass . // Public Constructors public Test() throws Exception.sound. notifyAll .?midi public class SharedMidiObject.slf4j.?midi. public void send(javax.Logger log .sound. long) public void send(javax. notify . notifyAll .MidiReceiverimplements. wait 3.?server. getClass . toString .midi.midi.MidiReceiver().

2. finalize .sound.midi.lang. Class Test. notify .1. notifyAll . } Methods inherited from java. close() public void close().?midi. equals . toString .MyReceiver public class Test.Object: clone .MyReceiver(). // Public Methods public void close().MidiMessage midi. Constructs a new Test. hashCode . 5.1. long) public void send(javax.MyReceiverimplements. long time).midi.?midi 4. javax. public void send(javax.?sound. Test() public Test() throws Exception.?Receiver { // Public Constructors public Test. long time). Specified by: Method send in interface Receiver 637 . wait 5. send(MidiMessage.?red5. getClass .?server.sound.MidiMessage midi.Package org. Specified by: Method close in interface Receiver 5.

red5.1. hasEventsWaiting(IConnection) public boolean hasEventsWaiting(org.red5.server. public java.api. pickupEvents(IConnection) public java.server.Iterator<org.1.server. Interface IConnectionEventQueue Queue of connection events 1.api.IConn } 1.Iterator<org.2.red5. false otherwise 1.server.IConnection conn).event.red5.red5.IEvent> pickupEvents(org.event.util.util.IEvent> pickupEvents(org. Whether queue has waiting connection events Parameters conn return Connection true if queue has waiting events for connection.IConnection conn). Synopsis public interface IConnectionEventQueue { // Public Methods public boolean hasEventsWaiting(org.3.IConnec Return iterator over waiting events Parameters conn return Connection Iterator over events 638 .server.api.server.api.red5.api.api.

Specified by: Method connect in interface IMRTMPConnection Send connect message to other side Parameters clientId Description copied from interface: connect 1.?net.mina. getClass .rtmp. } Direct known subclasses: org.apache. org. Specified by: Method disconnect in interface IMRTMPConnection Send disconnect message to other side Parameters 639 .?red5. public void disconnect(int clientId). notifyAll .?server. notify .IoSession ioSession).server.lang. public void setIoSession(org.?red5. wait 1. finalize . public void connect(int clientId).message. org.2.?mrtmp. // Public Methods public void close(). Class BaseMRTMPConnection public class BaseMRTMPConnectionimplements. org. equals .net. connect(int) public void connect(int clientId).IoSession getIoSession().1.common.Packet packet). public org. hashCode .common.red5.?red5.?MRTMPEdgeConnection . toString .?server.?mrtmp. disconnect(int) public void disconnect(int clientId).1.?net.?mrtmp.?net. public void write(int clientId.?MRTMPOriginConnection Methods inherited from java.Object: clone .apache.?IMRTMPConnection { // Public Constructors public BaseMRTMPConnection().mina.?server.

?server.?common.apache. Class EdgeMRTMPHandler public class EdgeMRTMPHandler extends.rtmp. Object message) throws Exception. Object message) throws Exception.IoSession session.?apache.apache.common. Specified by: Method write in interface IMRTMPConnection Send RTMP packet to other side Parameters clientId packet Description copied from interface: write 2.red5.IoSession session) throws Exception. public void setCodecFactory(org. public void sessionClosed(org. public void setRtmpConnManager(org.?mina.?rtmp.Packet packet).?net. sessionClosed .?IoHandlerAdapter implements. public void messageSent(org.Package org. org. Packet) public void write(int clientId. org.common.apache. public void sessionCreated(org. sessionIdle . public void setMrtmpManager(IMRTMPEdgeManager mrtmpManager).IRTMPConnManager rtmpConnManager).apache.?red5.server.mina.?red5.mina.mina.IoHandlerAdapter: exceptionCaught . sessionCreated .?message. // Public Methods public void messageReceived(org.message.IoSession session) throws Exception. sessionOpened 640 .common.ProtocolCodecFactory codecFactory). messageReceived .IoSession session.red5.common.?mrtmp clientId Description copied from interface: disconnect 1. write(int.apache.net.?server.mina. org.filter.mina. messageSent .common.rtmp.server.mina.3.codec.?net.net.apache. } Methods inherited from org.?Constants { // Public Constructors public EdgeMRTMPHandler().

message. disconnect(int) public void disconnect(int clientId). Send RTMP packet to other side Parameters clientId packet 641 .server. public void disconnect(int clientId). public void connect(int clientId). connect(int) public void connect(int clientId).1. org.?net.net. Send connect message to other side Parameters clientId 3.?mrtmp Methods inherited from java. getClass .rtmp.3. public void write(int clientId.server. toString . finalize . equals .message. Interface IMRTMPConnection public interface IMRTMPConnection { // Public Methods public void close().rtmp.Packet packet).lang.red5.2.Packet packet).?server. wait 3.red5.Object: clone . notifyAll . } 3. Send disconnect message to other side Parameters clientId 3. notify .net.Package org.?red5. write(int. hashCode . Packet) public void write(int clientId. org.

public boolean registerConnection(IMRTMPConnection conn).1. public boolean unregisterConnection(IMRTMPConnection conn).?net.red5.1. Map a client to an Edge/Origin MRTMP connection. Register a MRTMP connection so that it can be later been looked up.?net. org.rtmp.?server.?red5.?server. On Edge. } 5.net. Parameters conn return 5. Interface IMRTMPEdgeManager A tag interface. registerConnection(IMRTMPConnection) public boolean registerConnection(IMRTMPConnection conn).?IMRTMPManager { } 5.server. Interface IMRTMPManager public interface IMRTMPManager { // Public Methods public IMRTMPConnection lookupMRTMPConnection(org. the server will find an Origin connection per routing logic.?mrtmp.?red5. On Origin.2.rtmp.?mrtmp 4.RTMPConnection conn). 4.RTMPConnection conn). the server will send to the original in-coming connection if the client connection type is persistent.net. Or the latest in-coming connection will be used.red5. Parameters conn return whether the registration is successful 642 . Synopsis public interface IMRTMPEdgeManager extends.server.Package org. lookupMRTMPConnection(RTMPConnection) public IMRTMPConnection lookupMRTMPConnection(org.

?mrtmp. Parameters clientId conn 6.rtmp.server.net.?server. Deassociate the client from the MRTMP connection previously associated to. org.net.server. } 6. IMRTMPConnection) public void associate(org.server.rtmp.Package org. Parameters rtmpConn 7. Associate the client to a MRTMP connection so that the packet will be sent via this MRTMP connection.RTMPConnection rtmpConn). The association has different impacts on persistent and polling connections. public void dissociate(org.red5. For persistent connection.?red5.net.2.?server. Unregister a MRTMP connection.RTMPConnection rtmpConn).red5. IMRTMPConnection mrtmpConn).3.server.1. associate(RTMPConnection.RTMPConnection rtmpConn. IMRTMPConnection mrtmpConn).rtmp. Class MRTMPClient 643 .rtmp. the mapping is static while for polling connection.net.RTMPConnection rtmpConn.?net. dissociate(RTMPConnection) public void dissociate(org. Parameters conn return whether the registration is successful 6.red5.?net.?IMRTMPManager { // Public Methods public void associate(org.?red5.?mrtmp 5. Interface IMRTMPOriginManager public interface IMRTMPOriginManager extends. unregisterConnection(IMRTMPConnection) public boolean unregisterConnection(IMRTMPConnection conn).red5. the mapping is dynamic and might not be honored.

java. } Methods inherited from java. } Methods inherited from org. public void start().common.IoHandler getIoHandler(). setIoSession . notifyAll .?server.apache. notify . hashCode .lang. getClass . wait 8. public void setIoHandler(org.Object: clone .IoHandler ioHandler).mina.?net. hashCode . disconnect .?Runnable { // Public Constructors public MRTMPClient(). equals . write Methods inherited from java.?mrtmp public class MRTMPClientimplements. public int getPort(). public String getServer(). getIoSession . org. notifyAll . toString .?net.mina.mrtmp.Package org. // Public Methods 644 .?mrtmp. notify .?server.?lang. finalize . // Public Methods public org.common. public void setPort(int port). finalize .?red5. public void setServer(String address). wait 9. equals .red5.BaseMRTMPConnection: close . Class MRTMPEdgeConnection public class MRTMPEdgeConnection extends.Object: clone . getClass . toString .?BaseMRTMPConnection { // Public Constructors public MRTMPEdgeConnection().server. public void run().lang. Class MRTMPMinaTransport public class MRTMPMinaTransport { // Public Constructors public MRTMPMinaTransport(). connect .net.?red5.apache.

public void setEventThreadsCore(int eventThreadsCore). wait 10. public void setEventThreadsKeepalive(int eventThreadsKeepalive). write 645 . getIoSession . public void start() throws Exception. toString .BaseMRTMPConnection: close .apache. org.?mrtmp public void setAddress(String address).?net. equals . public void setReceiveBufferSize(int receiveBufferSize). public void setSendBufferSize(int sendBufferSize).?server.mina. public void setIoHandler(org.Object: clone .?mrtmp.common. Class MRTMPOriginConnection public class MRTMPOriginConnection extends. getClass .?net.net. hashCode .?BaseMRTMPConnection { // Public Constructors public MRTMPOriginConnection(). disconnect . notify . finalize . notifyAll .?server. setIoSession .mrtmp. public String toString(). public void setIsLoggingTraffic(boolean isLoggingTraffic). // Public Methods public void connect(int clientId).?red5. } Methods inherited from java. public void setPort(int port).?red5. } Methods inherited from org.lang. public void setUseHeapBuffers(boolean useHeapBuffers).IoHandlerAdapter rtmpIOHandler). public void setTcpNoDelay(boolean tcpNoDelay).Package org. public void setEventThreadsMax(int eventThreadsMax). connect . public void stop(). public void setEventThreadsQueue(int eventThreadsQueue).red5. public void setIoThreads(int ioThreads).server.

mrtmp.MRTMPPacket. wait 12. Class MRTMPPacket.net. public org.server. // Public Methods public org. wait 11. public String toString().MRTMPPacket. hashCode .common.red5.apache.Body getBody().Body().Body public static class MRTMPPacket.Header header). Class MRTMPPacket public class MRTMPPacket { // Public Static Fields public static final short CLOSE = 1. public static final int RTMP_HEADER_LENGTH = 24. toString .ByteBuffer getRawBuf(). finalize .red5. public static final short JAVA_ENCODING = 0. // Public Constructors public MRTMPPacket().Body { // Public Constructors public MRTMPPacket.lang.?red5.net.net.server. notifyAll . getClass . getClass .mrtmp. equals . public void setBody(org.common.Header getHeader().MRTMPPacket.MRTMPPacket.Object: clone .?net. hashCode . notify . finalize .server.apache.?server. notifyAll . } Methods inherited from java.net. public static final short CONNECT = 0.Package org.mrtmp.lang.red5. // Public Methods public org. public void setHeader(org.mrtmp.?mrtmp Methods inherited from java. public static final short RTMP = 2.mina. 646 . notify .mina.red5.Object: clone .Body body). public void setRawBuf(org. public static final int COMMON_HEADER_LENGTH = 20. toString . equals .ByteBuffer rawBuf).server.

notifyAll . wait 14.Header(). public void setHeaderLength(int headerLength).?net.?RTMPHeader Methods inherited from java.?Body { // Public Constructors 647 . // Public Methods public short getBodyEncoding().lang.Header { // Public Constructors public MRTMPPacket.?net. public void setDynamic(boolean dynamic). public int getHeaderLength().?red5.?red5.?net. toString .?red5.?MRTMPPacket. notify . wait 13.Header public static class MRTMPPacket.Object: clone . hashCode . equals .?server. } Direct known subclasses: org.?mrtmp } Direct known subclasses: org.?mrtmp. public void setType(short type). equals . public int getBodyLength(). Class MRTMPPacket. finalize .?server.RTMPBody extends.?MRTMPPacket. public boolean isDynamic(). toString .?mrtmp.?server. public short getType().Package org.?mrtmp. public void setClientId(int clientId). Class MRTMPPacket.RTMPBody public static class MRTMPPacket. getClass .lang. public int getClientId(). notify .?net. getClass . public void setBodyLength(int bodyLength).?RTMPBody Methods inherited from java.Object: clone .?server. org. hashCode . public void setBodyEncoding(short bodyEncoding). finalize .?MRTMPPacket.?red5. notifyAll .

mrtmp.Body: getRawBuf . notify .?common. } Methods inherited from org. hashCode .RTMPHeader public static class MRTMPPacket. notifyAll . Object message) throws Exception.?red5. wait 16.net. } Methods inherited from org.server.MRTMPPacket.rtmp. setClientId .?net.rtmp.red5. getType . finalize .server.RTMPOriginConnection conn). setType Methods inherited from java.net.?IoHandlerAdapter { // Public Constructors public OriginMRTMPHandler(). // Public Methods public int getRtmpType().?red5.MRTMPPacket. org. getClientId .message.IoSession session.RTMPHeader extends. setRawBuf Methods inherited from java. public void setRtmpType(int rtmpType). getClass .Packet rtmpPacket).?mrtmp. notifyAll .red5. isDynamic .mrtmp. Class MRTMPPacket.?server.RTMPHeader().Packet getRtmpPacket(). setBodyLength .red5.lang.Object: clone . getBodyLength .?apache.server. public void setRtmpPacket(org. toString .?Heade // Public Constructors public MRTMPPacket. notify . hashCode .Package org. setHeaderLength . public void messageReceived(org. // Public Methods public void closeConnection(org.lang.mina.?mina.?mrtmp public MRTMPPacket.RTMPBody().server.message. finalize . getHeaderLength .Header: getBodyEncoding . equals .net.common.?server.Object: clone .red5.apache.red5. equals . getClass . Class OriginMRTMPHandler public class OriginMRTMPHandler extends. // Public Methods public org.net.rtmp.?MRTMPPacket. toString .?net.server.net. setBodyEncoding . setDynamic . 648 . org. wait 15.

rtmp.net.apache. Object message) throws Exception.lang.ProtocolCodecFactory codecFactory).net. notifyAll .IRTMPConnManager rtmpConnManager). equals . messageReceived .IoHandlerAdapter: exceptionCaught .?red5.?server.net.Object: clone .?mrtmp. hashCode . notifyAll . notify .mina.mina.apache. Synopsis public class SimpleMRTMPEdgeManagerimplements.apache.mina. equals . getClass . finalize . org. public boolean registerConnection(IMRTMPConnection conn).IoSession session.Package org.server.server.apache.lang.?IMRTMPEdgeManager { // Public Constructors public SimpleMRTMPEdgeManager(). public boolean unregisterConnection(IMRTMPConnection conn).red5. // Public Methods public IMRTMPConnection lookupMRTMPConnection(org. public void sessionCreated(org. wait 17.filter.IRTMPHandler handler).apache. finalize .rtmp.apache.?red5.Object: clone .common.IoSession session) throws Exception.1. hashCode .mina.red5.IoSession session) throws Exception. public void setHandler(org. sessionCreated . public void setRtmpConnManager(org.mina. public void sessionClosed(org. notify . public void setMrtmpManager(IMRTMPOriginManager mrtmpManager). wait 649 .rtmp.common.common. sessionClosed . 17. messageSent .codec.mina.red5. sessionOpened Methods inherited from java.?net. Class SimpleMRTMPEdgeManager A simple Edge connection manager that only manages one Edge/Origin connection.common. sessionIdle . } Methods inherited from org.IoSession session).server. } Methods inherited from java.?net. toString .?server. public void setCodecFactory(org. toString . getClass .common. // Protected Methods protected int getSessionId(org.?mrtmp public void messageSent(org.RTMPConnection conn).

server.?red5.Package org. IMRTMPConnection mrtmpConn).RTMPConnection rtmpConn). the mapping is static while for polling connection. Specified by: Method associate in interface IMRTMPOriginManager Associate the client to a MRTMP connection so that the packet will be sent via this MRTMP connection. notifyAll . notify .net.red5.rtmp.net. Parameters clientId conn Description copied from interface: associate 18. finalize . public boolean registerConnection(IMRTMPConnection conn).rtmp.net. IMRTMPConnection) public void associate(org.Object: clone .server.?server.red5.?red5. Specified by: Method dissociate in interface IMRTMPOriginManager 650 .rtmp. public void dissociate(org.server.net. } Methods inherited from java.red5.RTMPConnection rtmpConn. Class SimpleMRTMPOriginManager public class SimpleMRTMPOriginManagerimplements. public void setOriginMRTMPHandler(OriginMRTMPHandler originMRTMPHandler). public IMRTMPConnection lookupMRTMPConnection(org.RTMPConnection rtmpConn).?IMRTMPOriginManager { // Public Constructors public SimpleMRTMPOriginManager(). org. equals .RTMPConnection rtmpConn).red5. getClass . dissociate(RTMPConnection) public void dissociate(org.?net. toString . // Public Methods public void associate(org. The association has different impacts on persistent and polling connections.lang.1.net.rtmp.red5. hashCode .?mrtmp.server.2. associate(RTMPConnection. IMRTMPConnection mrtmpConn).?server. wait 18.server.RTMPConnection rtmpConn. For persistent connection.?mrtmp 18. public boolean unregisterConnection(IMRTMPConnection conn).?net.rtmp. the mapping is dynamic and might not be honored.

?net.?red5.?mrtmp Deassociate the client from the MRTMP connection previously associated to.?server. Parameters rtmpConn Description copied from interface: dissociate 651 .Package org.

equals .Object: clone .1. org. notify .mina.codec.apache. notify .ProtocolDecoderOutput out) throws Exception.codec.filter. } Methods inherited from java.common.net. wait 3.lang.red5.IoSession session) throws Exception. hashCode .filter.IoSession session.mina.mina. // Public Methods public org.IoSession session. public org.?codec.server. Class MRTMPProtocolDecoder public class MRTMPProtocolDecoderimplements.common. getClass .server. hashCode .mrtmp.common.?ProtocolCodecFactory { // Public Constructors public MRTMPCodecFactory(). finalize .apache. toString .apache.?filter. toString .mina. public org.mina.net.apache.codec.?apache. public void finishDecode(org.ByteBuffer public void dispose(org.red5.apache.?ProtocolDecoder { // Public Constructors public MRTMPProtocolDecoder(). // Public Methods public void decode(org.ByteBuffer in.ProtocolEncoder getEncoder() throws Exception.?apache.mrtmp.ByteBuffer buf org.mina.apache.filter.common. notifyAll .?filter.ProtocolDecoderOutput out) throws Exception. Class MRTMPProtocolEncoder 652 .Object: clone .mina. org.MRTMPPacket public org.mina.net. getClass .lang.apache.codec.?mina.Body decodeBody(org.?mina.mina.MRTMPPacket. } Methods inherited from java.apache.?codec.filter. org.ProtocolDecoder getDecoder() throws Exception.apache.server.common. org.apache. Class MRTMPCodecFactory public class MRTMPCodecFactoryimplements. notifyAll . wait 2. finalize .MRTMPPacket. equals .common.mrtmp. org.mina.Header decodeHeader(org.red5.

org.lang.IoSession session) throws Exception. org.?filter. finalize . notifyAll .?codec public class MRTMPProtocolEncoderimplements.apache.ProtocolEncoderOutput out) throws Exception.mina.mina. public void encode(org.?ProtocolEncoder { // Public Constructors public MRTMPProtocolEncoder().?mina.filter.?net.?server.common.apache. // Public Methods public void dispose(org.?apache.IoSession session.codec.common. toString .?codec. wait 653 .mina. equals .Object: clone . hashCode .Package org.apache.?mrtmp.?red5. notify . } Methods inherited from java. getClass . Object message.

messageSent .?IoHandlerAdapter { // Protected Fields protected static org.mina.IoSession session. Object message) throws Exception.slf4j. public String getHost().com/devnet/flashplayer/articles/socket_policy_files.apache. // Public Constructors public SocketPolicyHandler(). messageReceived .?apache. 1. // Public Methods public void exceptionCaught(org.common. sessionCreated .apache. finalize . public void messageReceived(org.mina.1.Logger log . hashCode . org. Class SocketPolicyHandler Provides the socket policy file.apache. Synopsis public class SocketPolicyHandler extends.1. notify . notifyAll .adobe. public void setPort(int port).common.mina.?common. Throwable ex) throws Exception. public void setHost(String host).lang. wait See Also http://www. toString . equals .?mina. } Methods inherited from org. sessionClosed .IoSession session.IoHandlerAdapter: exceptionCaught . sessionIdle . getClass . public void stop(). public void start(). public int getPort().common.Object: clone . sessionOpened Methods inherited from java.html 654 .

2.server. Class BaseProtocolEncoder Base class for all protocol encoders. getClass . // Protected Methods protected org. hashCode . org.StatusObject generateErrorResult(String code. generateErrorResult(String.?remoting.?net.status.1. getCause . Throwable) protected org. equals . setStackTrace . hashCode .?red5. } Methods inherited from java.?ProtocolException { // Public Constructors public HandshakeFailedException(String message).lang.Throwable: fillInStackTrace .?RTMPProtocolEncoder Methods inherited from java. wait 1. } Direct known subclasses: org.?codec. org.status. Throwable error). Generate error object to return for given exception. 1.1.?SimpleProtocol // Public Constructors public BaseProtocolEncoder().?server. getMessage .Object: clone .?server. Synopsis public abstract class BaseProtocolEncoderimplements.?net. notifyAll .red5. Exception HandshakeFailedException public class HandshakeFailedException extends. org. initCause . Parameters call return 2.?net.?codec.red5. notifyAll .net.?rtmp. getClass .? RemotingProtocolEncoder . equals . getLocalizedMessage . finalize .lang. toString . notify . finalize . toString Methods inherited from java.?protocol.?red5. getStackTrace .?protocol.Object: clone .server.?net. notify .StatusObject generateErrorResult(String code. printStackTrace . Throwable error).net.lang.rtmp.?red5. wait 655 .?server.?red5.rtmp.?server.

Package org. toString Methods inherited from java. getStackTrace .?net. finalize . Create protocol exception with given message. Throwable cause).?lang.?protocol.Object: clone . equals .?red5.lang. Parameters message 3. printStackTrace . ProtocolException(String.?net. java. Exception ProtocolException public class ProtocolException extends. HandshakeFailedException(String) public HandshakeFailedException(String message). public ProtocolException(String message. Parameters 656 .?protocol 2. } Direct known subclasses: org. getLocalizedMessage . getClass . notify .?server. Throwable cause).?red5.1.Throwable: fillInStackTrace .2.?server. getMessage . wait 3. ProtocolException(String) public ProtocolException(String message).?RuntimeException { // Public Constructors public ProtocolException(String message). getCause . Create protocol exception with given message and cause. setStackTrace . initCause . Throwable) public ProtocolException(String message. Create handshake failed exception with given message Parameters message 3. hashCode .1.lang. notifyAll .? HandshakeFailedException Methods inherited from java.

Synopsis public class ProtocolState { // Public Static Fields public static byte DECODER_BUFFER . 657 . hashCode . public boolean hasDecodedObject(). notify . toString .Object: clone .?protocol message cause 4. } Direct known subclasses: org.?codec. notifyAll .?net.lang. 4. Decoder is buffering state constant. public boolean canStartDecoding(int remaining).?red5. Class ProtocolState Represents current state of protocol. public void continueDecoding().?red5.?rtmp.Package org. public int getDecoderBufferAmount().?server. public static byte DECODER_CONTINUE . public void startDecoding().2. public boolean canContinueDecoding(). wait 4. equals .?server. public static final String SESSION_KEY = "protocol_state".?net.?RTMP Methods inherited from java. getClass . public static byte DECODER_OK . // Public Methods public void bufferDecoding(int amount). finalize . // Public Constructors public ProtocolState().1. DECODER_BUFFER public static byte DECODER_BUFFER .

canStartDecoding(int) public boolean canStartDecoding(int remaining).?red5.Package org.7. Deconding continues state constant.5. Checks whether remaining buffer size is greater or equal than buffer amount and so if it makes sense to start decoding.?protocol 4.?server. DECODER_CONTINUE public static byte DECODER_CONTINUE . Checks whether decoding process can be continued. bufferDecoding(int) public void bufferDecoding(int amount). Specifies buffer decoding amount Parameters amount Buffer decoding amount 4. Session key constant.4. canContinueDecoding() public boolean canContinueDecoding(). false otherwise 4.8. Parameters remaining return Remaining buffer size true if there is data to decode. 4. continueDecoding() public void continueDecoding(). SESSION_KEY public static final String SESSION_KEY = "protocol_state". false otherwise 4.3. 4. DECODER_OK public static byte DECODER_OK . Parameters return true if decoding can be continued.?net. 658 . 4.9. Decoding finished successfully state constant.6.

11. Returns current buffer amount.12.2. Parameters return Value for property 'simpleDecoder'.?red5. Getter for simple decoder. startDecoding() public void startDecoding().?protocol Set decoding state as "needed to be continued". Parameters return Buffer amount 4. 659 . 4.10. public SimpleProtocolEncoder getSimpleEncoder(). Starts decoding. 5. Interface SimpleProtocolCodecFactory Simple protocol codec factory 5.Package org. Sets state to "ready" and clears buffer amount. hasDecodedObject() public boolean hasDecodedObject(). getDecoderBufferAmount() public int getDecoderBufferAmount(). } 5.?server. false otherwise 4. Parameters return true if decoding has finished. Synopsis public interface SimpleProtocolCodecFactory { // Public Methods public SimpleProtocolDecoder getSimpleDecoder(). getSimpleDecoder() public SimpleProtocolDecoder getSimpleDecoder().?net. Checks whether decoding is complete.1.

Package org.?server. or some data was skipped. org. 6.apache. ProtocolState is just a marker interface ByteBuffer of data to be decoded one of three possible values.common. 660 .3. public java.ByteBuffer in) throws Exception.util. just continue. decodeBuffer(ProtocolState.?net.List decodeBuffer(ProtocolState state.apache. Synopsis public interface SimpleProtocolDecoder { // Public Methods public Object decode(ProtocolState state.mina. Parameters return Value for property 'simpleEncoder'. } 6.2. getSimpleEncoder() public SimpleProtocolEncoder getSimpleEncoder().common. ByteBuffer) public Object decode(ProtocolState state.1. Interface SimpleProtocolDecoder Simple protocol decoder 6.mina.apache. Getter for simple encoder. ByteBuffer) public java.util.codec. null : the object could not be decoded. refer to the protocol state Object : something was decoded.ByteBuffer in) throws Exception.mina.List decodeBuffer(ProtocolState state.ProtocolCodecException 6.3. decode(ProtocolState.apache. ProtocolState : the decoder was unable to decode the whole object. Parameters state Stores state for the protocol.common.ByteBuffer buffer). org.mina.?red5. continue in return ProtocolCodecException org.?protocol 5.filter. org.

2.?server. encode(ProtocolState.?net.common.?red5.common. Object) public org.mina.mina.common. Decode all available objects in buffer. } 7.ByteBuffer encode(ProtocolState state.apache. Parameters state buffer return Stores state for the protocol ByteBuffer of data to be decoded a list of decoded objects. Encodes object with given protocol state to byte buffer Parameters state out return Exception Protocol state Object to encode Byte buffer with encoded data Any decoding exception 661 . Interface SimpleProtocolEncoder Every protocol encoder should implement this 7.apache.Package org.1. Object out) throws Exception.mina. Object out) throws Exception.apache.ByteBuffer encode(ProtocolState state. may be empty if nothing could be decoded 7.?protocol org.ByteBuffer buffer). Synopsis public interface SimpleProtocolEncoder { // Public Methods public org.

?mina. 662 . Class DebugProxyHandler public class DebugProxyHandler extends. sessionIdle .IoHandlerAdapter: exceptionCaught . public void sessionCreated(org.common.IoSession session) throws Exception.common.IoSession session.apache.apache. sessionOpened Methods inherited from java. exceptionCaught(IoSession.apache. sessionClosed .IoSession session.apache. toString .1. } Methods inherited from org.?IoHandlerAdapter implements. public void sessionOpened(org. org. // Public Constructors public DebugProxyHandler().mina. 1.2.common. public void setResourceLoader(org. Object) public void messageReceived(org.apache.Object: clone .IoSession session. hashCode . public void setCodecFactory(org.common.?apache.slf4j. wait 1. finalize .apache.common.mina. sessionCreated . notifyAll .?common.mina.mina.?ResourceLoaderAware { // Protected Fields protected static org.1.lang.common.springframework.?context. messageSent .IoSession session. public void messageReceived(org.mina. messageReceived(IoSession. Object in). Throwable) public void exceptionCaught(org.common. getClass . Object in).codec. messageReceived .apache.core. equals . public void setForward(String forward).ProtocolCodecFactory codecFactory).ResourceLoader loader).filter.io. Throwable cause) throws Exception. // Public Methods public void exceptionCaught(org. public void setDumpTo(String dumpTo). notify . Throwable cause) throws Exception.?springframework.Logger log .apache.mina. org.mina.IoSession session) throws Exception.mina.

1.springframework.apache. Parameters dumpTo Value to set for property 'dumpTo'.4.IoSession session) throws Exception.?server.common. 1.6.1.codec.8. Setter for property 'forward'.7.?IoFilterAdapter { // Protected Fields 663 . setForward(String) public void setForward(String forward).?mina. performs raw data and headers dump on message recieve 2. Setter for property 'dumpTo'.IoSession session) throws Exception.mina.apache.?apache.core. Synopsis public class NetworkDumpFilter extends. 1. setCodecFactory(ProtocolCodecFactory) public void setCodecFactory(org.mina.5. Parameters codecFactory Value to set for property 'codecFactory'. org.filter.?net. Specified by: Method setResourceLoader in interface ResourceLoaderAware 2. setResourceLoader(ResourceLoader) public void setResourceLoader(org.Package org.mina.apache.ProtocolCodecFactory codecFactory).3. 1. Parameters forward Value to set for property 'forward'.?red5. 1.ResourceLoader loader). Setter for property 'codecFactory'. sessionOpened(IoSession) public void sessionOpened(org.io.?proxy 1.common. sessionCreated(IoSession) public void sessionCreated(org. Class NetworkDumpFilter Network dump filter.?common. setDumpTo(String) public void setDumpTo(String dumpTo).

log protected static org.apache. filterClose . toString . hashCode . org. WritableByteChannel) public NetworkDumpFilter(java.IoFilterAdapter: destroy .nio. onPostRemove . notify . } Methods inherited from org. java.nio. Logger 664 .Package org. exceptionCaught .?net. finalize .common.channels. onPreAdd .channels.WritableByteChannel headers.apache.NextFilter next. // Public Methods public void messageReceived(org. filterWrite . org.WritableByteChannel headers . NetworkDumpFilter(WritableByteChannel.WritableByteChannel raw). messageReceived . init . protected static org.3.Logger log .IoFilter.nio.mina.?server.?proxy protected java. sessionIdle . java.common.WritableByteChannel headers.channels.channels.NextFilter next.common.4.slf4j. messageSent .slf4j. wait 2. sessionCreated .IoSession session.IoSession session) throws Exception. equals . Headers byte channel 2. notifyAll .WritableByteChannel raw).WritableByteChannel headers . headers protected java.IoFilter. onPreRemove . Create network dump filter from given dump channels Parameters headers raw Channel to dump headers Channel to dump raw data 2. onPostAdd .mina.mina.nio.nio.common.Logger log .nio.apache.nio. sessionOpened Methods inherited from java.mina.?red5. getClass .WritableByteChannel raw .Object: clone .mina. Object message) throws Exception. // Public Constructors public NetworkDumpFilter(java.channels.common.apache.lang.channels.2. sessionClosed .apache.channels. protected java. public void sessionClosed(org.

} Methods inherited from org. filterClose .common. Class ProxyFilter Proxy filter 3. public void sessionClosed(org. org.nio. IoSession) public void sessionClosed(org.mina.slf4j.apache. sessionIdle .apache. // Public Constructors public ProxyFilter(String name). org. raw protected java.NextFilter.IoFilter.common.common.apache. onPreAdd .Logger log .6. org.common.apache. onPostRemove .common.WritableByteChannel raw . onPreRemove .?proxy 2.NextFilter next. org.IoSession session.IoSession session) throws Exception.NextFilter.apache. onPostAdd .mina.5.common.mina.mina.apache. org. filterWrite .common.?server.IoFilter. messageSent .apache.common.IoFilter. Synopsis public class ProxyFilter extends. messageReceived .mina.?red5.IoSession session) throws Exception. 3.1. // Protected Fields protected static org.apache.?common. init .NextFilter next. messageReceived(IoFilter.NextFilter next. sessionOpened 665 .mina. Object message) throws Exception.mina.IoFilterAdapter: destroy .?apache.apache. sessionCreated .NextFilter next.IoSession session.?net. // Public Methods public void messageReceived(org. IoSession.IoFilter. sessionClosed(IoFilter.Package org.?mina.mina. Object message) throws Exception. protected String name .?IoFilterAdapter { // Public Static Fields public static final String FORWARD_KEY = "proxy_forward_key".mina. 2. exceptionCaught . Object) public void messageReceived(org. sessionClosed .7.common.channels. Raw data byte channel 2.

mina.mina. Forwarding key constant 3.IoFilter.3.7. Object message) throws Exception. wait 3. log protected static org. 3.Logger log . hashCode . org.?net.common.slf4j. Object) public void messageReceived(org.apache.lang.apache. IoSession.Package org. Logger 3.common.4. equals .?server.apache. ProxyFilter(String) public ProxyFilter(String name). getClass . toString . 666 . name protected String name .?proxy Methods inherited from java. finalize .NextFilter next. notifyAll . FORWARD_KEY public static final String FORWARD_KEY = "proxy_forward_key".mina. org. Filter name 3.IoFilter. notify .NextFilter.NextFilter next.common.?red5. sessionClosed(IoFilter.apache.NextFilter.5. Create proxy filter with given name Parameters name 3.IoSession session.IoSession session) throws Exception.2. IoSession) public void sessionClosed(org.mina. messageReceived(IoFilter.common.6.Object: clone .

red5.lang.messaging.Logger log .flex. java. notifyAll . toString .red5.String.com String fault String fault Throwable er // Public Methods public org.compatib public void setEndpoints(java.messaging.2.red5.red5. notify .lang.compatib public org. wait 1. finalize .api. hashCode .messaging.compatibility.Object: clone . Class FlexMessagingService Service that can execute compatibility Flex messages.AsyncMessage handleRequest(org.messages.flex.compatibility.flex.red5.messages.red5.com String fault String fault String fault public static org.messages. // Public Static Methods public static org.String.1.IServiceInvoker serviceInvoker .util.util.compatibility.compatibility.flex.AsyncMessage handleRequest(org.messages. endpoints 667 .Object> endpoints).Map<java.messages.compatibility. getClass .lang. java.compatib public org.compatibility. public void setServiceInvoker(org.red5.red5.service.compatib public org.messaging.AsyncMessage handleRequest(org.service.api.ErrorMessage returnError(org.red5.slf4j. // Public Constructors public FlexMessagingService().red5.flex.red5.messages.Map<java.1. Synopsis public class FlexMessagingService { // Public Static Fields public static final String SERVICE_NAME = "flexMessaging".server.red5.ErrorMessage handleRequest(org. protected static org. // Protected Fields protected java. 1.lang.lang.red5.messaging.Object> endpoints . equals .messaging.ErrorMessage returnError(org. protected org.red5. } Methods inherited from java.server.flex.IServiceInvoker serviceInvoker).

Package org.?red5.?server.?net.?remoting
protected java.util.Map<java.lang.String, java.lang.Object> endpoints ;

Configured endpoints.

1.3. log
protected static org.slf4j.Logger log ;

Logger

1.4. SERVICE_NAME
public static final String SERVICE_NAME = "flexMessaging";

Name of the service.

1.5. serviceInvoker
protected org.red5.server.api.service.IServiceInvoker serviceInvoker ;

Service invoker to use.

1.6. handleRequest(AbstractMessage)

public org.red5.compatibility.flex.messaging.messages.ErrorMessage handleRequest(org.red5.compatibil

Fallback method to handle arbitrary messages. Parameters msg return

1.7. handleRequest(CommandMessage)

public org.red5.compatibility.flex.messaging.messages.AsyncMessage handleRequest(org.red5.compatibil

Handle command message request. Parameters msg return

1.8. handleRequest(DataMessage)

public org.red5.compatibility.flex.messaging.messages.AsyncMessage handleRequest(org.red5.compatibil

Handle messages related to shared objects. Parameters msg return

668

Package org.?red5.?server.?net.?remoting

1.9. handleRequest(RemotingMessage)

public org.red5.compatibility.flex.messaging.messages.AsyncMessage handleRequest(org.red5.compatibil

Handle request coming from mx:RemoteObject tags. Parameters msg return See Also Adobe Livedocs (external) [http://livedocs.adobe.com/flex/2/langref/mx/rpc/remoting/ mxml/RemoteObject.html]

1.10. returnError(AbstractMessage, String, String, String)

public static org.red5.compatibility.flex.messaging.messages.ErrorMessage returnError(org.red5.compa String faultCo String faultSt String faultDe

Construct error message. Parameters request faultCode faultString faultDetail return

1.11. returnError(AbstractMessage, String, String, Throwable)

public static org.red5.compatibility.flex.messaging.messages.ErrorMessage returnError(org.red5.compa String faultCo String faultSt Throwable erro

Construct error message from exception. Parameters request faultCode faultString error return

669

Package org.?red5.?server.?net.?remoting

1.12. setEndpoints(Map<String, Object>)
public void setEndpoints(java.util.Map<java.lang.String, java.lang.Object> endpoints);

Setup available end points. Parameters endPoints

1.13. setServiceInvoker(IServiceInvoker)
public void setServiceInvoker(org.red5.server.api.service.IServiceInvoker serviceInvoker);

Set the service invoker to use. Parameters serviceInvoker

2. Interface IRemotingCallback
Callback for asynchronous remoting calls.

2.1. Synopsis
public interface IRemotingCallback { // Public Methods public void errorReceived(RemotingClient client, String method, Object[] params, Throwable error);

public void resultReceived(RemotingClient client, String method, Object[] params, Object result); }

2.2. errorReceived(RemotingClient, String, Object[], Throwable)
public void errorReceived(RemotingClient client, String method, Object[] params, Throwable error);

An error occured while performing the remoting call. Parameters client method Remoting client Remoting method

670

Package org.?red5.?server.?net.?remoting params error Call parameters Call result

2.3. resultReceived(RemotingClient, String, Object[], Object)
public void resultReceived(RemotingClient client, String method, Object[] params, Object result);

The result of a remoting call has been received. Parameters client method params result Remoting client Remote method name Call parameters Call result

3. Class RemotingClient
Client interface for remoting calls.

3.1. Synopsis
public class RemotingClient { // Public Static Fields public static final int DEFAULT_TIMEOUT = 30000; // Protected Fields protected java.util.Map<java.lang.String, org.red5.server.net.remoting.RemotingHeader> headers ;

protected static org.slf4j.Logger log ;

protected static org.red5.server.pooling.ThreadPool threadPool ; // Public Constructors public RemotingClient();

public RemotingClient(String url);

public RemotingClient(String url, int timeout); // Public Methods public void addHeader(String name, boolean required, Object value);

public Object invokeMethod(String method,

671

Package org.?red5.?server.?net.?remoting
Object[] params);

public void invokeMethod(String method, Object[] methodParams, IRemotingCallback callback);

public void removeHeader(String name);

public void resetCredentials();

public void setCredentials(String userid, String password);

public void setThreadPool(org.red5.server.pooling.ThreadPool threadPool); // Protected Methods protected void processHeaders(org.apache.mina.common.ByteBuffer in); }

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

3.2. RemotingClient()
public RemotingClient();

Dummy constructor used by the spring configuration.

3.3. RemotingClient(String)
public RemotingClient(String url);

Create new remoting client for the given url. Parameters url URL to connect to

3.4. RemotingClient(String, int)
public RemotingClient(String url, int timeout);

Create new remoting client for the given url and given timeout. Parameters url timeout URL to connect to Timeout for one request in milliseconds

3.5. DEFAULT_TIMEOUT
672

Package org.?red5.?server.?net.?remoting
public static final int DEFAULT_TIMEOUT = 30000;

Default timeout to use.

3.6. headers
protected java.util.Map<java.lang.String, org.red5.server.net.remoting.RemotingHeader> headers ;

Headers to send to the server.

3.7. log
protected static org.slf4j.Logger log ;

Logger

3.8. threadPool
protected static org.red5.server.pooling.ThreadPool threadPool ;

Thread pool to use for asynchronous requests.

3.9. addHeader(String, boolean, Object)
public void addHeader(String name, boolean required, Object value);

Send an additional header to the server. Parameters name required value Header name Header required? Header body

3.10. invokeMethod(String, Object[])
public Object invokeMethod(String method, Object[] params);

Invoke a method synchronously on the remoting server. Parameters method params return Method name Parameters passed to method the result of the method call

3.11. invokeMethod(String, Object[], IRemotingCallback)
public void invokeMethod(String method, Object[] methodParams,

673

Package org.?red5.?server.?net.?remoting
IRemotingCallback callback);

Invoke a method asynchronously on the remoting server. Parameters method methodParams callback Method name Parameters passed to method Callback

3.12. processHeaders(ByteBuffer)
protected void processHeaders(org.apache.mina.common.ByteBuffer in);

Process any headers sent in the response. Parameters in Byte buffer with response data

3.13. removeHeader(String)
public void removeHeader(String name);

Stop sending a given header. Parameters name Header name

3.14. resetCredentials()
public void resetCredentials();

Stop sending authentication data.

3.15. setCredentials(String, String)
public void setCredentials(String userid, String password);

Send authentication data with each remoting request. Parameters userid password User identifier Password

3.16. setThreadPool(ThreadPool)
public void setThreadPool(org.red5.server.pooling.ThreadPool threadPool);

Set the thread pool to use for asynchronous requests.

674

Package org.?red5.?server.?net.?remoting Parameters threadPool The thread pool

4. Class RemotingClient.RemotingWorker
Worker class that is used for asynchronous remoting calls.

4.1. Synopsis
public static class RemotingClient.RemotingWorker { // Public Constructors public RemotingClient.RemotingWorker(); // Public Methods public void executeTask(RemotingClient client, String method, Object[] params, IRemotingCallback callback); }

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

4.2. executeTask(RemotingClient, String, Object[], IRemotingCallback)
public void executeTask(RemotingClient client, String method, Object[] params, IRemotingCallback callback);

Execute task. Parameters client method params callback Remoting client Method name Parameters to pass to method on call Callback

5. Class RemotingConnection
Connection class so the Red5 object works in methods invoked through remoting. Attributes are stored in the session of the implementing servlet container.

5.1. Synopsis
public class RemotingConnectionimplements, org.?red5.?server.?api.?remoting.?IRemotingConnection { // Protected Fields

675

Package org.?red5.?server.?net.?remoting
protected java.util.List<org.red5.server.api.remoting.IRemotingHeader> headers ;

protected org.red5.server.net.remoting.message.RemotingPacket packet ;

protected javax.servlet.http.HttpServletRequest request ;

protected org.red5.server.api.IScope scope ;

protected javax.servlet.http.HttpSession session ; // Public Constructors public RemotingConnection(javax.servlet.http.HttpServletRequest request, org.red5.server.api.IScope scope, org.red5.server.net.remoting.message.RemotingPacket packet); // Public Methods public void addHeader(String name, Object value);

public void addHeader(String name, Object value, boolean mustUnderstand);

public void close();

public boolean connect(org.red5.server.api.IScope scope);

public boolean connect(org.red5.server.api.IScope scope, Object[] params);

public void dispatchEvent(Object event);

public void dispatchEvent(org.red5.server.api.event.IEvent event);

public Object getAttribute(String name);

public Object getAttribute(String name, Object defaultValue);

public java.util.Set<java.lang.String> getAttributeNames();

public java.util.Map<java.lang.String, java.lang.Object> getAttributes();

public java.util.Iterator<org.red5.server.api.IBasicScope> getBasicScopes();

public Boolean getBoolAttribute(String name);

public Byte getByteAttribute(String name);

public org.red5.server.api.IClient getClient();

public long getClientBytesRead();

public java.util.Map<java.lang.String, java.lang.Object> getConnectParams();

676

Package org.?red5.?server.?net.?remoting
public Double getDoubleAttribute(String name);

public long getDroppedMessages();

public org.red5.server.api.IConnection.Encoding getEncoding();

public java.util.Collection<org.red5.server.api.remoting.IRemotingHeader> getHeaders();

public String getHost();

public Integer getIntAttribute(String name);

public int getLastPingTime();

public java.util.List getListAttribute(String name);

public Long getLongAttribute(String name);

public java.util.Map getMapAttribute(String name);

public String getPath();

public long getPendingMessages();

public long getPendingVideoMessages();

public long getReadBytes();

public long getReadMessages();

public String getRemoteAddress();

public java.util.List<java.lang.String> getRemoteAddresses();

public int getRemotePort();

public org.red5.server.api.IScope getScope();

public String getSessionId();

public java.util.Set getSetAttribute(String name);

public Short getShortAttribute(String name);

public String getStringAttribute(String name);

public String getType();

public long getWrittenBytes();

public long getWrittenMessages();

public boolean handleEvent(org.red5.server.api.event.IEvent event);

677

Package org.?red5.?server.?net.?remoting
public boolean hasAttribute(String name);

public void initialize(org.red5.server.api.IClient client);

public boolean isConnected();

public void notifyEvent(org.red5.server.api.event.IEvent event);

public void ping();

public boolean removeAttribute(String name);

public void removeAttributes();

public void removeHeader(String name);

public boolean setAttribute(String name, Object value);

public void setAttributes(java.util.Map<java.lang.String, java.lang.Object> values);

public void setAttributes(org.red5.server.api.IAttributeStore values);

public String toString(); // Protected Methods protected void setPacket(org.red5.server.net.remoting.message.RemotingPacket packet); }

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

5.2. RemotingConnection(HttpServletRequest, IScope, RemotingPacket)
public RemotingConnection(javax.servlet.http.HttpServletRequest request, org.red5.server.api.IScope scope, org.red5.server.net.remoting.message.RemotingPacket packet);

Create servlet connection from request and scope. Parameters request scope Servlet request Scope

5.3. headers
protected java.util.List<org.red5.server.api.remoting.IRemotingHeader> headers ;

Headers to be returned to the client.

5.4. packet
678

Package org.?red5.?server.?net.?remoting
protected org.red5.server.net.remoting.message.RemotingPacket packet ;

Remoting packet that triggered the connection.

5.5. request
protected javax.servlet.http.HttpServletRequest request ;

Servlet request

5.6. scope
protected org.red5.server.api.IScope scope ;

Scope

5.7. session
protected javax.servlet.http.HttpSession session ;

Session used to store properties.

5.8. addHeader(String, Object)
public void addHeader(String name, Object value);

Specified by: Method addHeader in interface IRemotingConnection Tell the client to add a header with all further requests. This is returned to the client as response for the next request received.

5.9. addHeader(String, Object, boolean)
public void addHeader(String name, Object value, boolean mustUnderstand);

Specified by: Method addHeader in interface IRemotingConnection Tell the client to add a header with all further requests. This is returned to the client as response for the next request received.

5.10. close()
public void close();

5.11. connect(IScope)
public boolean connect(org.red5.server.api.IScope scope);

5.12. connect(IScope, Object[])
public boolean connect(org.red5.server.api.IScope scope, Object[] params);

679

Package org.?red5.?server.?net.?remoting

5.13. dispatchEvent(IEvent)
public void dispatchEvent(org.red5.server.api.event.IEvent event);

5.14. getAttribute(String)
public Object getAttribute(String name);

5.15. getAttribute(String, Object)
public Object getAttribute(String name, Object defaultValue);

5.16. getAttributeNames()
public java.util.Set<java.lang.String> getAttributeNames();

5.17. getAttributes()
public java.util.Map<java.lang.String, java.lang.Object> getAttributes();

5.18. getBasicScopes()
public java.util.Iterator<org.red5.server.api.IBasicScope> getBasicScopes();

5.19. getBoolAttribute(String)
public Boolean getBoolAttribute(String name);

5.20. getByteAttribute(String)
public Byte getByteAttribute(String name);

5.21. getClient()
public org.red5.server.api.IClient getClient();

5.22. getClientBytesRead()
public long getClientBytesRead();

5.23. getConnectParams()
public java.util.Map<java.lang.String, java.lang.Object> getConnectParams();

5.24. getDoubleAttribute(String)
public Double getDoubleAttribute(String name);

5.25. getDroppedMessages()
public long getDroppedMessages();

680

Package org.?red5.?server.?net.?remoting

5.26. getEncoding()
public org.red5.server.api.IConnection.Encoding getEncoding();

Return encoding (AMF0 or AMF3). Parameters return Encoding, currently AMF0

5.27. getHeaders()
public java.util.Collection<org.red5.server.api.remoting.IRemotingHeader> getHeaders();

Specified by: Method getHeaders in interface IRemotingConnection Return headers to send.

5.28. getHost()
public String getHost();

5.29. getIntAttribute(String)
public Integer getIntAttribute(String name);

5.30. getLastPingTime()
public int getLastPingTime();

5.31. getListAttribute(String)
public java.util.List getListAttribute(String name);

5.32. getLongAttribute(String)
public Long getLongAttribute(String name);

5.33. getMapAttribute(String)
public java.util.Map getMapAttribute(String name);

5.34. getPath()
public String getPath();

5.35. getPendingMessages()
public long getPendingMessages();

5.36. getPendingVideoMessages()
public long getPendingVideoMessages();

681

Package org.?red5.?server.?net.?remoting Return pending video messages number. Parameters return Pending video messages number

5.37. getReadBytes()
public long getReadBytes();

5.38. getReadMessages()
public long getReadMessages();

5.39. getRemoteAddress()
public String getRemoteAddress();

5.40. getRemoteAddresses()
public java.util.List<java.lang.String> getRemoteAddresses();

5.41. getRemotePort()
public int getRemotePort();

5.42. getScope()
public org.red5.server.api.IScope getScope();

5.43. getSessionId()
public String getSessionId();

5.44. getSetAttribute(String)
public java.util.Set getSetAttribute(String name);

5.45. getShortAttribute(String)
public Short getShortAttribute(String name);

5.46. getStringAttribute(String)
public String getStringAttribute(String name);

5.47. getType()
public String getType();

5.48. getWrittenBytes()
public long getWrittenBytes();

682

Package org.?red5.?server.?net.?remoting

5.49. getWrittenMessages()
public long getWrittenMessages();

5.50. handleEvent(IEvent)
public boolean handleEvent(org.red5.server.api.event.IEvent event);

5.51. hasAttribute(String)
public boolean hasAttribute(String name);

5.52. initialize(IClient)
public void initialize(org.red5.server.api.IClient client);

5.53. isConnected()
public boolean isConnected();

5.54. notifyEvent(IEvent)
public void notifyEvent(org.red5.server.api.event.IEvent event);

5.55. ping()
public void ping();

5.56. removeAttribute(String)
public boolean removeAttribute(String name);

5.57. removeAttributes()
public void removeAttributes();

5.58. removeHeader(String)
public void removeHeader(String name);

Specified by: Method removeHeader in interface IRemotingConnection Tell the client to no longer send a header with all further requests. This is returned to the client as response for the next request received.

5.59. setAttribute(String, Object)
public boolean setAttribute(String name, Object value);

5.60. setAttributes(IAttributeStore)
public void setAttributes(org.red5.server.api.IAttributeStore values);

683

Package org.?red5.?server.?net.?remoting

5.61. setAttributes(Map<String, Object>)
public void setAttributes(java.util.Map<java.lang.String, java.lang.Object> values);

5.62. setPacket(RemotingPacket)
protected void setPacket(org.red5.server.net.remoting.message.RemotingPacket packet);

Update the current packet. Parameters packet

5.63. toString()
public String toString();

Return string representation of the connection. Parameters return

6. Class RemotingHeader
Remoting header to be sent to a server. Informations about predefined headers can be found at http://www.osflash.org/amf/envelopes/remoting/headers

6.1. Synopsis
public class RemotingHeaderimplements, org.?red5.?server.?api.?remoting.?IRemotingHeader { // Protected Fields protected Object data ;

protected String name ;

protected boolean required ; // Public Constructors public RemotingHeader(String name, boolean required, Object data); // Public Methods public boolean getMustUnderstand();

public String getName();

public Object getValue(); }

684

Package org.?red5.?server.?net.?remoting Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

6.2. RemotingHeader(String, boolean, Object)
public RemotingHeader(String name, boolean required, Object data);

Create a new header to be sent through remoting. Parameters name required data Header name Header required? Header data

6.3. data
protected Object data ;

The actual data of the header.

6.4. name
protected String name ;

The name of the header.

6.5. required
protected boolean required ;

Is this header required?

6.6. getMustUnderstand()
public boolean getMustUnderstand();

Specified by: Method getMustUnderstand in interface IRemotingHeader Return boolean flag if receiver must process header before handling other headers or messages.

6.7. getName()
public String getName();

Specified by: Method getName in interface IRemotingHeader Return name of header.

685

Package org.?red5.?server.?net.?remoting

6.8. getValue()
public Object getValue();

Specified by: Method getValue in interface IRemotingHeader Return value of header.

686

1. Class RemotingCodecFactory
Factory for remoting codec

1.1. Synopsis

public class RemotingCodecFactoryimplements, org.?red5.?server.?net.?protocol.?SimpleProtocolCodecFac // Protected Fields protected RemotingProtocolDecoder decoder ;

protected org.red5.io.object.Deserializer deserializer ;

protected RemotingProtocolEncoder encoder ;

protected org.red5.io.object.Serializer serializer ; // Public Constructors public RemotingCodecFactory(); // Public Methods public org.red5.server.net.protocol.SimpleProtocolDecoder getSimpleDecoder();

public org.red5.server.net.protocol.SimpleProtocolEncoder getSimpleEncoder();

public void init();

public void setDeserializer(org.red5.io.object.Deserializer deserializer);

public void setSerializer(org.red5.io.object.Serializer serializer); }

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

1.2. decoder
protected RemotingProtocolDecoder decoder ;

Remoting protocol decoder

1.3. deserializer
protected org.red5.io.object.Deserializer deserializer ;

Deserializer

1.4. encoder
protected RemotingProtocolEncoder encoder ;

687

Package org.?red5.?server.?net.?remoting.?codec Remoting protocol encoder

1.5. serializer
protected org.red5.io.object.Serializer serializer ;

Serializers

1.6. getSimpleDecoder()
public org.red5.server.net.protocol.SimpleProtocolDecoder getSimpleDecoder();

Specified by: Method getSimpleDecoder in interface SimpleProtocolCodecFactory Getter for simple decoder.

1.7. getSimpleEncoder()
public org.red5.server.net.protocol.SimpleProtocolEncoder getSimpleEncoder();

Specified by: Method getSimpleEncoder in interface SimpleProtocolCodecFactory Getter for simple encoder.

1.8. init()
public void init();

Initialization, creates and binds encoder and decoder to serializer and deserializer

1.9. setDeserializer(Deserializer)
public void setDeserializer(org.red5.io.object.Deserializer deserializer);

Setter for deserializer. Parameters deserializer Deserializer.

1.10. setSerializer(Serializer)
public void setSerializer(org.red5.io.object.Serializer serializer);

Setter for serializer. Parameters serializer Sserializer.

2. Class RemotingProtocolDecoder

public class RemotingProtocolDecoderimplements, org.?red5.?server.?net.?protocol.?SimpleProtocolDecod // Protected Fields

688

Package org.?red5.?server.?net.?remoting.?codec
protected static org.slf4j.Logger ioLog ;

protected static org.slf4j.Logger log ; // Public Constructors public RemotingProtocolDecoder(); // Public Methods public Object decode(org.red5.server.net.protocol.ProtocolState state, org.apache.mina.common.ByteBuffer in) throws Exception;

public java.util.List<java.lang.Object> decodeBuffer(org.red5.server.net.protocol.ProtocolState st org.apache.mina.common.ByteBuffer buffer);

public void dispose(org.apache.mina.common.IoSession session) throws Exception;

public void setDeserializer(org.red5.io.object.Deserializer deserializer); // Protected Methods

protected java.util.List<org.red5.server.net.remoting.message.RemotingCall> decodeCalls(org.apache

protected java.util.Map<java.lang.String, java.lang.Object> readHeaders(org.apache.mina.common.Byt }

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

2.1. ioLog
protected static org.slf4j.Logger ioLog ;

I/O logger

2.2. log
protected static org.slf4j.Logger log ;

Logger

2.3. decode(ProtocolState, ByteBuffer)
public Object decode(org.red5.server.net.protocol.ProtocolState state, org.apache.mina.common.ByteBuffer in) throws Exception;

Specified by: Method decode in interface SimpleProtocolDecoder

2.4. decodeBuffer(ProtocolState, ByteBuffer)

public java.util.List<java.lang.Object> decodeBuffer(org.red5.server.net.protocol.ProtocolState stat

689

Package org.?red5.?server.?net.?remoting.?codec
org.apache.mina.common.ByteBuffer buffer);

Specified by: Method decodeBuffer in interface SimpleProtocolDecoder Decode all available objects in buffer.

2.5. decodeCalls(ByteBuffer)

protected java.util.List<org.red5.server.net.remoting.message.RemotingCall> decodeCalls(org.apache.m

Decode calls. Parameters in return Input data as byte buffer List of pending calls

2.6. dispose(IoSession)
public void dispose(org.apache.mina.common.IoSession session) throws Exception;

Disposes session. Not yet implemented. Parameters session
Exception

Session to dispose

Any exception can be raised on disposal

2.7. readHeaders(ByteBuffer)

protected java.util.Map<java.lang.String, java.lang.Object> readHeaders(org.apache.mina.common.ByteB

Read remoting headers. Parameters in Input data as byte buffer

2.8. setDeserializer(Deserializer)
public void setDeserializer(org.red5.io.object.Deserializer deserializer);

Setter for deserializer. Parameters deserializer Deserializer

3. Class RemotingProtocolEncoder
690

Package org.?red5.?server.?net.?remoting.?codec Remoting protocol encoder.

3.1. Synopsis
public class RemotingProtocolEncoder extends, org.?red5.?server.?net.?protocol.?BaseProtocolEncoder implements, org.?red5.?server.?net.?protocol.?SimpleProtocolEncoder { // Protected Fields protected static org.slf4j.Logger ioLog ;

protected static org.slf4j.Logger log ; // Public Constructors public RemotingProtocolEncoder(); // Public Methods public void dispose(org.apache.mina.common.IoSession ioSession) throws Exception;

public org.apache.mina.common.ByteBuffer encode(org.red5.server.net.protocol.ProtocolState state, Object message) throws Exception;

public void setSerializer(org.red5.io.object.Serializer serializer); }

Methods inherited from org.red5.server.net.protocol.BaseProtocolEncoder:
generateErrorResult

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

3.2. ioLog
protected static org.slf4j.Logger ioLog ;

I/O logger

3.3. log
protected static org.slf4j.Logger log ;

Logger

3.4. dispose(IoSession)
public void dispose(org.apache.mina.common.IoSession ioSession) throws Exception;

Dispose I/O session, not implemented yet. Parameters

691

Package org.?red5.?server.?net.?remoting.?codec ioSession
Exception

I/O session

Exception

3.5. encode(ProtocolState, Object)
public org.apache.mina.common.ByteBuffer encode(org.red5.server.net.protocol.ProtocolState state, Object message) throws Exception;

Specified by: Method encode in interface SimpleProtocolEncoder Encodes object with given protocol state to byte buffer

3.6. setSerializer(Serializer)
public void setSerializer(org.red5.io.object.Serializer serializer);

Setter for serializer. Parameters serializer New serializer

692

1. Class RemotingCall
Remoting method call, specific pending call.

1.1. Synopsis
public class RemotingCall extends, org.?red5.?server.?service.?PendingCall { // Public Static Fields public static final String HANDLER_ERROR = "/onStatus";

public static final String HANDLER_SUCCESS = "/onResult"; // Public Fields public String clientCallback ;

public boolean isAMF3 ;

public boolean isMessaging ; // Public Constructors public RemotingCall(String serviceName, String serviceMethod, Object[] args, String callback, boolean isAMF3, boolean isMessaging); // Public Methods public String getClientResponse();

public Object getClientResult();

public void setClientCallback(String clientCallback); }

Methods inherited from org.red5.server.service.PendingCall: getCallbacks , getResult , readExternal , registerCallback , setResult , unregisterCallback ,
writeExternal

Methods inherited from org.red5.server.service.Call: getArguments , getException , getServiceMethodName , getServiceName , getStatus , isSuccess , setArguments , setException , setServiceMethodName , setServiceName , setStatus , toString Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait Fields inherited from org.red5.server.service.Call: arguments , exception , serviceMethodName , serviceName , status , STATUS_ACCESS_DENIED , STATUS_APP_SHUTTING_DOWN , STATUS_GENERAL_EXCEPTION , STATUS_INVOCATION_EXCEPTION , STATUS_METHOD_NOT_FOUND , STATUS_PENDING , STATUS_SERVICE_NOT_FOUND , STATUS_SUCCESS_NULL , STATUS_SUCCESS_RESULT , STATUS_SUCCESS_VOID

693

Package org.?red5.?server.?net.?remoting.?message

1.2. RemotingCall(String, String, Object[], String, boolean, boolean)
public RemotingCall(String serviceName, String serviceMethod, Object[] args, String callback, boolean isAMF3, boolean isMessaging);

Create remoting call from service name, method name, list of arguments and callback name. Parameters serviceName serviceMethod args callback isAMF3 isMessaging Service name Service method name Parameters passed to method Name of client callback Does the client support AMF3? Is this a Flex messaging request?

1.3. clientCallback
public String clientCallback ;

Client callback name

1.4. HANDLER_ERROR
public static final String HANDLER_ERROR = "/onStatus";

Handler error posfix constant

1.5. HANDLER_SUCCESS
public static final String HANDLER_SUCCESS = "/onResult";

Handler success posfix constant

1.6. getClientResponse()
public String getClientResponse();

Getter for client response. Parameters return Client response

694

Package org.?red5.?server.?net.?remoting.?message

1.7. getClientResult()
public Object getClientResult();

Getter for client result. Parameters return Client result

1.8. setClientCallback(String)
public void setClientCallback(String clientCallback);

Setter for client callback. Parameters clientCallback Client callback

2. Class RemotingPacket
Packet of remote calls. Used by RemoteProtocolDecoder.

2.1. Synopsis
public class RemotingPacket { // Protected Fields protected java.util.List<org.red5.server.net.remoting.message.RemotingCall> calls ;

protected java.nio.ByteBuffer data ;

protected java.util.Map<java.lang.String, java.lang.Object> headers ;

protected javax.servlet.http.HttpServletRequest request ;

protected String scopePath ; // Public Constructors public RemotingPacket(java.util.Map<java.lang.String, java.lang.Object> headers, java.util.List<org.red5.server.net.remoting.message.RemotingCall> calls); // Public Methods public java.util.List<org.red5.server.net.remoting.message.RemotingCall> getCalls();

public org.red5.server.api.IConnection.Encoding getEncoding();

public java.util.Map<java.lang.String, java.lang.Object> getHeaders();

public String getScopePath();

public void setScopePath(String path);

695

Package org.?red5.?server.?net.?remoting.?message
}

Methods inherited from java.lang.Object: clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait

2.2. RemotingPacket(Map<String, Object>, List<RemotingCall>)
public RemotingPacket(java.util.Map<java.lang.String, java.lang.Object> headers, java.util.List<org.red5.server.net.remoting.message.RemotingCall> calls);

Create remoting packet from list of pending calls Parameters calls List of call objects

2.3. calls
protected java.util.List<org.red5.server.net.remoting.message.RemotingCall> calls ;

List of calls

2.4. data
protected java.nio.ByteBuffer data ;

Byte buffer data

2.5. headers
protected java.util.Map<java.lang.String, java.lang.Object> headers ;

Headers sent with request.

2.6. request
protected javax.servlet.http.HttpServletRequest request ;

HTTP request object

2.7. scopePath
protected String scopePath ;

Scope path

2.8. getCalls()
public java.util.List<org.red5.server.net.remoting.message.RemotingCall> getCalls();

Getter for calls.

696

?remoting.server.api.Object> getHeaders(). Parameters path Value to set for property 'scopePath'. Setter for scope path.String.12.11. Parameters return 2.lang.util.Map<java. Parameters return Scope path to set 2. getHeaders() public java. Parameters return 2.10. getEncoding() public org. Getter for property scope path. 697 .Encoding getEncoding(). Get the headers sent with the request.9.?server.?message Parameters return List of remote calls 2. Return the encoding of the included calls.?net.Package org.red5.IConnection. java.?red5. getScopePath() public String getScopePath(). setScopePath(String) public void setScopePath(String path).lang.

red5.service. // Protected Constructors protected BaseRTMPClientHandler().?server.String. java.?red5.util.red5.util.1.so.Map<java.lang.service. protected org.String.server.rtmp.red5. java.server.server.service.api. public void connect(String server.service.lang. org.net.util. public void connectionClosed(RTMPConnection conn. // Public Methods public void connect(String server.?net.Object> connectionParams.IPendingServiceCallback connectCallback).IPendingServiceCallback connectCallback .IServiceInvoker serviceInvoker .lang. int port. java. org.lang. java. java. public void connect(String server.red5. Class BaseRTMPClientHandler Base class for clients (RTMP and RTMPT) 1.?rtmp.ClientSharedObject> sharedObjects .Map<java. protected RTMPClientConnManager connManager .Object> connectionParams .server. protected java.String. int port. Synopsis public abstract class BaseRTMPClientHandler extends. int port.IPendingServiceCallback connectCallback). protected Object[] connectArguments .IPendingServiceCallback connectCallback.RTMPCodecFactory codecFactory .util.Object> connectionParams.api. int port. protected org. protected org. int port. String application. org. Object[] connectCallArguments). protected java. org.red5.codec.lang.?BaseRTMPHandler { // Protected Fields protected org.Object> connectionParams).red5.lang. java. org. String application).server.String.api.api.IEventDispatcher streamEventDispatcher .String.Map<java. public void connect(String server.util. 698 . protected Object serviceProvider . public void connect(String server.event.red5.api.api.service.lang.server.Map<java.1.Map<java. java.server.lang.server.red5.lang.

String mode. public void disconnect().IPendingServiceCallback callback).red5. int start.server.net.so.red5.messaging.?rtmp org. String name. public java.red5. Channel channel.net.Object> makeDefaultConnectionParams(String server int port. org. String applic public void play(int streamId.server. public void publish(int streamId.service. org.lang.?server. public void publishStreamData(int streamId. boolean persistent) public void handleException(Throwable throwable). org.red5.net. public synchronized org.api.red5.String. INetStreamEventHandler handler).rtmp.api. public void setExceptionHandler(ClientExceptionHandler exceptionHandler).red5.net.RTMP state).rtmp.rtmp. org.ChunkSize chunkSize).RTMPCodecFactory getCodecFactory().api.codec. org. public void invoke(String method.red5.red5.codec. int length). java.rtmp. public void invoke(String method. 699 .Header source. String name.server.RTMPCodecFactory factory).RTMP state).red5.red5.net.server.api.net.rtmp. public void createStream(org. public RTMPClientConnManager getConnManager().codec.IEventDispatcher streamEventDispatc // Protected Methods protected void onChunkSize(RTMPConnection conn.server.red5. org.?red5.server.message.event. public void setServiceProvider(Object serviceProvider). public void setConnectionClosedHandler(Runnable connectionClosedHandler).IPendingServiceCallback callback). public void setCodecFactory(org.red5.server. public org.service. Object[] params.IClientSharedObject getSharedObject(String name.server.rtmp.IPendingServiceCallback callback).api.?net.util.IMessage message).Package org.server.server.server.service.lang.event. public void setStreamEventDispatcher(org.server.codec. public void connectionOpened(RTMPConnection conn.Map<java.

api.lang.?net.Notify invoke. getStreamId .net. Channel channel.?red5.Ping ping).RTMP rtmp).?net. Connection parameters 1. connectionParams protected java.red5.red5.?rtmpt.Object: clone .net.rtmp. connectionOpened .rtmp.net. onPing . messageSent .server.rtmp.SharedObjectMessage object).message.net. messageReceived .codec.Package org.service.red5.BaseRTMPHandler: appCtx .red5.so.net.String.lang.Header source.?rtmp. toString .red5. getClass . equals .server. log 1. org.red5. onChunkSize .? server.?net.server.5.server. onInvoke .?RTMPTClient Methods inherited from org.IPendingServiceCallback connectCallback .event. setApplicationContext Methods inherited from java. hashCode .?red5. notify . onStreamBytesRead .Header source. org. org.lang. protected void onPing(RTMPConnection conn.red5.message. java. org.Object> connectionParams .BaseRTMPHandler: connectionClosed .?server. protected abstract void startConnector(String server. getHostname .rtmp. org.net. org.util.red5. connectArguments protected Object[] connectArguments .Header source. protected void onSharedObject(RTMPConnection conn.?RTMPClient .3. notifyAll .Map<java. onSharedObject .red5. finalize .message.server.server. Connection callback 1. org.?server.4.server.?red5.rtmp. Connect call arguments 1.net. int port).server. serviceInvoker 700 .server.server. org.red5. wait Fields inherited from org.rtmp.2. handlePendingCallResult .net.?rtmp protected void onInvoke(RTMPConnection conn. connectCallback protected org. Channel channel. } Direct known subclasses: org.rtmp.event.rtmp. Channel channel.

java.String.red5.server.util.7.ClientSharedObject> sharedObjects .util. serviceProvider protected Object serviceProvider .Object> connectionParams).?rtmp protected org.lang.Map<java.Map<java. Map<String. IPendingServiceCallback) public void connect(String server. java.?server. int port.lang.red5. connect(String. Connect RTMP client to server's application via given port Parameters server port connectionParams connectCallback Server Connection port Connection parameters Connection callback 1. connect(String. Connect RTMP client to server via given port and with given connection parameters Parameters server port connectionParams Server Connection port Connection parameters 1. sharedObjects protected java.api. int.lang.Map<java. Service invoker 1. Object>) public void connect(String server. int.10.9.api. Map<String.util. Object>.service. connect(String. int. java. org.Object> connectionParams. Object>. IPendingServiceCallback.red5. 701 .8.IPendingServiceCallback connectCallback). int port.IServiceInvoker serviceInvoker . Service provider 1.?red5. org.String.server. Object[]) public void connect(String server.lang. Shared objects map 1.lang. java.6.String.service.so. Map<String.?net.server.Package org.

int port.?server.server.red5.server.service.server. int. Connect RTMP client to server's application via given port Parameters server port connectionParams connectCallback Server Connection port Connection parameters Connection callback connectCallArgumentsArguments for 'connect' call 1. String. org.11. org. 702 . IPendingServiceCallback) public void connect(String server. connectionOpened(RTMPConnection.?red5. java.12.red5. RTMP) public void connectionOpened(RTMPConnection conn.RTMP state).?rtmp int port.codec. String application. java. String application). String) public void connect(String server.service. Object[] connectCallArguments). org. connect(String.?net. int port. Connect RTMP client to server's application via given port Parameters server port application Server Connection port Application at that server 1. connect(String.api.Map<java.red5.util.IPendingServiceCallback connectCallback.13.net.String.Package org.Object> connectionParams.lang.IPendingServiceCallback connectCallback).lang. Connect RTMP client to server's application via given port with given connection callback Parameters server port application connectCallback Server Connection port Application at that server Connection callback 1.api. int.rtmp.

server.Package org. Object[] params. Parameters name persistent return Client shared object name SO persistence flag Client shared object instance 1.server.?rtmp 1. getSharedObject(String.IClientSharedObject getSharedObject(String name.service. Object[].IPendingServiceCallback callback).api. IPendingServiceCallback) public void invoke(String method.red5. disconnect() public void disconnect().16.codec.?net. org.red5.server. Disconnect the first connection in the connection map 1. getCodecFactory() public org. Connect to client shared object. org.IPendingServiceCallback callback).?red5. Parameters method callback Method name Callback handler 1.red5.server.api.so.net. IPendingServiceCallback) public void invoke(String method.?server.red5.service. invoke(String.RTMPCodecFactory getCodecFactory().rtmp.18.15.17. boolean) public synchronized org. Parameters method Method 703 . Invoke a method on the server and pass parameters. invoke(String.14. Getter for codec factory Parameters return Codec factory 1.api. Invoke a method on the server. boolean persistent).

setCodecFactory(RTMPCodecFactory) public void setCodecFactory(org.net.server. Ping) protected void onPing(RTMPConnection conn.util.Ping ping).?net. Header.Package org. Channel.RTMPCodecFactory factory). org. org.21. RTMP) protected void onInvoke(RTMPConnection conn.net. java.rtmp. 1.red5. Channel channel.lang.red5.24. onPing(RTMPConnection.23.event.server. int port.message.net. org.?rtmp params callback Method call parameters Callback object 1. onChunkSize(RTMPConnection.message.event.server.SharedObjectMessage object).Map<java.red5.server.codec.red5. Setter for codec factory Parameters 704 .20.red5. onSharedObject(RTMPConnection. onInvoke(RTMPConnection.net.net.rtmp.rtmp. org. Channel.server.event. SharedObjectMessage) protected void onSharedObject(RTMPConnection conn.19. org.Object> makeDefaultConnectionParams(String server.?red5.22.message.message.rtmp. ChunkSize) protected void onChunkSize(RTMPConnection conn.Header source. 1. Channel.rtmp.Header source.Notify invoke.server.?server. Channel.rtmp. Channel channel. org.server. org.so.server. 1.RTMP rtmp).ChunkSize chunkSize). String) public java. 1.codec.red5.Header source. org.rtmp.red5. org. Channel channel. Header. String applicat Parameters server port application return Server Connection port Application at that server default connection parameters 1.Header source. Header.net.String.rtmp.red5.server.rtmp. Channel channel.net. int. Header.net. makeDefaultConnectionParams(String. Notify.net.red5.red5.lang.server.

?red5.IEventDispatcher streamEventDispatche Setter for stream event dispatcher (useful for saving playing stream to file) Parameters streamEventDispatcher 1.?server.?server.Logger log .ApplicationContext appCtx .1.Package org.?rtmp factory Codec factory to use 1.slf4j.?IRTMPHandler.context. // Public Constructors public BaseRTMPHandler().25.springframework. 705 . int port).?rtmp. setStreamEventDispatcher(IEventDispatcher) public void setStreamEventDispatcher(org. Synopsis public abstract class BaseRTMPHandlerimplements.red5.27.event.?red // Protected Fields protected org. startConnector(String. org. // Public Static Methods public static int getStreamId(). Parameters serviceProvider Service provider 1.api. Start network connection to server Parameters server port Server Connection port 2. org. protected static org.?red5.server. 2. int) protected abstract void startConnector(String server. Class BaseRTMPHandler Base class for all RTMP handlers.26.?net. setServiceProvider(Object) public void setServiceProvider(Object serviceProvider). Register object that provides methods that can be called by the server.?net.

message.Ping ping). Channel channel. wait 706 .event.codec.?net. Channel channel.net.rtmp. org.server.rtmp.?net. Object message). notify .codec. protected abstract void onSharedObject(RTMPConnection conn.net.event.red5. // Protected Methods protected String getHostname(String url).ApplicationContext appCtx) throws BeansException.?red5.?red5. org.?red5.net.server. public void connectionOpened(RTMPConnection conn.net.ProtocolState state.net.message.server.lang.red5.?BaseRTMPClientHandler .net. protected abstract void onChunkSize(RTMPConnection conn. protected void handlePendingCallResult(RTMPConnection conn.rtmp.event.server.?rtmp.rtmp.Notify invoke.rtmp.net. equals . org. org. org.ChunkSize chunkSize).?server.event.rtmp.red5. public void setApplicationContext(org.RTMP state). org.so.rtmp.red5. Channel channel.server.server.net.server.rtmp. getClass . Object in) throws Exception.rtmp. org.red5. protected void onStreamBytesRead(RTMPConnection conn. notifyAll .Package org.red5.server. org.?rtmp // Public Methods public void connectionClosed(RTMPConnection conn.?server.server.net.message.Header source.RTMP rtmp).RTMP state). org.server. public void messageReceived(RTMPConnection conn.message. org. org.BytesRead streamBytesRead).rtmp.protocol. protected abstract void onInvoke(RTMPConnection conn. org.rtmp.net.springframework.red5.red5.net.event.Notify invoke).?RTMPHandler Methods inherited from java.server. Channel channel.red5.net.server. } Direct known subclasses: org.red5.codec.Header source. org. finalize .rtmp. protected abstract void onPing(RTMPConnection conn.net.context.server.Header source.?rtmp.Object: clone . hashCode .rtmp. org. public void messageSent(RTMPConnection conn.net.SharedObjectMessage object).message.Header source.red5.red5.?server. org.red5.server.Header source.server.?net. org. toString .red5. Channel channel.red5.

connectionClosed(RTMPConnection. RTMP) public void connectionClosed(RTMPConnection conn.RTMP state). Specified by: Method connectionOpened in interface IRTMPHandler Connection open event 2.?red5. appCtx protected org.RTMP state).8.5. org.codec. org.rtmp.rtmp.2. RTMP) public void connectionOpened(RTMPConnection conn.slf4j. handlePendingCallResult(RTMPConnection. getStreamId() public static int getStreamId().Package org.3. 707 . Application context 2.net.6.4. log protected static org. Return hostname for URL. Parameters return Stream ID 2.red5. Specified by: Method connectionClosed in interface IRTMPHandler Connection closed 2.server.?net.Logger log . connectionOpened(RTMPConnection.red5. Parameters url return URL Hostname from that URL 2.context.server.net. Notify) protected void handlePendingCallResult(RTMPConnection conn.ApplicationContext appCtx .codec.7. getHostname(String) protected String getHostname(String url).?server.?rtmp 2. Logger 2.springframework. Getter for stream ID.

rtmp. Header.net.?rtmp org.9. Object) public void messageSent(RTMPConnection conn.net. Chunk size change event handler.?net.server.net. Specified by: Method messageSent in interface IRTMPHandler Message sent 2.event.Header source. ChunkSize) protected abstract void onChunkSize(RTMPConnection conn.net. org. Channel. Dispatches results to all pending call handlers.red5. RTMP) protected abstract void onInvoke(RTMPConnection conn.server.?red5. Abstract.rtmp. onChunkSize(RTMPConnection. 708 . Object in) throws Exception.11.10.message.rtmp. Specified by: Method messageReceived in interface IRTMPHandler Message recieved 2.message. messageSent(RTMPConnection.server.rtmp.server.server.red5. org.red5.red5. messageReceived(RTMPConnection. ProtocolState. to be implemented in subclasses.net.event. org. Channel channel. Notify. Parameters conn channel source chunkSize Connection Channel Header New chunk size 2.Notify invoke.ChunkSize chunkSize). Object message).rtmp.server.ProtocolState state.12. Handler for pending call result.Package org.protocol.server.red5.net.codec. onInvoke(RTMPConnection. Channel channel. Parameters conn invoke Connection Pending call result event context 2.Notify invoke). Channel. Header.rtmp. org.event.red5.net.red5. org.?server. org.Header source.RTMP rtmp). Object) public void messageReceived(RTMPConnection conn.

Ping) protected abstract void onPing(RTMPConnection conn. 709 .Header source.red5.Header source. onPing(RTMPConnection. SharedObjectMessage) protected abstract void onSharedObject(RTMPConnection conn. Parameters conn channel source invoke rtmp Connection Channel Header Invocation event context RTMP connection state 2. Header.message.message.14.net.rtmp.server. Parameters conn channel source object Connection Channel Header Shared object event context 2. Parameters conn channel source ping Connection Channel Header Ping event context 2. Channel channel.SharedObjectMessage object).13. Channel channel. org.net. Channel channel.Package org.server.?server. onSharedObject(RTMPConnection.message.?red5.server.rtmp.15.net.server.?net.so.red5.red5. Header. BytesRead) protected void onStreamBytesRead(RTMPConnection conn. Channel. onStreamBytesRead(RTMPConnection.red5. org.server. Ping event handler. Header.red5. org. Channel.Ping ping).net.event.rtmp. org. Shared object event handler.?rtmp Invocation event handler.rtmp. org. Channel.Header source.

finalize . notifyAll .status.?server. toString . Synopsis public class Channel { // Protected Fields protected static org.?rtmp org. Class Channel Identified connection that transfers packets.Package org. public int getId().16. setApplicationContext(ApplicationContext) public void setApplicationContext(org. wait 710 .ApplicationContext appCtx) throws BeansException.springframework.event. int channelId).Object: clone .event.rtmp.rtmp.server.?red5. public void sendStatus(org. } Methods inherited from java. public void write(org.BytesRead streamBytesRead). getClass .red5.rtmp.net. notify .?net.lang.net.slf4j.server. hashCode . // Public Methods public void close().red5.server.IRTMPEvent event). equals . 3.Logger log . Parameters conn channel source streamBytesRead Connection Channel Header Bytes read event context 2. Stream bytes read event handler.red5.net.Status status).context. // Public Constructors public Channel(RTMPConnection conn. Specified by: Method setApplicationContext in interface ApplicationContextAware 3. // Protected Methods protected RTMPConnection getConnection().1.

status. Sends status notification. Parameters return Channel ID 3.3.5.server. Channel(RTMPConnection. 3.net. Getter for RTMP connection. int channelId). int) public Channel(RTMPConnection conn. close() public void close().7.Package org. getConnection() protected RTMPConnection getConnection().?net. sendStatus(Status) public void sendStatus(org.?rtmp 3. Parameters status Status 711 .2.4.6. Logger 3.?server.slf4j.red5.Logger log . Closes channel with this id on RTMP connection.Status status). Parameters return RTMP connection 3. getId() public int getId(). Getter for id.rtmp.?red5. log protected static org. Creates channel from connection and channel id Parameters conn channelId Connection Channel id 3.

red5. write(IRTMPEvent) public void write(org.rtmp. // Public Methods public void setResult(Object result).Logger log . protected void setInvokeId(int id). Parameters event Event data 4.slf4j. Class DeferredResult Can be returned to delay returning the result of invoked methods.server. Synopsis public interface ClientExceptionHandler { // Public Methods public void handleException(Throwable throwable).1.event.?server. // Public Constructors public DeferredResult(). Synopsis public class DeferredResult { // Protected Fields protected static org. protected void setServiceCall(org. 5.api. public boolean wasSent().?net. // Protected Methods protected void setChannel(Channel channel).Package org. } 5. } 712 . Interface ClientExceptionHandler Client connection exception handler 4.IRTMPEvent event).?rtmp 3.1.8.service.?red5. Writes packet from event data to RTMP connection.IPendingServiceCall call).net.server.red5.

?net. Setter for invoke Id. notifyAll . Parameters id Invocation object identifier 5.2. toString .?server. Parameters result deferred result of the method call 5.api.4. setServiceCall(IPendingServiceCall) protected void setServiceCall(org. getClass .6.red5.IPendingServiceCall call).server.7.?red5. notify . setInvokeId(int) protected void setInvokeId(int id). Logger 5.lang.3. 713 .5.?rtmp Methods inherited from java. log protected static org. setResult(Object) public void setResult(Object result).Logger log .Package org. Setter for channel. setChannel(Channel) protected void setChannel(Channel channel). Parameters call Service call 5. wait 5.service. Set the result of a method call and send to the caller. Parameters channel Channel 5.slf4j.Object: clone . equals . finalize . wasSent() public boolean wasSent(). Setter for service call. hashCode .

?server.Package org.red5. org. protected void onPing(RTMPConnection conn. onChunkSize . org.Packet packet). onPing .Ping ping).red5. getHostname . messageSent .codec.server.net. otherwise false 6. org.red5.RTMP rtmp).?server.server. Channel channel. setServer . getStreamId .rtmp.?red5.red5.codec.RTMPHandler: getStatus .rtmp.red5. onSharedObject .Header header.server.?rtmp Check if the result has been sent to the client.red5.server. org.message.rtmp.server.rtmp.message.net. onInvoke .rtmp. org.net.BaseRTMPHandler: connectionClosed .protocol. setStatusObjectService Methods inherited from org. handlePendingCallResult .?net.server. public void messageSent(RTMPConnection conn.server. protected void sendConnectMessage(RTMPConnection conn). invokeCall .red5.mrtmp.server. } Methods inherited from org. // Protected Methods protected boolean checkPermission(RTMPConnection conn).?RTMPHandler { // Public Constructors public EdgeRTMPHandler(). Parameters return true if the result has been sent.net.red5.net. org. connectionOpened .net. public void messageReceived(RTMPConnection conn. setApplicationContext 714 .net.server.rtmp. Object message). public void setMRTMPManager(org. protected void handleConnect(RTMPConnection conn.Header source.rtmp. // Public Methods public void connectionClosed(RTMPConnection conn. messageReceived .rtmp.net.net. org. onStreamBytesRead .net.message. org.server. protected void forwardPacket(RTMPConnection conn.event.?red5.server.rtmp. Channel channel.Invoke invoke. org.?rtmp.event.red5. Class EdgeRTMPHandler public class EdgeRTMPHandler extends.red5. Object in) throws Exception.?net.IMRTMPManager mrtmpManager).net.RTMP state).red5.ProtocolState state.

deleteStreamById .rtmp. statusObjectService Fields inherited from org. messageSent .ISchedulingService service). setId . getBandwidthConfigure . org. registerStream . newBroadcastStream .?server.net. pingReceived . toString . getVideoCodecFactory . getEncoding . setIoSession . newSingleItemSubscriberStream . Channel channel.RTMPMinaConnection: close . messageDropped .event. getStreamIdForChannel .api.mrtmp. getId .net. getStreams .?rtmp.scheduling. ping .?red5. getReadBytes .server.net. public void setMrtmpManager(org. getParentBWControllable . getClientBytesRead .red5. Header.?server. server . getState . getChannel . receivedBytesRead . notify .red5.Package org. Pass through all Ping events to origin except ping/pong 7.rtmp. getInvokeId . invoke .Ping ping). org.BaseRTMPHandler: appCtx 6. getPendingMessages . closeChannel . getStreamByChannelId .?rtmp Methods inherited from java. onInactive . finalize .message.1. org. getIoSession . getPendingCall . reserveStreamId .?RTMPMinaConnection { // Public Constructors public EdgeRTMPMinaConnection(). wait Fields inherited from org. invokeMethod . removeClientStream .red5. notify .?net.server. getPendingVideoMessages .Header source. hashCode .rtmp.server.server. createOutputStream . Ping) protected void onPing(RTMPConnection conn.server. setMaxInactivity . registerDeferredResult .red5. setBandwidthConfigure . // Protected Methods protected void startWaitForHandshake(org.RTMPConnection: addClientStream . getWrittenBytes . connect .net. createStreamName .server.lang.red5. } Methods inherited from org. registerPendingCall .?net. rawWrite .Object: clone .red5.server.red5.IMRTMPEdgeManager mrtmpManager). isConnected . rememberStreamBufferDuration . getNextAvailableChannelId .server. isChannelUsed . getStreamById .?red5. onPing(RTMPConnection.RTMPHandler: log . equals . setSchedulingService .net.red5. getUsedStreamCount . Channel.net. getClass . write Methods inherited from org.net. getLastPingTime .rtmp. newPlaylistSubscriberStream . retrievePendingCall . setPingInterval . notifyAll . setState 715 . // Public Methods public void close().rtmp. setMaxHandshakeTimeout .rtmp. Class EdgeRTMPMinaConnection public class EdgeRTMPMinaConnection extends. messageReceived .

// Public Methods public void setRtmpConnManager(IRTMPConnManager rtmpConnManager).?net. host . org.?red5. getClient . pingInterval . log Fields inherited from org. keepAliveJobName . setAttributes Methods inherited from java. initialize . state . removeAttributes .red5.Package org. remotePort . getIntAttribute . getByteAttribute .red5. getAttribute .server. unregisterStream . setup . getClass .server.red5. getAttributes .?RTMPMinaIoHandler { // Public Constructors public EdgeRTMPMinaIoHandler(). getDroppedMessages . scope .red5. getSessionId . lastPongReceived .AttributeStore: attributes 8. pendingCalls .?net. startWaitForHandshake . getBasicScopes . toString . getDoubleAttribute . invokeId . getRemoteAddress .red5.?rtmp. unregisterBasicScope Methods inherited from org. Class EdgeRTMPMinaIoHandler public class EdgeRTMPMinaIoHandler extends. wait Fields inherited from org. remoteAddress . getPath .AttributeStore: filterNull .server. hashCode . deferredResults . getSetAttribute . path . unreserveStreamId .red5. maxInactivity . handleEvent .net. notifyAll .server. // Protected Methods protected RTMPMinaConnection createRTMPMinaConnection(). } Methods inherited from org.Object: clone . lastPingTime . messageSent 716 . updateBytesRead . getAttributeNames . notifyEvent . getRemoteAddresses . getHost . registerBasicScope . getListAttribute .server. closed .BaseConnection: basicScopes . streamBuffers Fields inherited from org. getRemotePort .server.?server. remoteAddresses . exceptionCaught .rtmp. params .rtmp.net. messageReceived . finalize . getStringAttribute . writingMessage Methods inherited from org. oName .RTMPConnection: clientId . getBoolAttribute .RTMPMinaIoHandler: createRTMPMinaConnection . getScope . getLongAttribute . hasAttribute . removeAttribute . client .server. equals .net. getReadMessages . getType . getWrittenMessages . startRoundTripMeasurement . getConnectParams .?server. getMapAttribute . writtenMessages Fields inherited from org. droppedMessages . type . readMessages . sessionId . unregisterDeferredResult . lastPingSent .?rtmp .rtmp.?red5.RTMPMinaConnection: ioSession . encoding .lang. setAttribute . getShortAttribute .red5.BaseConnection: dispatchEvent .

handler .lang. setMode . log . public RTMPConnection removeConnection(int clientId).1.rtmp.server. codecFactory .rtmp. sessionCreated . notify .?red5. Interface IRTMPHandler RTMP events handler 11.IoHandlerAdapter: sessionIdle Methods inherited from java. equals .Package org. rawBufferRecieved . rtmpConnManager 9. toString . public RTMPConnection getConnection(int clientId).net.red5. wait Fields inherited from org. sessionOpened .net. } 10.event.util. finalize . Interface INetStreamEventHandler Notify handler for client-side stream 9.?rtmp . sessionClosed .common.Notify notify). getClass . 717 .mina. mode .red5. hashCode . } 11. setApplicationContext . setHandler .server.?net.Object: clone .Collection<org. notifyAll .net. Synopsis public interface IRTMPHandler { // Public Methods public void connectionClosed(RTMPConnection conn. public java.RTMPMinaIoHandler: appCtx .rtmp. setCodecFactory .apache.1.RTMPConnection> removeConnections().?server. Synopsis public interface INetStreamEventHandler { // Public Methods public void onStreamEvent(org.red5. Interface IRTMPConnManager public interface IRTMPConnManager { // Public Methods public RTMPConnection createConnection(Class connCls).server. setRtmpConnManager Methods inherited from org.

} 11.codec.red5.?red5. org. public void messageSent(RTMPConnection conn. Connection closed Parameters conn state Connection RTMP state 11. Object message) throws Exception.rtmp.red5.net.server. Object message). org.red5.red5. org.rtmp. messageReceived(RTMPConnection.RTMP state). ProtocolState.4.net.server. Message recieved Parameters conn state Connection RTMP state 718 .net. connectionOpened(RTMPConnection. Object message) throws Exception.protocol.net.?rtmp org.protocol.red5.rtmp.server.3.?net.RTMP state).RTMP state).codec.codec. connectionClosed(RTMPConnection. org.rtmp. Object) public void messageReceived(RTMPConnection conn.server.2. RTMP) public void connectionOpened(RTMPConnection conn.Package org.net.red5.?server.codec.server. public void messageReceived(RTMPConnection conn.net.ProtocolState state.server. RTMP) public void connectionClosed(RTMPConnection conn.ProtocolState state. Connection open event Parameters conn state Connection RTMP state 11. public void connectionOpened(RTMPConnection conn.RTMP state). org.

notify . // Public Methods public java. disconnect . connectionOpened . Message sent Parameters conn message Connection Message 12. play .rtmp. setConnectionClosedHandler .5. finalize . messageSent . } Methods inherited from org.?rtmp.BaseRTMPClientHandler: connect . getClass .?net.lang. notifyAll .?red5.net.?server. equals .?BaseRTMPClientHandler { // Public Constructors public RTMPClient(). setServiceProvider .util. setApplicationContext Methods inherited from java. onPing . Object) public void messageSent(RTMPConnection conn.Package org.1.?server.server. messageSent(RTMPConnection. onChunkSize .lang. publishStreamData . String applic // Protected Methods protected void startConnector(String server. toString .red5. messageReceived . int port). setStreamEventDispatcher .?rtmp message Exception Message Exception 11. 12. setExceptionHandler . onInvoke . getCodecFactory .String. connectionClosed . getConnManager . onStreamBytesRead .?red5. getStreamId . startConnector Methods inherited from org.rtmp. handlePendingCallResult .red5. setCodecFactory . org. wait 719 .Map<java. Synopsis public class RTMPClient extends.lang. onSharedObject . hashCode . java.Object> makeDefaultConnectionParams(String server int port. getSharedObject .?net.Object: clone .net.BaseRTMPHandler: getHostname . invoke . Initial client mode code by Christian Eckerle. Object message). publish . Class RTMPClient RTMP client object. makeDefaultConnectionParams .server. handleException . createStream .

org. streamEventDispatcher Fields inherited from org.server.?rtmp.server.?net.?server. public synchronized RTMPConnection removeConnection(int clientId).net. 720 . // Public Constructors public RTMPClientConnManager().net.?IRTMPConnManager { // Protected Fields protected RTMPConnection rtmpConn .RTMPConnection> removeConnection } Methods inherited from java. // Public Methods public synchronized RTMPConnection createConnection(Class connCls). notify . public synchronized java. public synchronized RTMPConnection getConnection(int clientId). Class RTMPClientConnManager public class RTMPClientConnManagerimplements. toString . log 12.net. getClass .rtmp. 13.?IRTMPConnManager.red5.2.Collection<org.?rtmp Fields inherited from org. finalize .BaseRTMPHandler: appCtx . serviceInvoker .?red5. RTMPClient() public RTMPClient().rtmp.Package org.red5. sharedObjects . notifyAll . hashCode .?red5.server.?net. connectArguments .BaseRTMPClientHandler: codecFactory . Class RTMPConnManager public class RTMPConnManagerimplements. org. public RTMPConnection createConnectionInstance(Class cls) throws Exception.red5. public synchronized RTMPConnection getConnection(). // Public Methods public RTMPConnection createConnection(Class connCls). serviceProvider . org.Object: clone . wait 14.util. connManager . connectionParams . Constructs a new RTMPClient.rtmp. equals . connectCallback .?server.?rtmp.lang.?springfr // Public Constructors public RTMPConnManager().?red5.?net.?server.

?red5.red5. data transfer channels.DeferredResult> deferredResults . wait 15.api. Class RTMPConnection RTMP connection.?serv // Protected Fields protected int clientId . protected java. protected long lastPingSent . public void setApplicationContext(org. last ping time and ping result) and session.?red5.?BaseConnection implements.server.HashSet<org. protected static org.ObjectName oName .Collection<org.server.?server.rtmp.api.?server. org. notifyAll .net.Encoding encoding .?server.red5. public java.net.rtmp.util. finalize . } Methods inherited from java. protected java.concurrent. protected long lastPongReceived . org.RTMP state . protected String keepAliveJobName .Object: clone .?net.red5. org. public RTMPConnection removeConnection(int clientId).?IStreamCapableConnection.service. protected javax.server.1.lang.lang.slf4j.?red5.IPendi protected int pingInterval .codec.server. 721 .rtmp.springframework.ConcurrentMap<java.atomic. bandwidth configuration. protected int lastPingTime .util.context. Synopsis public abstract class RTMPConnection extends.net. 15.concurrent.ApplicationContext appCtx) throws BeansException.management. connection state (is alive.?red5. used encoding (AMF0/AMF3).AtomicInteger invokeId .?api.IConnection. protected org.red5.?api.util. protected int maxInactivity . Stores information about client streams.Logger log . pending RPC calls. getClass . protected java.?stream. toString .util. hashCode .Package org. equals . org.?server. notify .red5.Integer.RTMPConnection> removeConnections(). protected org.server.?rtmp public RTMPConnection getConnection(int clientId).

red5. // Public Methods public void addClientStream(org.Package org. public Channel getChannel(int channelId).api.server. public org.codec.red5.IBWControllable getParentBWControllable().lang.server.lang.red5.api.net.?rtmp protected java. java.stream. public void close().OutputStream createOutputStream(int streamId).stream. public long getWrittenBytes().Integer. public long getClientBytesRead(). public void closeChannel(int channelId).util.rtmp. public org.IClientStream stream).api.red5.server.server.Integer> streamBuffers .IClientStream getStreamById(int id).red5.red5.stream.server. public org.api. public int getId().api. public void deleteStreamById(int streamId). public void invoke(String method).RTMP getState().api. public org.server.IConnection.server. public org.api.red5.?server. public int getInvokeId(). public synchronized int getNextAvailableChannelId().IScope newScope.server. public boolean connect(org.Encoding getEncoding().Map<java.IBandwidthConfigure getBandwidthConfigure().red5. public int getStreamIdForChannel(int channelId). Object[] params). public org.red5. // Public Constructors public RTMPConnection(String type). public org.?red5.server.?net.stream. public int getLastPingTime(). public long getPendingVideoMessages(int streamId).server. 722 .VideoCodecFactory getVideoCodecFactory(). public org.red5.stream.IClientStream getStreamByChannelId(int channelId). public long getReadBytes().

service. public void setMaxInactivity(int maxInactivity).red5. public void ping().server. org.server.Ping ping).red5. public void notify(org.IPendingServiceCallback callback). org.?rtmp public void invoke(String method. public abstract void rawWrite(org.service.IPendingServiceCall call). public org.?red5. public void invoke(String method.IServiceCall call.red5.red5. public void receivedBytesRead(int bytes).ISingleItemSubscriberStream newSingleItemSubscriberStream(int st public void notify(String method). public void invoke(org.?net.api. public int reserveStreamId().IPlaylistSubscriberStream newPlaylistSubscriberStream(int stream public org. public void invoke(String method.IPendingServiceCallback callback).api.server.server.red5. int channel).stream.server.red5.IServiceCall call). 723 .service.server. public void notify(String method.api. public void notify(org.server.red5.server. public org.api. public void registerPendingCall(int invokeId.Package org.red5.api.net. public void ping(org.server. public void removeClientStream(int streamId).service. Object[] params).red5.common. public boolean isChannelUsed(int channelId).IClientBroadcastStream newBroadcastStream(int streamId). public void setId(int clientId).?server. Object[] params). public void setBandwidthConfigure(org.stream.IBandwidthConfigure config).mina.service.rtmp.IServiceCall call). public void setMaxHandshakeTimeout(int maxHandshakeTimeout).server.server.api.server. int channel).api. Object[] params.service.red5.apache.api.red5.red5. public void invoke(org.event. org.IServiceCall call.api.stream.api.api.ByteBuffer out).service.

server.net.IClientStream stream).IClientStream stream).red5.codec.rtmp.?net.IPendingServiceCall getPendingCall(int invokeId). protected org. protected void messageDropped().rtmp.Map<java.red5.red5.red5. protected void updateBytesRead(). java.Collection<org.net.server.util.server. protected abstract void onInactive().Ping pong).stream. protected int getUsedStreamCount(). protected void startWaitForHandshake(org. String path.server.server. public String toString().api.ISchedulingService service). protected void rememberStreamBufferDuration(int streamId.stream.service.lang.server.api.?rtmp public void setPingInterval(int pingInterval). protected void registerStream(org.Package org.event.stream.server. int bufferDuration). protected void unregisterStream(org.api. public void setSchedulingService(org. public void setup(String host.rtmp.IPendingServiceCall retrievePendingCall(int invokeId).server.red5.Packet message). public void startRoundTripMeasurement(). public void unreserveStreamId(int streamId).red5.Object> params).net.util. String sessionId.server. protected void messageReceived().Packet out).red5.String.server.red5.red5.scheduling.RTMP state).service. protected void unregisterDeferredResult(DeferredResult result).net.IClientStream> getStreams().api.red5.api. protected void messageSent(org.lang.api.server. protected void pingReceived(org. protected java. protected void registerDeferredResult(DeferredResult result). public abstract void write(org.red5. // Protected Methods protected String createStreamName().rtmp.message.?red5.ISchedulingService schedulingServi public void setState(org. protected org.scheduling. 724 .?server.api. java.message.

notifyAll .red5. writtenMessages Fields inherited from org.server. getSessionId . remoteAddresses . getWrittenMessages .server. removeAttribute . getPendingVideoMessages .red5. getHost . getRemoteAddresses . org.2.DeferredResult Deferred results set.?rtmp.?server.?rtmp. getAttributes . initialize . toString . hashCode . params .rtmp. closed . getSetAttribute . getPendingMessages . getShortAttribute . getWrittenBytes . isConnected . handleEvent . removeAttributes .?server.red5. getClientBytesRead .?net. hasAttribute . deferredResults protected java. getConnectParams .server. getReadBytes .?red5. getBoolAttribute .? red5.?net. getMapAttribute . getRemotePort .?net.rtmp. getRemoteAddress . equals . registerBasicScope .BaseConnection: basicScopes .util. getClass . getDroppedMessages .Packet message). remoteAddress . RTMPConnection(String) public RTMPConnection(String type).?server.lang. getByteAttribute . 15. setAttributes Methods inherited from java. log .?net. scope . path .HashSet<org. client . See Also org. getLongAttribute .?server. getPath .net.server.red5.server. type . finalize . getAttribute .Package org.4. notifyEvent . remotePort . droppedMessages . dispatchEvent . sessionId . getDoubleAttribute .server.message. getReadMessages . Parameters type Connection type 15.?rtmp protected void writingMessage(org. unregisterBasicScope Methods inherited from org. getIntAttribute . getBasicScopes .? BaseRTMPTConnection Methods inherited from org.?RTMPMinaConnection . getStringAttribute .AttributeStore: attributes 15.AttributeStore: filterNull . getType . } Direct known subclasses: org. readMessages .server.?rtmpt.net. Creates anonymous RTMP connection without scope.rtmp. getScope . encoding 725 .3.Object: clone .?red5. notify .?RTMPOriginConnection .red5. connect .DeferredResult> deferredResults . host .?red5. setAttribute . getClient .red5. wait Fields inherited from org. getAttributeNames .red5.BaseConnection: close . org.net. getListAttribute .

lastPingTime protected int lastPingTime . Logger 15. oName protected javax.atomic. 15.12.IConnection. 15. Maximum time in ms after a client is disconnected because of inactivity.api. 15. 15.AtomicInteger invokeId . Timestamp when last ping command was sent. MBean object name used for de/registration purposes.?server. Name of quartz job that keeps connection alive.Encoding encoding .6.8. lastPongReceived protected long lastPongReceived . AMF0 by default. 15. Identifier for remote calls. 15.Package org.util.red5. AMF version. 15. Timestamp when last ping result was received.slf4j.11.?rtmp protected org.concurrent.server. log protected static org.management.7.13.5. Last ping timestamp.10. invokeId protected java. lastPingSent protected long lastPingSent . maxInactivity protected int maxInactivity .?net. keepAliveJobName protected String keepAliveJobName .9. 15.Logger log .?red5.ObjectName oName . pendingCalls 726 .

15. Creates output stream object from stream id. 15. Remembered stream buffer durations.Integer. Generates new stream name. org.14.Integer> streamBuffers .stream. closeChannel(int) public void closeChannel(int channelId). streamBuffers protected java.16.util.19.Package org.?red5. createStreamName() protected String createStreamName().service. createOutputStream(int) public org.red5.15.?net. java.OutputStream createOutputStream(int streamId). close() public void close().Map<java.Integer.?server.OutputStream Stream id Output stream object 15.concurrent.server.lang.lang.IPending Hash map that stores pending calls and ids as pairs. Output stream consists of audio. Parameters 727 . data and video channels.lang. Ping interval in ms to detect dead clients.18. 15. pingInterval protected int pingInterval .server.ConcurrentMap<java.red5.util.red5. 15. Parameters channelId Channel id 15.stream.server.17.?rtmp protected java.api. Parameters streamId return See Also org. Closes channel.

IConnection. Return channel by id.22. Generate next invoke id. Parameters return Number of bytes 15.server. getClientBytesRead() public long getClientBytesRead(). Return AMF protocol encoding used by this connection.red5.api. 15. getEncoding() public org. getBandwidthConfigure() public org.25. getChannel(int) public Channel getChannel(int channelId). 15.?server.21. Parameters channelId return Channel id Channel by id 15.server. Parameters 728 .red5. Parameters return AMF encoding used by connection 15.?net.IBandwidthConfigure getBandwidthConfigure().Package org. Specified by: Method deleteStreamById in interface IStreamCapableConnection Deletes the stream with the given id.Encoding getEncoding(). getInvokeId() public int getInvokeId().api.?red5.23. deleteStreamById(int) public void deleteStreamById(int streamId).20.?rtmp return New stream name 15. Get number of bytes the client reported to have received.24.

api.?server. getPendingVideoMessages(int) public long getPendingVideoMessages(int streamId).32. Parameters 729 . Specified by: Method getPendingVideoMessages in interface IStreamCapableConnection Total number of video messages that are pending to be sent to a stream.?red5.?net.30.?rtmp return Next invoke id for RPC 15. Parameters invokeId return Pending call service id Pending call service object 15.server. Return stream by given channel id. 15. getPendingCall(int) protected org.red5. 15.server.red5.api.27. 15. Get pending call service by id.28. Getter for next available channel id.31.server. getParentBWControllable() public org.red5. getLastPingTime() public int getLastPingTime().service.stream.Package org. Parameters return Next available channel id 15. getNextAvailableChannelId() public synchronized int getNextAvailableChannelId().api.29. getStreamByChannelId(int) public org.IPendingServiceCall getPendingCall(int invokeId).IBWControllable getParentBWControllable(). getReadBytes() public long getReadBytes(). 15.26.IClientStream getStreamByChannelId(int channelId).

getUsedStreamCount() protected int getUsedStreamCount().34. Parameters return Client streams as array 15.server.red5.stream.Collection<org. Parameters return Video codec factory 730 .35.stream.util.37.red5.stream. getStreamIdForChannel(int) public int getStreamIdForChannel(int channelId). Parameters return Value for property 'usedStreamCount'. Return stream id for given channel id.IClientStream getStreamById(int id).?net. Getter for video codec factory. Getter for used stream count.33.36.?rtmp channelId return Channel id Stream that channel belongs to 15. getVideoCodecFactory() public org. 15.server.Package org.?red5.red5. getStreams() protected java.api. Specified by: Method getStreamById in interface IStreamCapableConnection Get a stream by its id.api. Getter for client streams.IClientStream> getStreams(). getStreamById(int) public org. 15.server.?server.VideoCodecFactory getVideoCodecFactory(). Parameters channelId return Channel id ID of stream that channel belongs to 15.

invoke(String) public void invoke(String method).server.service. int channel).40. Specified by: Method invoke in interface IServiceCapableConnection Invoke method by name with callback 15. Specified by: Method invoke in interface IServiceCapableConnection Invoke service using call and channel 15. invoke(String.42. invoke(IServiceCall.red5.service. Specified by: Method invoke in interface IServiceCapableConnection 731 . Object[].?net. invoke(String.IPendingServiceCallback callback).server. invoke(String. 15.api. Object[] params).38. IPendingServiceCallback) public void invoke(String method.IPendingServiceCallback callback).server.api.?red5.red5.service. getWrittenBytes() public long getWrittenBytes(). Specified by: Method invoke in interface IServiceCapableConnection Invoke method with parameters 15. invoke(IServiceCall) public void invoke(org. Object[]) public void invoke(String method.43.39. org.service.41.?server.IServiceCall call).IServiceCall call. Specified by: Method invoke in interface IServiceCapableConnection Invoke method by name 15.api. Specified by: Method invoke in interface IServiceCapableConnection Invokes service using remoting call object 15. Object[] params.server.red5. org. int) public void invoke(org. IPendingServiceCallback) public void invoke(String method.?rtmp 15.api.red5.Package org.44.

47. false otherwise 15.stream. isChannelUsed(int) public boolean isChannelUsed(int channelId). Parameters message Message to mark 15.51.red5.Packet message). messageSent(Packet) protected void messageSent(org.?server.api.red5. Increases number of read messages by one.ISingleItemSubscriberStream newSingleItemSubscriberStream(int stre 732 .rtmp. Updates number of bytes read. Specified by: Method newBroadcastStream in interface IStreamCapableConnection Create a broadcast stream.50. messageReceived() protected void messageReceived().IClientBroadcastStream newBroadcastStream(int streamId).red5. newPlaylistSubscriberStream(int) public org. messageDropped() protected void messageDropped().server.stream.stream.message.server.server.49. newSingleItemSubscriberStream(int) public org.server. 15. Increases number of dropped messages.red5. Checks whether channel is used.Package org. newBroadcastStream(int) public org.?red5.?rtmp 15.45. 15.net. 15. Parameters channelId return Channel id true if channel is in use. 15.IPlaylistSubscriberStream newPlaylistSubscriberStream(int streamId Specified by: Method newPlaylistSubscriberStream in interface IStreamCapableConnection Create a stream that can play a list.api. Mark message as sent.api.46.48.?net.

IServiceCall call).service.red5.api.rtmp.api. ping() public void ping().net.52. notify(IServiceCall.server. Handler for ping event. 733 . Specified by: Method notify in interface IServiceCapableConnection 15. Specified by: Method notify in interface IServiceCapableConnection 15.59.event.server.56.?server. To be implemented. 15. onInactive() protected abstract void onInactive().IServiceCall call. int) public void notify(org.red5.?rtmp Specified by: Method newSingleItemSubscriberStream in interface IStreamCapableConnection Create a stream that can play only one item.58. ping(Ping) public void ping(org.net.?net.red5. Parameters ping Ping event context 15. Inactive state event handler. Specified by: Method notify in interface IServiceCapableConnection 15.Ping ping). notify(String.Ping pong).rtmp. 15. 15.53.server.57.service. notify(String) public void notify(String method).55. Specified by: Method notify in interface IServiceCapableConnection 15. Object[] params).event. notify(IServiceCall) public void notify(org.server. pingReceived(Ping) protected void pingReceived(org.54.red5.?red5. Object[]) public void notify(String method.Package org. int channel).

org.red5. Read number of received bytes.service. rawWrite(ByteBuffer) public abstract void rawWrite(org. registerStream(IClientStream) protected void registerStream(org.IClientStream stream). Parameters result Result to register 15. Parameters invokeId call Deferred operation id Call service 15.server.62. Register pending call (remote function call that is yet to finish). IPendingServiceCall) public void registerPendingCall(int invokeId. Registers deferred result.?server.server.mina. registerPendingCall(int.api.apache.ByteBuffer out).api. Parameters out Byte buffer 15. Write raw byte buffer. receivedBytesRead(int) public void receivedBytesRead(int bytes).?net.red5.?red5. 734 . Parameters bytes Number of bytes 15.64.stream.63.IPendingServiceCall call).61.Package org.?rtmp Marks that pingback was received. Parameters pong Ping object 15.common.60. registerDeferredResult(DeferredResult) protected void registerDeferredResult(DeferredResult result).

735 .Package org.?red5.70. Setter for maximum inactivity.?server. setMaxHandshakeTimeout(int) public void setMaxHandshakeTimeout(int maxHandshakeTimeout). Parameters maxInactivity Maximum time in ms after which a client is disconnected in case of inactivity. Retrieve pending call service by id.api. setMaxInactivity(int) public void setMaxInactivity(int maxInactivity).65. 15.service.server.?rtmp Store a stream in the connection. retrievePendingCall(int) protected org. 15. Parameters stream 15. Parameters invokeId return Pending call service id Pending call service object 15. According to FCS/FMS regulation. setPingInterval(int) public void setPingInterval(int pingInterval). Parameters maxHandshakeTimeout Maximum time in milliseconds 15.red5. Specified by: Method reserveStreamId in interface IStreamCapableConnection Return a reserved stream id for use.66.?net.67. The call will be removed afterwards. Set maximum time to wait for valid handshake in milliseconds.IPendingServiceCall retrievePendingCall(int invokeId).IBandwidthConfigure config).server.69. reserveStreamId() public int reserveStreamId(). 15. the base is 1. setBandwidthConfigure(IBandwidthConfigure) public void setBandwidthConfigure(org.api.red5.68.

Parameters schedulingService 15. String.?rtmp Setter for ping interval. setSchedulingService(ISchedulingService) public void setSchedulingService(org. 15.util. 736 . Set to 0 to disable ghost detection code. String path.72.Package org.api. java. startRoundTripMeasurement() public void startRoundTripMeasurement(). String.server.lang.ISchedulingService service).scheduling.server. Map<String. toString() public String toString(). Start waiting for a valid handshake. Object>) public void setup(String host. Parameters pingInterval Interval in ms to ping clients. Parameters host path sessionId params Connection host Connection path Connection session id Params passed from client 15.Map<java.ISchedulingService schedulingService Sets the scheduling service.red5.?server.lang.api.red5.String.74. Starts measurement. setup(String.71.?red5.?net. java.Object> params).75. String sessionId.73.scheduling. 15. Initialize connection. Parameters service The scheduling service to use 15. startWaitForHandshake(ISchedulingService) protected void startWaitForHandshake(org.

write(Packet) public abstract void write(org. unregisterStream(IClientStream) protected void unregisterStream(org. unregisterDeferredResult(DeferredResult) protected void unregisterDeferredResult(DeferredResult result). 15.81.?net.server.rtmp.77. Parameters 737 .IClientStream stream). Unregister deferred result Parameters result Result to unregister 15.Packet message).red5. Mark message as being written. unreserveStreamId(int) public void unreserveStreamId(int streamId). Parameters out Packet 15. Remove a stream from the connection.?rtmp 15.?red5.78. Parameters stream 15. Write packet. 15.?server.net.79. updateBytesRead() protected void updateBytesRead().server.rtmp.76.stream. Specified by: Method unreserveStreamId in interface IStreamCapableConnection Unreserve this id for future use.red5.message.message.red5. Update number of bytes to read next value. writingMessage(Packet) protected void writingMessage(org.api.80.server.Package org.net.Packet out).

message. org.StatusObject getStatus(String code).server.IServer server).server. protected void onInvoke(RTMPConnection conn.net. org. Channel channel.?net.rtmp.server.ChunkSize chunkSize). Synopsis public class RTMPHandler extends.?EdgeRTMPHandler .net. Class RTMPHandler RTMP events handler.Header source. public void setServer(org.net.rtmp. protected void onSharedObject(RTMPConnection conn.event.red5.slf4j.red5.RTMP rtmp). } Direct known subclasses: org. // Public Methods public org.?net.?RTMPTHandler 738 .Notify invoke.server.? red5. org. Channel channel.?red5.red5.rtmp.StatusObjectService statusObjectService . org.event. 16.IServer server .?rtmp.rtmp.message.Header source. protected org. Channel channel.?server.Ping ping). org.red5.server.server.server.1.rtmp. org.api.server.server.status.message.net. Channel channel. org.IServiceCall call).rtmp.red5.?rtmp message Message to mark 16.status.red5.net.?net. protected void onChunkSize(RTMPConnection conn.red5.api.net.so.net.server.?server.?BaseRTMPHandler { // Protected Fields protected static org.server. org.red5.StatusObjectService statusObjec // Protected Methods protected void invokeCall(RTMPConnection conn. org. protected org.rtmp.red5.red5.event.red5.net. org.rtmp.?rtmp.server.?server.red5.server.red5. org.rtmp. protected void onPing(RTMPConnection conn.codec.Package org.?net.?server.server.net.Header source.status.message.rtmp.api.Header source. // Public Constructors public RTMPHandler().net.?rtmpt.SharedObjectMessage object).net.red5.rtmp.?red5.service. public void setStatusObjectService(org.Logger log .red5.server.?red5. org.

server.slf4j.red5. connectionOpened .server.Header source.?net.?server. Channel.server. onPing .IServer server .6.BaseRTMPHandler: connectionClosed . RTMP) protected void onInvoke(RTMPConnection conn.net. Channel channel. Header. Header. onChunkSize . Channel.red5.BaseRTMPHandler: appCtx . getClass .net.net. log protected static org.rtmp. server protected org. org.rtmp. Remoting call invocation handler.red5.IServiceCall call). Notify. wait Fields inherited from org.service.2.server. equals . Logger 16.red5.StatusObjectService statusObjectService . invokeCall(RTMPConnection. finalize . onChunkSize(RTMPConnection. onInvoke(RTMPConnection. messageReceived . statusObjectService protected org. handlePendingCallResult .?red5.message. Status object service.red5.Package org.net.red5.rtmp.4. onSharedObject .7.Object: clone . getStreamId . 16.server. 739 .api. 16.net.rtmp. messageSent . org. org. notifyAll . Channel channel. notify . Parameters conn call RTMP connection Service call 16. onInvoke .3. Red5 server instance. setApplicationContext Methods inherited from java. ChunkSize) protected void onChunkSize(RTMPConnection conn.lang. hashCode .rtmp.?rtmp Methods inherited from org.server. log 16.ChunkSize chunkSize).api.event.5. getHostname .server. toString .red5.status. IServiceCall) protected void invokeCall(RTMPConnection conn.Logger log . onStreamBytesRead . 16.

red5.so.server.1. 17.?rtmp org.rtmp.net.11. Setter for server object. Header.red5.red5.Header source.status.net.?red5. org. org.0. 740 .red5.red5.message.api. org. onSharedObject(RTMPConnection. Header.server. Parameters statusObjectService Status object service.Package org.server. Ping) protected void onPing(RTMPConnection conn. org. Clients that require this send a nonzero value as the fifth byte of the handshake request.0.StatusObjectService statusObjectS Setter for status object service. Channel channel.server.rtmp.rtmp.?net.Header source. Synopsis public class RTMPHandshake { // Public Static Fields public static final byte[] HANDSHAKE_PAD_BYTES . org.net.event. Channel.Notify invoke.server.net.RTMP rtmp).red5. Class RTMPHandshake Generates the second 1536 byte chunk in the RTMP handshake response for compatibility with Flash 9.rtmp.codec.124.net.event.9.net.8. SharedObjectMessage) protected void onSharedObject(RTMPConnection conn. setStatusObjectService(StatusObjectService) public void setStatusObjectService(org. 17. 16. Channel. org. Channel channel.?server.SharedObjectMessage object).server.server.rtmp. Parameters server Red5 server instance 16.Header source.net.red5.message. This class is based on the Ruby handshaking code from Takuma Mori.server. onPing(RTMPConnection. 16.server.IServer server).red5.message.red5.rtmp. 16.rtmp. setServer(IServer) public void setServer(org.Ping ping).10.

IScope newScope. public long getWrittenBytes().apache.?net.apache. notifyAll .apache.util. // Public Methods public void close(). protected java. finalize .ByteBuffer input).?net.mina.?rtmp. org.ByteBuffer input) // Protected Methods protected byte[] getNewKeyPart(org.lang. byte[] key).apache. wait 18. // Public Methods public byte[] calculateHMAC_SHA256(byte[] input. public boolean connect(org. // Public Constructors public RTMPHandshake().?server.common.api.?red5.mina. notify .mina.Logger log .red5.Object: clone . hashCode . org.common. public org.?red5.?rtmp // Protected Fields protected static org.mina.?rtmp. Class RTMPMinaConnection public class RTMPMinaConnection extends.slf4j.apache. public long getReadBytes(). 741 . public long getPendingMessages().?RTMPMinaConnectionMBean { // Protected Fields protected org. toString .ByteBuffer generateResponse(org.?red5. equals . Object[] params). // Public Constructors public RTMPMinaConnection().?server.slf4j.Random random .Logger log .common. public org.server.?RTMPConnection implements. getClass .?server.mina.IoSession getIoSession().?net. } Methods inherited from java. // Public Static Methods public static byte[] getHandshakeBytes(). protected static org.Package org.common.IoSession ioSession .common.

lang.RTMPConnection: addClientStream .message. unregisterDeferredResult .red5. unreserveStreamId . registerStream . hashCode .server.net. getListAttribute . } Direct known subclasses: org. keepAliveJobName . initialize . getPendingMessages . getAttributeNames . writingMessage Methods inherited from org.?net. getStringAttribute .?server. notifyAll . write .?net. isConnected . setAttribute . getLongAttribute . removeClientStream . setMaxHandshakeTimeout . newPlaylistSubscriberStream .server. newBroadcastStream . setState . newSingleItemSubscriberStream . getWrittenMessages .rtmp. invokeId . updateBytesRead . registerDeferredResult . getClient .mina. finalize . invoke . isChannelUsed . deleteStreamById . getPath . removeAttributes .common.?server. encoding . getReadBytes .common. getLastPingTime . onInactive . 742 . getVideoCodecFactory . getIntAttribute . reserveStreamId .apache. getReadMessages . messageReceived . getEncoding . getPendingVideoMessages .?red5. retrievePendingCall . hasAttribute . wait Fields inherited from org. getWrittenBytes . getShortAttribute . deferredResults . getRemoteAddresses .net. getClientBytesRead . getState . getParentBWControllable . registerPendingCall .ByteBuffer out).rtmp. createStreamName . setBandwidthConfigure . getUsedStreamCount . getChannel . getInvokeId . getNextAvailableChannelId . getClass . startWaitForHandshake . public void write(org.BaseConnection: dispatchEvent . pingReceived . setId . getRemoteAddress .server. createOutputStream .net. messageDropped .red5.mina. // Protected Methods protected void onInactive().red5.IoSession protocolSession). getStreams . getSessionId . setSchedulingService .?red5. getPendingCall . registerBasicScope . rawWrite . public void rawWrite(org. equals .server. getHost .apache. rememberStreamBufferDuration .Packet out).red5.rtmp.Object: clone . removeAttribute .AttributeStore: filterNull . public void setIoSession(org. notifyEvent . receivedBytesRead . startRoundTripMeasurement . setPingInterval . toString . getStreamByChannelId . getDoubleAttribute . unregisterStream .?rtmp. public boolean isConnected(). getScope . getId . closeChannel .RTMPConnection: clientId . handleEvent . getStreamById . getDroppedMessages . ping .red5.?rtmp public void invokeMethod(String method). setAttributes Methods inherited from java. getRemotePort . close . messageSent .?EdgeRTMPMinaConnection Methods inherited from org. getMapAttribute . notify . getAttribute . getConnectParams . connect . setup . getBandwidthConfigure . getBasicScopes . lastPingSent . unregisterBasicScope Methods inherited from org. getSetAttribute . getByteAttribute . getType . getAttributes . setMaxInactivity .Package org.server. getBoolAttribute . getStreamIdForChannel .

Specified by: Method close in interface RTMPMinaConnectionMBean 18.IoSession getIoSession().apache. Constructs a new RTMPMinaConnection. scope . state . lastPongReceived .server. sessionId .BaseConnection: basicScopes . Parameters return MINA O/I session.4.3. ioSession protected org.apache. client .?net. oName . params . Specified by: Method getPendingMessages in interface RTMPMinaConnectionMBean 18. connection between two endpoints 18.mina. Return MINA I/O session. host .mina. 18. writtenMessages Fields inherited from org. getReadBytes() public long getReadBytes().6. log protected static org. pendingCalls . remoteAddresses . remoteAddress .red5.Logger log .common. closed . connection between two endpoints 18.AttributeStore: attributes 18. close() public void close(). remotePort .2.red5.?rtmp .?server. path .Package org.slf4j.1. RTMPMinaConnection() public RTMPMinaConnection().?red5. MINA I/O session.7. maxInactivity . log . readMessages . droppedMessages .server. getPendingMessages() public long getPendingMessages().IoSession ioSession . type . streamBuffers lastPingTime Fields inherited from org. 743 . pingInterval .5. getIoSession() public org.common. Logger 18.

util.mina.9.apache.common.ByteBuffer out). Specified by: Method isConnected in interface RTMPMinaConnectionMBean 18. Setter for MINA I/O session (connection).Map<java.server. setIoSession(IoSession) public void setIoSession(org. 18.?server.common.message. getWrittenBytes() public long getWrittenBytes(). public long getDroppedMessages(). public java.11.lang.?red5.net.IoSession protocolSession). 19. Parameters protocolSession Protocol session 18.Object> getConnectParams().?rtmp Specified by: Method getReadBytes in interface RTMPMinaConnectionMBean 18.?net. java.Package org. write(Packet) public void write(org.10.13.rtmp.1. 19.red5. public String getHost(). rawWrite(ByteBuffer) public void rawWrite(org. Adds connection specific functionality like work with clients to AttributeStore.String.8. 744 .apache. Synopsis public interface RTMPMinaConnectionMBean { // Public Methods public void close(). 18. isConnected() public boolean isConnected().mina.lang. Specified by: Method getWrittenBytes in interface RTMPMinaConnectionMBean 18.12. onInactive() protected void onInactive().Packet out). Interface RTMPMinaConnectionMBean Base abstract class for connections.

?IoHandlerAdapter implements.?springframework.String> getRemoteAddresses(). public int getRemotePort(). public long getWrittenMessages(). public boolean isConnected(). org. public String getType().?apache.codec. protected IRTMPHandler handler .apache.util. 20.Logger log . public long getPendingMessages().?context. Class RTMPMinaIoHandler Handles all RTMP protocol events fired by the MINA framework. public long getWrittenBytes().1. org.filter.?red5.ProtocolCodecFactory codecFactory .mina.?mina.lang. public long getReadMessages().?server.Package org. protected org. public long getReadBytes(). } 20.?ApplicationContextAware { // Protected Fields protected org. public void invokeMethod(String method). // Public Constructors 745 .slf4j.springframework.?rtmp public String getPath(). public java. protected boolean mode .?net.context. Synopsis public class RTMPMinaIoHandler extends.List<java. protected IRTMPConnManager rtmpConnManager . public String getSessionId(). public long getPendingVideoMessages(int streamId).ApplicationContext appCtx . public String getRemoteAddress().?common. protected static org.

public void setHandler(IRTMPHandler handler).?rtmp public RTMPMinaIoHandler().apache.?rtmp.springframework.IoHandlerAdapter: exceptionCaught .context.protocol.apache.IoSession session) throws Exception. public void setMode(boolean mode).common. public void setApplicationContext(org.ApplicationContext appCtx) throws BeansException. Throwable cause) throws Exception.common. toString .mina. org.common.IoSession session. public void sessionOpened(org.red5. } Direct known subclasses: org.apache.mina.IoSession session). Object in) throws Exception.lang. hashCode .apache.filter. public void setRtmpConnManager(IRTMPConnManager rtmpConnManager). public void sessionCreated(org. appCtx 746 . finalize .IoSession session) throws Exception.ProtocolState state.common. public void messageReceived(org.IoSession session.apache.ProtocolCodecFactory codecFactory). sessionClosed .apache. // Protected Methods protected RTMPMinaConnection createRTMPMinaConnection(). wait 20.mina.IoSession session) throws Exception.mina.Object: clone .common.mina. messageReceived .?EdgeRTMPMinaIoHandler Methods inherited from org. messageSent . sessionIdle . getClass . sessionCreated .mina. notify .common.apache. notifyAll .mina.?red5.?server. sessionOpened Methods inherited from java. public void sessionClosed(org. Object message) throws Exception.mina. equals . // Public Methods public void exceptionCaught(org.apache.2.common. public void setCodecFactory(org.?server.IoSession session.apache.codec.apache.mina. org.server.Package org.common. protected void rawBufferRecieved(org.?net.net. public void messageSent(org.ByteBuffer in.?net.common.mina.?red5.

6.ApplicationContext appCtx . handler protected IRTMPHandler handler .IoSession session.3.5.red5.IoSession session).4. codecFactory protected org.common.apache.common.mina.?rtmp protected org.Package org. Object in) throws Exception.mina.?red5. RTMP protocol codec factory 20.context. org. 747 .mina. 20. Handle raw buffer receiving event.apache. Mode 20. messageSent(IoSession.?server. Throwable) public void exceptionCaught(org. log protected static org.protocol.?net.apache.mina. RTMP events handler 20. 20.common. mode protected boolean mode .mina. Application context 20. 20. Object) public void messageReceived(org.IoSession session. Logger 20.server.net. rawBufferRecieved(ProtocolState.apache. ByteBuffer.apache.springframework. exceptionCaught(IoSession.apache.ProtocolState state.filter.common.9. messageReceived(IoSession.common.7.ByteBuffer in. Throwable cause) throws Exception.Logger log .ProtocolCodecFactory codecFactory .mina.slf4j.10.codec. IoSession) protected void rawBufferRecieved(org. org. Object message) throws Exception.8. Object) public void messageSent(org.IoSession session.

apache. 748 . sessionOpened(IoSession) public void sessionOpened(org.?red5.14. 20.common. connection between two endpoints 20. that is.apache.IoSession session) throws Exception.13.mina. sessionCreated(IoSession) public void sessionCreated(org.IoSession session) throws Exception.15.16.mina.?server. setApplicationContext(ApplicationContext) public void setApplicationContext(org. setMode(boolean) public void setMode(boolean mode).common. Parameters handler RTMP events handler 20. Parameters codecFactory RTMP protocol codec factory 20. 20.mina.17.springframework.context.?net. setHandler(IRTMPHandler) public void setHandler(IRTMPHandler handler).12.?rtmp Parameters state in session Protocol state Data buffer I/O session.apache.ApplicationContext appCtx) throws BeansException. setCodecFactory(ProtocolCodecFactory) public void setCodecFactory(org.filter.11.ProtocolCodecFactory codecFactory).common.Package org. Setter for handler. sessionClosed(IoSession) public void sessionClosed(org.mina.codec. 20.apache. Setter for codec factory.IoSession session) throws Exception. Specified by: Method setApplicationContext in interface ApplicationContextAware 20.

SocketAcceptor acceptor . protected String address .apache.nio. Note: This code originates from AsyncWeb. . protected boolean useHeapBuffers .IoServiceManager serviceManager . protected int sendBufferSize . protected java.management.mina. protected int eventThreadsKeepalive . protected int port . protected javax.?rtmp.?net. Class RTMPMinaTransport Transport setup class configures socket acceptor and thread pools for RTMP in Mina.apache. // Public Constructors public RTMPMinaTransport().common.socket.?red5.?server.?rtmp Setter for mode. I've modified it for use with Red5.Package org.IoHandlerAdapter ioHandler .apache.util.jmx. protected int ioThreads .transport.?server.mina.?red5. protected org. 749 .mina.concurrent.ObjectName oName . Synopsis public class RTMPMinaTransportimplements. org.ObjectName serviceManagerObjectName . protected int eventThreadsQueue . false otherwise 21. Parameters mode true if handler should work in server mode. protected org.management. protected int eventThreadsCore . protected int eventThreadsMax .integration.?net.ExecutorService eventExecutor . protected boolean tcpNoDelay . protected int receiveBufferSize . protected int jmxPollInterval . protected javax.?RTMPMinaTransportMBean { // Protected Fields protected org.Luke 21.1.

util.?rtmp // Public Methods public int getJmxPollInterval().BlockingQueue<java.lang. public void setEventThreadsQueue(int eventThreadsQueue). public void setIoThreads(int ioThreads). public void setEventThreadsCore(int eventThreadsCore). public void setAddress(String address).2. notifyAll . hashCode . } Methods inherited from java. public void stop().management.Object: clone . public void setSendBufferSize(int sendBufferSize). finalize .?red5. equals .ObjectName oName . public void setReceiveBufferSize(int receiveBufferSize). toString .apache. public void setTcpNoDelay(boolean tcpNoDelay). public void setPort(int port). 22. getClass . MBean object name used for de/registration purposes.common. // Protected Methods protected java. public void start() throws Exception. public void setUseHeapBuffers(boolean useHeapBuffers). notify . public void setEventThreadsMax(int eventThreadsMax). public String toString().IoHandlerAdapter rtmpIOHandler).?net. public void setIoHandler(org. oName protected javax.concurrent. public void setEventThreadsKeepalive(int eventThreadsKeepalive).?server.Package org.lang. Interface RTMPMinaTransportMBean 750 . wait 21. public void setJmxPollInterval(int jmxPollInterval).mina.Runnable> threadQueue(int size).

?net. } 23. The connection is created behind a MRTMP connection so no handshake job or keep-alive job is necessary.common. public void setEventThreadsCore(int eventThreadsCore). public void stop().?RTMPConnection { // Public Constructors public RTMPOriginConnection(String type.apache. public void setEventThreadsMax(int eventThreadsMax).?server. public void setIoThreads(int ioThreads).Package org. public void setUseHeapBuffers(boolean useHeapBuffers). public void setIoHandler(org. public void start() throws Exception. int clientId).mina.?server.?rtmp public interface RTMPMinaTransportMBean { // Public Methods public void setAddress(String address). // Public Methods 751 . public void setPort(int port). public void setReceiveBufferSize(int receiveBufferSize).?red5. Synopsis public class RTMPOriginConnection extends. public void setSendBufferSize(int sendBufferSize).1. public RTMPOriginConnection(String type. org.?net. Class RTMPOriginConnection A pseudo-connection on Origin that represents a client on Edge.?red5. public void setEventThreadsQueue(int eventThreadsQueue).?rtmp. int ioSessionId). 23. No raw byte data write is needed either. public void setTcpNoDelay(boolean tcpNoDelay). int clientId.IoHandlerAdapter rtmpIOHandler). public void setEventThreadsKeepalive(int eventThreadsKeepalive).

ByteBuffer out). removeClientStream .net.red5. getConnectParams . startWaitForHandshake .api. isConnected . close . getId .server. getNextAvailableChannelId . public void write(org. newSingleItemSubscriberStream . connect . messageDropped .scheduling. toString . getReadBytes . public void setMrtmpManager(org. registerStream . reserveStreamId . newBroadcastStream . getInvokeId . getDroppedMessages . getLastPingTime . getPendingMessages . getRemotePort . getUsedStreamCount .Packet packet). getEncoding .mrtmp. public int getIoSessionId().server. setPingInterval . getVideoCodecFactory .RTMPConnection: addClientStream . public void startRoundTripMeasurement().red5. setMaxHandshakeTimeout .server.red5. getScope .mina. getListAttribute . getStreamById . getRemoteAddresses .red5. setState . writingMessage Methods inherited from org. getLongAttribute . createOutputStream .net. getWrittenBytes . unregisterDeferredResult . getAttributes .server. getStreamIdForChannel . public synchronized void realClose(). getAttributeNames . getBasicScopes .red5. messageSent . newPlaylistSubscriberStream .ISchedulingService service). unreserveStreamId . setup . rawWrite . getBoolAttribute . rememberStreamBufferDuration . public void setHandler(org.rtmp. getStreams . registerDeferredResult .mrtmp. unregisterStream . getIntAttribute . messageReceived . receivedBytesRead . getPendingCall . getRemoteAddress . protected void startWaitForHandshake(org.AttributeStore: filterNull . getSessionId . deleteStreamById . setSchedulingService . startRoundTripMeasurement .red5. getReadMessages . public void rawWrite(org.message.server. setBandwidthConfigure .rtmp.net. onInactive . retrievePendingCall .Package org. closeChannel . initialize . getStreamByChannelId . registerBasicScope .?rtmp public synchronized void close(). getType . getByteAttribute . getHost . write .apache.server. createStreamName . } Methods inherited from org.net. getDoubleAttribute . notify .server. // Protected Methods protected void onInactive(). handleEvent . ping . invoke . setMaxInactivity .net. getState .server. isChannelUsed .RTMP getState(). getWrittenMessages .red5. getBandwidthConfigure . getPendingVideoMessages . public org. notifyEvent .rtmp. unregisterBasicScope Methods inherited from org. registerPendingCall . setId .?red5.red5. updateBytesRead . getPath . getClient . pingReceived . getClientBytesRead .?net. getChannel . getParentBWControllable .?server.IMRTMPOriginManager mrtmpManager). 752 .BaseConnection: dispatchEvent .common. getAttribute .OriginMRTMPHandler handler).codec.

net.mina. equals .1.apache. getSetAttribute . setAttributes getMapAttribute Methods inherited from java. closed .RTMPConnection: clientId . readMessages .mina.rtmp.mina. scope . sessionId . removeAttribute .mina. hasAttribute .common. wait Fields inherited from org. hashCode . Synopsis public class RTMPUtilsimplements. host . int byteCount).?server.ByteBuffer in).apache.?message. org.?net. notifyAll . path .?net. getStringAttribute . public static void encodeHeaderByte(org.?rtmp . finalize . int channelId). public static int readUnsignedMediumIntOld(org. public static int readReverseIntOld(org.?rtmp.common. keepAliveJobName .ByteBuffer in). lastPingSent . public static int getHeaderLength(byte headerSize). params .AttributeStore: attributes 24. lastPongReceived . remotePort . client . oName . deferredResults .common.BaseConnection: basicScopes .Package org. remoteAddresses .?red5. public static int readMediumInt(org. pingInterval .common. public static byte decodeHeaderSize(int header.common. state . writtenMessages Fields inherited from org.?server. // Public Static Methods public static int decodeChannelId(int header. public static int readReverseInt(org.mina.ByteBuffer in). lastPingTime .ByteBuffer in). int byteCount). removeAttributes .Object: clone . type .red5. remoteAddress .server.server.red5.apache.apache. pendingCalls .ByteBuffer in).?red5. getShortAttribute .red5. log . streamBuffers Fields inherited from org. public static int readUnsignedMediumInt(org.lang.common. setAttribute . maxInactivity .?Constants { // Public Constructors public RTMPUtils(). encoding .server.mina. invokeId . Class RTMPUtils RTMP utilities class. byte headerSize. getClass . public static int readMediumIntOld(org. droppedMessages . 753 .ByteBuffer in).apache.apache.mina.common.apache. 24.ByteBuffer out.

common.mina. Decode channel id. int value).?red5. decodeHeaderSize(int.apache. decodeChannelId(int.apache.Object: clone .ByteBuffer out.common.ByteBuffer out. wait 24.ByteBuffer out.?server.?net.lang.common. Parameters header return Header byte Header size byte 24.4. int channelId). getClass .3. byte. public static void writeReverseIntOld(org. int byteCount). int) public static byte decodeHeaderSize(int header. finalize . Decode header size.mina. notify . toString . hashCode . Parameters headerSize channelId return Header size marker Channel used Header id 754 . notifyAll .?rtmp public static void writeMediumInt(org. Encodes header size marker and channel id into header marker.common.Package org. int byteCount).mina.2. int) public static int decodeChannelId(int header. equals . int) public static void encodeHeaderByte(org.ByteBuffer out. int value).apache.mina. encodeHeaderByte(ByteBuffer.apache. Parameters header return Header Channel id 24. } Methods inherited from java. int value). byte headerSize. public static void writeReverseInt(org.

common.?rtmp 24. readMediumInt(ByteBuffer) public static int readMediumInt(org.5. readReverseIntOld(ByteBuffer) public static int readReverseIntOld(org.common.ByteBuffer in).ByteBuffer in).mina. Parameters in return Input buffer Integer 24.?red5.Package org.apache. readReverseInt(ByteBuffer) public static int readReverseInt(org.common. Parameters in return 24. Return header length from marker value.mina. Parameters headerSize return Header size marker value Header length 24.6. Parameters in return Input buffer Integer 755 . readMediumIntOld(ByteBuffer) public static int readMediumIntOld(org.apache.9.?net.7.8.common.ByteBuffer in). Read integer in reversed order.apache.apache.?server. Read integer in reversed order.mina.ByteBuffer in). getHeaderLength(byte) public static int getHeaderLength(byte headerSize).mina. Parameters in return 24.

ByteBuffer out.10.apache.apache. int value).mina.common.common. int value).11. Writes reversed integer to buffer.ByteBuffer in). writeReverseIntOld(ByteBuffer.13.ByteBuffer in).12.?red5.?net.common.common. writeMediumInt(ByteBuffer. Parameters in return 24.mina. readUnsignedMediumInt(ByteBuffer) public static int readUnsignedMediumInt(org. Parameters out value Buffer Integer to write 24. int) public static void writeMediumInt(org.apache. int) public static void writeReverseInt(org.mina. Parameters out value 24. Parameters in return 24.?rtmp 24. Writes reversed integer to buffer.ByteBuffer out. Parameters out Buffer 756 . readUnsignedMediumIntOld(ByteBuffer) public static int readUnsignedMediumIntOld(org.ByteBuffer out.mina.mina.14.Package org.?server.common.apache. int) public static void writeReverseIntOld(org. int value). writeReverseInt(ByteBuffer.apache.

?rtmp value Integer to write 757 .?server.Package org.?net.?red5.

2.red5. public org.server.rtmp. public org.apache.server.server.apache.event.1.red5.server. public org.apache.ByteBuffer in Decodes audio data event.rtmp.mina.event.red5.1.common.server.AudioData decodeAudioData(org.BytesRead decodeBytesRead(org.3.event.ByteB RTMP rtmp).FlexMessage decodeFlexMessage(org.mina.rtmp.server.net.server.net.Notify decodeNotify(org. RTMP rtmp).common.apache.apache.mina.apache.red5.server.mina.red5.Unknown decodeUnknown(byte dataType.net.event.ByteBuffer public org.apache.ByteBuffer } 1.event.ByteBuffer in).event. 1.net.ByteBuffe RTMP rtmp).apache.mina.ByteBuffer in). RTMP rtmp).common.net.red5.ByteBuffer public org.mina.rtmp.mina.net. decodeBytesRead(ByteBuffer) public org.ISharedObjectMessage decodeSharedObject(org.so.ISharedObjectMessage decodeFlexSharedObject(org. public org.common. public org.AudioData decodeAudioData(org.red5.common.mina.mina.common.rtmp.red5.event.event.rtmp.server.ByteBuffer public org.ByteBuffer in 758 .red5.red5.mina.server.server.rtmp.net.ChunkSize decodeChunkSize(org. public org.BytesRead decodeBytesRead(org.common.ByteBuffer in. decodeAudioData(ByteBuffer) public org.Invoke decodeInvoke(org.common.rtmp. Interface IEventDecoder Event decoder decodes event objects from incoming byte buffer.so. Parameters in return Byte buffer to decode AudioData event 1.red5.event.rtmp.mina.red5.common.rtmp.apache. public org.server.apache.server.net.event.ByteBuffer in.common.common.ByteBuf RTMP rtmp).mina. org.net.apache.red5.common.Ping decodePing(org.event.net.mina.common.apache.net.rtmp.VideoData decodeVideoData(org.apache. Synopsis public interface IEventDecoder { // Public Methods public org.

server.event. decodeFlexMessage(ByteBuffer.ByteBuf RTMP rtmp). Parameters in rtmp return Byte buffer to decode RTMP protocol state FlexMessage event 1.?codec Decodes BytesRead event.apache. RTMP rtmp). RTMP) public org.red5. RTMP) public org.net.common.5. Decodes invocation event.apache.Package org. RTMP) public org. decodeFlexSharedObject(ByteBuffer.FlexMessage decodeFlexMessage(org.mina.6.rtmp.server.rtmp.red5.ByteBuffer in. Parameters in return Byte buffer to decode ChunkSize event 1. decodeChunkSize(ByteBuffer) public org.mina.event.?server.rtmp.4.?net. Decodes shared object message event from AMF3 encoding.?rtmp.red5.mina. decodeInvoke(ByteBuffer.net. 759 .ISharedObjectMessage decodeFlexSharedObject(org.red5.?red5.common. Decodes Flex message event. Parameters in return Byte buffer to decode BytesRead event 1.ByteBuffe RTMP rtmp).ByteBuffer in Decodes chunk size event.apache.server.apache.ChunkSize decodeChunkSize(org.Invoke decodeInvoke(org.so.net.common.common.server. Parameters in rtmp return Byte buffer to decode RTMP protocol state ISharedObjectMessage event 1.mina.event.7.

red5.?red5.mina.ISharedObjectMessage decodeSharedObject(org. ByteBuffer) public org. RTMP) public org.server.8. Decodes notification event.apache.?net.rtmp.?codec Parameters in rtmp return Byte buffer to decode RTMP protocol state Invoke event 1. Decodes shared object message event. decodeNotify(ByteBuffer.common.server.net.common. Decodes ping event.11. decodeUnknown(byte.ByteBuffer in).apache. Parameters in rtmp return Byte buffer to decode RTMP protocol state Notify event 1. RTMP) public org.red5.Package org.rtmp. org.ByteBuffer in).apache. decodePing(ByteBuffer) public org.so.red5. Decodes event of Unknown type.Unknown decodeUnknown(byte dataType. decodeSharedObject(ByteBuffer.net.red5.Ping decodePing(org.ByteBuffer RTMP rtmp). 760 . Parameters in return Byte buffer to decode Ping event 1.10.?rtmp. RTMP rtmp).server.?server.apache.9.common.Notify decodeNotify(org. Parameters in rtmp return Byte buffer to decode RTMP protocol state ISharedObjectMessage event 1.server.common.event.mina.event.ByteBuffer in.event.mina.rtmp.mina.net.

common.apache.net.ByteBuffer encodeNotify(org.BytesRead public org.common.event.net.server.rtmp.ByteBuffer encodeBytesRead(org. Parameters in return Byte buffer to decode VideoData event 2.VideoData } 761 .event.common.event.red5.ByteBuffer encodeAudioData(org.common.mina.so. 2.net.common.Invoke invoke RTMP rtmp).mina.ChunkSize public org.apache.event.apache. public org.apache.red5.mina.ISharedObjectMe RTMP rtmp).net.mina.apache.red5.rtmp.red5.rtmp.server.event.net.server. decodeVideoData(ByteBuffer) public org. public org.mina.mina.red5.event.rtmp. public org.rtmp.mina.rtmp.red5.common.12.Ping ping).apache.red5.apache.rtmp.common.server.VideoData decodeVideoData(org.ByteBuffer encodeUnknown(org.ISharedObjectMessag RTMP rtmp).mina.AudioData public org.event.1. public org.apache.server.ByteBuffer encodePing(org.server.ByteBuffer encodeFlexSharedObject(org.Notify notify RTMP rtmp). public org.ByteBuffer encodeVideoData(org.?net.server.ByteBuffer encodeInvoke(org.rtmp.mina.ByteBuffer encodeSharedObject(org.server.common.net. Interface IEventEncoder Encodes events to byte buffer.?red5.event.event. Synopsis public interface IEventEncoder { // Public Methods public org.common.red5.red5.?rtmp.common.ByteBuffer encodeChunkSize(org.server.so.server.apache.mina.ByteBuffer in Decodes video data event.net.mina.?server.red5.common.Package org.rtmp.?codec Parameters dataType in return Data type Byte buffer to decode Unknown event 1.Unknown unkn public org.server.apache.red5.net.net.apache.

RTMP rtmp).red5.event.rtmp.server. Parameters streamBytesRead return BytesRead event Byte buffer 2.2.?red5. encodeAudioData(AudioData) public org.mina.common.mina. Parameters audioData return AudioData event Byte buffer 2.5.rtmp. RTMP) public org. encodeChunkSize(ChunkSize) public org.net.apache.4.server. Parameters chunkSize return ChunkSize event Byte buffer 2. Parameters so rtmp return ISharedObjectMessage event RTMP protocol state Byte buffer 2. RTMP) public org.Invoke invoke.server.?rtmp.net.ChunkSize ch Encodes ChunkSize event to byte buffer.6.ByteBuffer encodeFlexSharedObject(org.apache.ByteBuffer encodeBytesRead(org.rtmp.rtmp.apache.?server.ByteBuffer encodeAudioData(org.ByteBuffer encodeChunkSize(org.net.event.common. Encodes SharedObjectMessage event to byte buffer using AMF3 encoding.server.apache.so.ByteBuffer encodeInvoke(org.apache.event.ISharedObjectMess RTMP rtmp).net.3.red5. encodeInvoke(Invoke.red5.mina. encodeBytesRead(BytesRead) public org.red5.AudioData au Encodes AudioData event to byte buffer.event.mina.BytesRead st Encodes BytesRead event to byte buffer. 762 .red5.Package org.server.?net.common.common.common.?codec 2. encodeFlexSharedObject(ISharedObjectMessage.mina.

ISharedObjectMessage RTMP rtmp).?codec Encodes Invoke event to byte buffer.server. Encodes SharedObjectMessage event to byte buffer. RTMP) public org.?red5.mina.rtmp.mina.10.apache.common.8. Encodes Notify event to byte buffer.event.red5.Package org.net.event.ByteBuffer encodeNotify(org. Parameters notify rtmp return Notify event RTMP protocol state Byte buffer 2.mina.Unknown unknow Encodes Unknown event to byte buffer. Encodes Ping event to byte buffer. RTMP) public org.Notify notify.red5. Parameters invoke rtmp return Invoke event RTMP protocol state Byte buffer 2. encodeNotify(Notify.7. 763 . encodeSharedObject(ISharedObjectMessage.net. encodeUnknown(Unknown) public org. Parameters ping return Ping event Byte buffer 2.server.apache.ByteBuffer encodePing(org.server. encodePing(Ping) public org.red5.rtmp.mina.common.ByteBuffer encodeUnknown(org.event.net.so.apache. RTMP rtmp).common.apache.?net.9. Parameters so rtmp return ISharedObjectMessage event RTMP protocol state Byte buffer 2.rtmp.server.ByteBuffer encodeSharedObject(org.?rtmp.Ping ping).?server.common.red5.

notifyAll . 3. encodeVideoData(VideoData) public org. getClass .apache.?net.apache.rtmp.apache.Package org.common. int size).?red5.lang.event.mina.common. Breaks buffer into chunks of given size.ByteBuffer bu int size).ByteBuffer[] chunkBuffer(org.ByteBuffer buf. Parameters videoData return VideoData event Byte buffer 3.11.red5.1.server. toString .Object: clone .common. // Public Methods public void disposeCached(Object obj).mina. } Methods inherited from java. finalize . chunkBuffer(ByteBuffer.apache.VideoData vi Encodes VideoData event to byte buffer.mina. Parameters 764 . Synopsis public class MulticastEventProcessor { // Public Constructors public MulticastEventProcessor().?server. notify .common.2.?rtmp.mina. public byte getCacheId().apache.?codec Parameters unknown return Unknown event Byte buffer 2.ByteBuffer[] chunkBuffer(org. // Public Static Methods public static org.net.common.mina. hashCode . Class MulticastEventProcessor Processes multicast events. equals . int) public static org.ByteBuffer encodeVideoData(org. wait 3.

Synopsis public class RTMP extends.?rtmp. org.?server. Class RTMP RTMP is the RTMP protocol state representation.?protocol. public static final byte STATE_EDGE_CONNECT_ORIGIN_SENT = 17.?red5.?net. Getter for cache ID.4. Parameters obj Cached object 3.3. disposeCached(Object) public void disposeCached(Object obj). public static final byte STATE_DISCONNECTED = 4.?codec buf size return Byte buffer Chunk size Array of byte buffers. public static final byte STATE_EDGE_DISCONNECTING = 19. getCacheId() public byte getCacheId().?red5.Package org. public static final byte STATE_ERROR = 3. public static final byte STATE_CONNECT = 0. public static final byte STATE_HANDSHAKE = 1. public static final boolean MODE_CLIENT = true.?net. chunks 3. public static final boolean MODE_SERVER = false. 4.?server.1. Disposes cached object. Parameters return Cache ID 4. public static final byte STATE_CONNECTED = 2. 765 .?ProtocolState { // Public Static Fields public static final int DEFAULT_CHUNK_SIZE = 128.

public void setLastReadHeader(int channelId.net.red5.net. public int getReadChunkSize(). public void setLastReadPacket(int channelId.message. // Public Methods public org.message.server. public int getWriteChunkSize().rtmp.rtmp. org.ByteBuffer data.server.rtmp.mina.common. public byte getState().?codec public static final byte STATE_ORIGIN_CONNECT_FORWARDED = 18.net.red5.Packet getLastWritePacket(int channelId).red5. public void setWriteChunkSize(int writeChunkSize).Header getLastWriteHeader(int channelId).red5.message. public org. int start.net.red5. public org. org.server. public void setLastWriteHeader(int channelId. public boolean isDebug(). public void setHandshake(org.Packet getLastReadPacket(int channelId). public boolean getMode().rtmp.api.net.server.server.Packet packet).server.Header header).red5.apache.message.message. 766 .message.red5. public void setState(byte state). public void setLastWritePacket(int channelId.net.Package org.rtmp.red5.Encoding encoding).net.server.server.?rtmp. public org.Header header). public int getLastWriteChannel().IConnection.red5.message.server. public void setEncoding(org. public int getLastReadChannel(). // Public Constructors public RTMP(boolean mode).net.server.rtmp.Encoding getEncoding(). public org.Header getLastReadHeader(int channelId).api.?server.?red5.message.red5. org. org.Packet packet).?net. public void setReadChunkSize(int readChunkSize).rtmp.rtmp. public void setDebug(boolean debug). int length).IConnection.

SESSION_KEY 4. Creates RTMP object with initial mode.?red5. continueDecoding . MODE_SERVER public static final boolean MODE_SERVER = false. DECODER_OK . RTMP(boolean) public RTMP(boolean mode). hashCode . 4. STATE_CONNECTED 767 .net.Package org.4.lang.Object: clone . Server mode.net. toString .server. wait Fields inherited from org. getDecoderBufferAmount . STATE_CONNECT public static final byte STATE_CONNECT = 0. Packets are read and written chunk-by-chunk.apache. Client mode. equals . int length). } Methods inherited from org. Default chunk size. hasDecodedObject .?net.red5. 4.protocol.red5.2. DECODER_CONTINUE . int start.7. getClass . DEFAULT_CHUNK_SIZE public static final int DEFAULT_CHUNK_SIZE = 128.ProtocolState: DECODER_BUFFER .ByteBuffer data.?rtmp.mina. Connect state.protocol. notifyAll . canStartDecoding . MODE_CLIENT public static final boolean MODE_CLIENT = true. 4.common.ProtocolState: bufferDecoding .?codec public boolean validateHandshakeReply(org.5.?server.server. notify . canContinueDecoding . finalize . 4. Parameters mode Initial mode 4.6.3. startDecoding Methods inherited from java.

Edge is disconnecting. STATE_DISCONNECTED public static final byte STATE_DISCONNECTED = 4.12. 4.server.8.?rtmp. Sent the connect message to origin.?red5. waiting Origin close connection.?codec public static final byte STATE_CONNECTED = 2. Forwarded client's connect call to origin.red5.?server.15.9. Error. Connected. STATE_EDGE_DISCONNECTING public static final byte STATE_EDGE_DISCONNECTING = 19. Handshake state.api. Getter for encoding version.13. STATE_ORIGIN_CONNECT_FORWARDED public static final byte STATE_ORIGIN_CONNECT_FORWARDED = 18. STATE_HANDSHAKE public static final byte STATE_HANDSHAKE = 1.?net. STATE_ERROR public static final byte STATE_ERROR = 3. Parameters return Encoding version 4. 4.Encoding getEncoding(). Disconnected. getLastReadChannel() public int getLastReadChannel(). 4. 4.IConnection. getEncoding() public org. 4.14. 4.Package org. STATE_EDGE_CONNECT_ORIGIN_SENT public static final byte STATE_EDGE_CONNECT_ORIGIN_SENT = 17.10. 4. Server sends handshake request to client right after connection estabilished.11. 768 .

message.message. getLastWriteHeader(int) public org.Header getLastReadHeader(int channelId).rtmp.net.?net.red5. 769 .20.message.server.16.?rtmp.net.server. Parameters return Last read channel 4.red5.red5.Packet getLastReadPacket(int channelId). Return last read header for channel.rtmp.rtmp.message.net.Header getLastWriteHeader(int channelId). Parameters channelId return Channel id Last read packet for that channel 4. getLastWriteChannel() public int getLastWriteChannel(). getLastReadPacket(int) public org. getLastReadHeader(int) public org.18.net.server.19.17.?codec Return channel being read last.?red5.rtmp. getLastWritePacket(int) public org.Package org.server.?server. Parameters channelId return Channel id Last read header 4.Packet getLastWritePacket(int channelId). Getter for channel being written last. Parameters return Last write channel 4. Return last read packet for channel. Parameters channelId return Channel id Last written header 4. Return last written header for channel.red5.

?red5.?rtmp. Parameters return Current mode 4. Data is being read chunk-by-chunk. getState() public byte getState(). Parameters return Read chunk size 4. Getter for write chunk size.23. Parameters return State 4. getMode() public boolean getMode(). Getter for write chunk size.Package org. Parameters channelId return Channel id Packet that has been written last 4. 770 . Getter for debug. isDebug() public boolean isDebug(). Return current mode. Parameters return Write chunk size 4.?server.22. getWriteChunkSize() public int getWriteChunkSize().24.25. getReadChunkSize() public int getReadChunkSize().?codec Return packet that has been written last. Return current state. Data is being written chunk-by-chunk.21.?net.

27. setLastReadPacket(int.ByteBuffer data.?codec Parameters return Debug state 4. int start.red5.red5.26.Package org. org. setLastReadHeader(int. Setter for encoding version.28.message.?rtmp. Header) public void setLastReadHeader(int channelId.Encoding) public void setEncoding(org. Packet) public void setLastReadPacket(int channelId.Header header).server. Parameters debug Debug flag new value 4.?red5.30.Encoding encoding).mina. int length). setDebug(boolean) public void setDebug(boolean debug).api. Setter for last read header.server.29. setEncoding(IConnection. Parameters encoding Encoding version 4. setHandshake(ByteBuffer.IConnection. Store the handshake sent to the client. Parameters channelId header Channel id Header 4. Parameters data length Handshake data Length of handshake to store 4.?server. int.?net.common. int) public void setHandshake(org.net.apache.rtmp. Setter for debug. 771 .

Parameters readChunkSize Value to set for property 'readChunkSize'.net. Setter for last written packet.?codec org. Parameters state New state 772 . Parameters channelId packet Channel id Packet 4.Packet packet).red5. 4.34. Parameters channelId header Channel id Header 4.message.server. setLastWritePacket(int.net. Setter for last written header.Packet packet). setReadChunkSize(int) public void setReadChunkSize(int readChunkSize). org.?rtmp. setLastWriteHeader(int.?red5. Header) public void setLastWriteHeader(int channelId.server. Parameters channelId packet Channel id Last written packet 4.32.red5.?server.Header header).message.rtmp.Package org.message.rtmp. Packet) public void setLastWritePacket(int channelId. Setter for state.31.net. org.server. setState(byte) public void setState(byte state).red5.rtmp.33. Setter for read chunk size. Data is being read chunk-by-chunk.?net. Setter for last read packet.

server.mina.?rtmp. setWriteChunkSize(int) public void setWriteChunkSize(int writeChunkSize).codec. // Protected Fields protected RTMPMinaProtocolDecoder decoder . Parameters writeChunkSize Write chunk size 4.SimpleProtocolEncoder getSimpleEncoder(). Setter for write chunk size.object.filter.Package org.Serializer serializer .ProtocolDecoder getDecoder(). // Public Methods public org.protocol.36. public org.red5. Synopsis public class RTMPCodecFactoryimplements.red5.?codec 4. int.mina. public org.object.?ProtocolCodecFactory. protected org.server.io.?mina.net.35. protected org.filter.1. Parameters data length return 5.?apache.ProtocolEncoder getEncoder().?red5. int length).SimpleProtocolDecoder getSimpleDecoder(). org.?filter.common.red5. // Public Constructors public RTMPCodecFactory(). 5. int start.protocol.apache. Check if the handshake reply received from a client contains valid data.red5.ByteBuffer data. validateHandshakeReply(ByteBuffer. Class RTMPCodecFactory RTMP codec factory creates RTMP encoders/decoders.Deserializer deserializer .?net.codec.apache.net.?server.?codec.apache.io. 773 . org. protected RTMPMinaProtocolEncoder encoder . int) public boolean validateHandshakeReply(org. public org.mina.

ProtocolDecoder getDecoder(). encoder protected RTMPMinaProtocolEncoder encoder . getEncoder() public org.io.protocol.lang.Deserializer deserializer).filter.Package org.apache.object.codec.?red5. 5. serializer protected org. 5. notifyAll .Serializer serializer . Specified by: Method getSimpleDecoder in interface SimpleProtocolCodecFactory 774 . wait 5. 5. 5.codec. public void setDeserializer(org. getClass . Mina protocol decoder for RTMP. getDecoder() public org.?codec public void init().Serializer serializer).?server. Mina protocol encoder for RTMP.?net.Deserializer deserializer .SimpleProtocolDecoder getSimpleDecoder(). public void setSerializer(org.mina. equals .filter.red5.5.net.mina. decoder protected RTMPMinaProtocolDecoder decoder .ProtocolEncoder getEncoder().red5.red5. getSimpleDecoder() public org. } Methods inherited from java. finalize .7.apache. deserializer protected org.2. Deserializer.4.server.Object: clone . hashCode .6.io.red5.object.3.io.8.red5. Specified by: Method getDecoder in interface ProtocolCodecFactory 5. toString . notify .object. Specified by: Method getEncoder in interface ProtocolCodecFactory 5.object.?rtmp. Serializer.io.

mina. 5.object.9. setDeserializer(Deserializer) public void setDeserializer(org.codec.?apache.net. Synopsis public class RTMPMinaCodecFactoryimplements.?codec. Class RTMPMinaCodecFactory RTMP codec factory. protected RTMPMinaProtocolEncoder encoder .Serializer serializer).11. Parameters deserializer Deserializer 5. Specified by: Method getSimpleEncoder in interface SimpleProtocolCodecFactory Getter for simple encoder.?rtmp.SimpleProtocolEncoder getSimpleEncoder().ProtocolDecoder getDecoder().red5.io. Setter for deserializer. Setter for serializer.filter.?ProtocolCodecFactory.red5. setSerializer(Serializer) public void setSerializer(org.server.Package org.10. // Public Constructors public RTMPMinaCodecFactory().red5.?codec Getter for simple decoder. // Public Methods public org.Deserializer deserializer). Initialization 5. // Protected Fields protected RTMPMinaProtocolDecoder decoder .1.?filter. getSimpleEncoder() public org.?red5.protocol.io.?server.?net. Parameters serializer Serializer 6.object. 5. org. init() public void init().apache.12. 775 . 6.?mina.

codec. } Methods inherited from java.SimpleProtocolEncoder getSimpleEncoder().server.6.protocol.?server.4. Specified by: Method getDecoder in interface ProtocolCodecFactory 6. Specified by: Method getEncoder in interface ProtocolCodecFactory 6.lang.filter. public RTMPMinaProtocolDecoder getMinaDecoder(). public void setMinaDecoder(RTMPMinaProtocolDecoder decoder).ProtocolEncoder getEncoder(). getMinaEncoder() public RTMPMinaProtocolEncoder getMinaEncoder(). equals . public org.apache.filter.protocol. public org.?net.?red5.ProtocolDecoder getDecoder().net.3.7.codec. 6. notifyAll . public void setMinaEncoder(RTMPMinaProtocolEncoder encoder).codec. toString .red5.mina.apache. getMinaDecoder() public RTMPMinaProtocolDecoder getMinaDecoder(). getDecoder() public org. RTMP Mina protocol decoder.?rtmp. RTMP Mina protocol encoder.mina. hashCode .mina. 6.?codec public org. getClass .net. public void init(). notify .red5. 6.ProtocolEncoder getEncoder(). encoder protected RTMPMinaProtocolEncoder encoder . wait 6. decoder protected RTMPMinaProtocolDecoder decoder .filter.Object: clone . 776 .Package org.5. getEncoder() public org.SimpleProtocolDecoder getSimpleDecoder(). finalize .2.server.apache. public RTMPMinaProtocolEncoder getMinaEncoder().

?mina. Specified by: Method getSimpleDecoder in interface SimpleProtocolCodecFactory Getter for simple decoder.?net.?red5. Specified by: Method getSimpleEncoder in interface SimpleProtocolCodecFactory Getter for simple encoder.?codec. getSimpleDecoder() public org. setMinaDecoder(RTMPMinaProtocolDecoder) public void setMinaDecoder(RTMPMinaProtocolDecoder decoder). org.net.SimpleProtocolDecoder getSimpleDecoder().red5.?net.server. Parameters encoder Encoder 7. 7.9.1.11. org.8. 6. Initialization. Synopsis public class RTMPMinaProtocolDecoder extends. init() public void init().?RTMPProtocolDecode implements. 777 .Package org. 6. setMinaEncoder(RTMPMinaProtocolEncoder) public void setMinaEncoder(RTMPMinaProtocolEncoder encoder).?filter. 6.?rtmp. Setter for decoder Parameters decoder Decoder 6.protocol.?server. getSimpleEncoder() public org. Create and setup of encoder/decoder and serializer/deserializer is handled by Spring.?rtmp.red5.?codec.?ProtocolDecoder { // Public Constructors public RTMPMinaProtocolDecoder().protocol. Setter for encoder.?red5.?codec 6.net. Class RTMPMinaProtocolDecoder RTMP protocol decoder.10.12.SimpleProtocolEncoder getSimpleEncoder().?apache.server.?server.

rtmp.apache.apache.IoSession session.apache. } Methods inherited from org.ByteBuffer in. decode(IoSession.common.filter. log 7.common. decodeChunkSize . toString .common. decodeFlexSharedObject .ByteBuffer in.codec. decodeUnknown .mina. ProtocolDecoderOutput) public void finishDecode(org.apache.mina. decodeStreamMetadata .IoSession session.mina.ProtocolDecoderOutput out) throws ProtocolCodecException. org.IoSession session. decodeNotifyOrInvoke .mina. decodeVideoData .filter.server. ProtocolDecoderOutput) public void decode(org.common.codec. decodeBytesRead .apache. decodeFlexStreamSend .apache. doDecodeSharedObject . decodeNotify . equals .server.3. notifyAll .mina. org.common.RTMPProtocolDecoder: decode .?red5.filter.mina.IoSession ioSession) throws Exception.red5.mina. Specified by: Method decode in interface ProtocolDecoder 7. org. decodeInvoke .codec. wait Fields inherited from org.common.?rtmp. org. decodeHeader . setDeserializer .RTMPProtocolDecoder: ioLog . decodePacket .ProtocolDecoderOutput out) throws ProtocolCodecException. Specified by: Method dispose in interface ProtocolDecoder 7.mina.mina.ProtocolDecoderOutput out) throws Exception. decodeAudioData .lang.codec. getClass .apache.net.filter. org. ByteBuffer.mina. decodeHandshake .common. dispose(IoSession) public void dispose(org. decodeFlexMessage . hashCode .net.IoSession session.red5. Class RTMPMinaProtocolEncoder 778 .mina. decodePing .Package org.apache.ProtocolDecoderOutput out) throws Exception. decodeMessage . decodeBuffer .rtmp. org.?server.4. Specified by: Method finishDecode in interface ProtocolDecoder 8. public void dispose(org. notify .Object: clone . setupClassLoader Methods inherited from java.codec.codec. public void finishDecode(org.apache.common.2.apache. decodeSharedObject . finishDecode(IoSession.apache.?codec // Public Methods public void decode(org.IoSession ioSession) throws Exception. finalize .mina.?net.apache.

log 8.Package org. encodeFlexSharedObject . encodeNotifyOrInvoke .mina. encodePing .filter.IoSession session.net. encodeSharedObject . dispose(IoSession) public void dispose(org. } Methods inherited from org. Object message.?server.IoSession session.server.ProtocolEncoderOutput out) throws ProtocolCodecException.1. encodeBytesRead . public void encode(org.apache.common.red5. Object.codec.2.mina. ProtocolEncoderOutput) public void encode(org. encode . finalize . notify . encodeFlexMessage . org.apache.?net. encode(IoSession. encodeAudioData . Class RTMPProtocolDecoder 779 . encodeFlexStreamSend . notifyAll .filter. Specified by: Method encode in interface ProtocolEncoder 9.codec. org.?apache. encodeChunkSize .lang. encodeVideoData .?red5.rtmp.codec.?codec.IoSession ioSession) throws Exception.server.protocol. Object message. encodeMessage .IoSession ioSession) throws Exception.rtmp.red5.3.apache.apache.net. // Public Methods public void dispose(org. encodeInvoke .?rtmp.?ProtocolEncoder { // Public Constructors public RTMPMinaProtocolEncoder().net. setSerializer Methods inherited from org.red5. org.common. encodeHeader .?RTMPProtocolEncode implements.BaseProtocolEncoder: generateErrorResult Methods inherited from java.apache.codec.ProtocolEncoderOutput out) throws ProtocolCodecException.apache.?mina.?rtmp.?codec. equals .mina. encodePacket .mina.?server.?codec Mina protocol encoder for RTMP. 8.?net. encodeUnknown .server. toString .mina.Object: clone .RTMPProtocolEncoder: doEncodeSharedObject .common. getClass .RTMPProtocolEncoder: ioLog . Synopsis public class RTMPMinaProtocolEncoder extends. encodeStreamMetadata . hashCode . wait Fields inherited from org. org.mina. Specified by: Method dispose in interface ProtocolEncoder 8.common.?red5. encodeNotify .?filter.

mina.Heade public org.net.mina.net.rtmp.net.red5.red5.net.mina.event.red5.server.red5.rtmp.net.common.?net.mina. public org.ByteBuffer decodeHandshake(RTMP rtmp.slf4j.net.server.mina.apache.server.common.Logger ioLog .ByteBuffer public java.mina.event.?Constants.ProtocolState state.apache.common.net.FlexStreamSend decodeFlexStreamSend(org.server.rtmp.ByteBuf RTMP rtmp).red5.red5.net.apache.ByteBuffer in. // Public Methods public Object decode(org. public org.mina.server.server.net.?red5.mina.ProtocolState state.apache.protocol.rtmp.event.Logger log .red5.common.ByteBuffer buffer).mina.server.ByteBuffer in.red5.Invoke decodeInvoke(org. public org.?message.message.apache. // Public Constructors public RTMPProtocolDecoder().ChunkSize decodeChunkSize(org.slf4j.ByteBuffer public org.net.server.IRTMPEvent decodeMessage(RTMP rtmp. Synopsis public class RTMPProtocolDecoderimplements.rtmp.?net.B public org. org.mina.?red5. public org.protocol.common.red5.common.red5.red5.rtmp. org.BytesRead decodeBytesRead(org.Package org.so.common. 9.apache. public org.common.?server.message.event.ByteBuffer public org.rtmp.event.rtmp.apache.red5.List decodeBuffer(org. org.apache. RTMP rtmp).red5. 780 .common.ByteB RTMP rtmp).?codec RTMP protocol decoder.net.net.server.event.apache.ByteBuffer in).apache.?re // Protected Fields protected static org.FlexMessage decodeFlexMessage(org. public org.server. org.AudioData decodeAudioData(org.?server. org.apache.ByteBuffer in.Header RTMP rtmp).event.apache.rtmp.mina.rtmp.server.common.Packet decodePacket(RTMP rtmp.message.?rtmp.net.rtmp.server. org. org.mina.net.event.Notify decodeNotify(org.rtmp.red5.util.event.common.common.red5. org.red5.ByteBuffer in.ByteBuffer i public org.He org.apache.common.?rtmp.red5.net.apache.mina.ByteBuffer in) throws ProtocolException.net. public org.server. RTMP rtmp).mina.server. public org.apache.ISharedObjectMessage decodeFlexSharedObject(org. protected static org.Notify decodeNotify(org.common.rtmp.server.message.server.server.Header decodeHeader(org.1.common.mina.rtmp.message.

notifyAll .red5.Logger ioLog .mess RTMP rtmp).slf4j.Package org.common.?net. Logger.slf4j.Unknown decodeUnknown(byte dataType.mina.?server.?codec org.?red5.2. equals .?server. 9.Notify decodeStreamMetadata(org.Logger log .server. public org. wait 9. org.apache.Ping decodePing(org.server.rtmp.ByteBuffer in).ByteBu org.mina.apache.ByteBuffe RTMP rtmp).red5.event.rtmp. finalize . 9.common.server.SharedObjectMessage so.lang.apache. // Protected Methods protected org. getClass .net.event.red5.rtmp. Constructs a new RTMPProtocolDecoder.apache.server.?codec.so.io. ioLog protected static org.?red5. protected void setupClassLoader().rtmp.common.event. I/O logger.Deserializer deserializer).Input input).net.ByteBuffer in.?codec.?red5.? RTMPMinaProtocolDecoder . public org. 781 .common.?rtmp.net.ByteBuffer public void setDeserializer(org. hashCode .ByteBuffe public org. RTMPProtocolDecoder() public RTMPProtocolDecoder().red5.mina.?rtmp. public org.red5.red5. log protected static org.mina.apache.?server.event.net.so.net.net.common. org.?net.mina.rtmp.object.mina.rtmp.net. org.common.server.common.red5.VideoData decodeVideoData(org.ByteBuffer in).?rtmpt.?RTMPTProtocolDecoder Methods inherited from java. public org. protected void doDecodeSharedObject(org.event.common.4.Object: clone .ISharedObjectMessage decodeSharedObject(org.io.red5.server.server.apache. org.red5.red5.Notify decodeNotifyOrInvoke(org. notify . toString .object.mina.red5.ByteBuffer in).mina.apache.even org.server. } Direct known subclasses: org.server.3.?net.apache.rtmp.

org. 9.ProtocolState state.server.protocol. Specified by: Method decodeBuffer in interface SimpleProtocolDecoder Decode all available objects in buffer.6.10. 9.ChunkSize decodeChunkSize(org. Parameters state in return ProtocolException Protocol state Input byte buffer Decoded object Exception during decoding 9.server. decodeChunkSize(ByteBuffer) public org.ByteBuffer in Specified by: Method decodeChunkSize in interface IEventDecoder Decodes chunk size event. decodeBytesRead(ByteBuffer) public org.ByteBuffer in) throws ProtocolException.ByteBuffe 782 .net.BytesRead decodeBytesRead(org.server. org.net.net.AudioData decodeAudioData(org.mina.?red5.event.server. decodeBuffer(ProtocolState.common.red5. ByteBuffer) public java.?rtmp.util.7.ByteBuffer in Specified by: Method decodeAudioData in interface IEventDecoder Decodes audio data event.8.rtmp.red5. decode(ProtocolState.Package org.red5.ProtocolState state.apache. decodeAudioData(ByteBuffer) public org.?server.List decodeBuffer(org. 9.5.FlexMessage decodeFlexMessage(org.mina.protocol.common.ByteBuffer in Specified by: Method decodeBytesRead in interface IEventDecoder Decodes BytesRead event.event. 9.mina.rtmp.?codec 9.common.apache.mina.net.common.server.red5.apache.red5.server.rtmp. decodeFlexMessage(ByteBuffer.red5.common.common. RTMP) public org.mina. Specified by: Method decode in interface SimpleProtocolDecoder Decodes byte buffer. ByteBuffer) public Object decode(org.rtmp.mina.net.?net.apache.9.apache.event.net.event.ByteBuffer buffer).apache.

9.common.apache.common.common.server.Header Decodes packet header.ByteBuf RTMP rtmp). Parameters in rtmp return Byte buffer RTMP protocol state FlexMessage event 9. Specified by: Method decodeFlexMessage in interface IEventDecoder Decodes FlexMessage event.Header decodeHeader(org.apache.rtmp.apache.red5.so.net.net.mina.mina.ByteBuffer in. Decodes handshake message.?net.apache.server. decodeFlexSharedObject(ByteBuffer.message.Package org. org.Invoke decodeInvoke(org.event. Parameters rtmp in return RTMP protocol state Byte buffer Byte buffer 9.red5.14. 783 . RTMP) public org. Specified by: Method decodeFlexSharedObject in interface IEventDecoder Decodes shared object message event from AMF3 encoding. RTMP) public org.ISharedObjectMessage decodeFlexSharedObject(org. decodeHandshake(RTMP.red5. ByteBuffer) public org. decodeHeader(ByteBuffer.?rtmp.net.?red5.ByteBuffer decodeHandshake(RTMP rtmp. org.rtmp.server.message.ByteBuffer in). Header) public org.mina.13.apache. Parameters in lastHeader return Input byte buffer Previous header Decoded header 9.?server.common.red5.mina. decodeInvoke(ByteBuffer.rtmp.server.common.mina.ByteBuffer in.12.11.?codec RTMP rtmp).

decodeNotify(ByteBuffer.net. RTMP rtmp).mina. decodeMessage(RTMP. Parameters notify in header rtmp return Notify event Byte buffer Header RTMP protocol state Notification event 9. Specified by: Method decodeNotify in interface IEventDecoder Decodes notification event.common.red5. 9.message.ByteBuffer in.common.rtmp.net.red5.event.?red5.event.net. ByteBuffer) public org. decodeNotifyOrInvoke(Notify. org.18.server.net.rtmp. ByteBuffer) public org.rtmp.?rtmp. ByteBuffer.red5. org.net.messag RTMP rtmp).rtmp.message. RTMP) public org.mina.server.red5.Packet decodePacket(RTMP rtmp. 784 . Specified by: Method decodeInvoke in interface IEventDecoder Decodes invocation event.Notify decodeNotify(org. RTMP) protected org.?codec RTMP rtmp).server.net.red5.event. decodePacket(RTMP.server.rtmp.ByteBuffer in) Decodes RTMP message event.?net.red5.?server.server.rtmp.red5.mina.IRTMPEvent decodeMessage(RTMP rtmp. Header. Decodes notification event.ByteBuff org. 9.15.apache.net.apache.apache.server.rtmp.Notify decodeNotifyOrInvoke(org. Parameters rtmp header in return RTMP protocol state RTMP header Input byte buffer RTMP event 9.Package org.common.server.17. Header.event.16.Head org.

mina. 9.ISharedObjectMessage decodeSharedObject(org.mina. doDecodeSharedObject(SharedObjectMessage.rtmp. 9.Unknown decodeUnknown(byte dataType.20.mina.red5. org.event.ByteBuffer in.common.common. RTMP) public org.?net.apache.mina.?codec org. 9.19.server.red5. Specified by: Method decodeSharedObject in interface IEventDecoder Decodes shared object message event.21.red5. Specified by: Method decodeUnknown in interface IEventDecoder Decodes event of Unknown type.ByteBuffer in Specified by: Method decodeVideoData in interface IEventDecoder Decodes video data event.mina.so.apache.ByteBuffer in). Parameters in return Byte buffer Ping event 9.common.red5.common. org.server.event. Input) protected void doDecodeSharedObject(org.Package org.ByteBuffer in).?server.apache.22. 785 . ByteBuffer) public org.net.common.red5.net.apache.apache.VideoData decodeVideoData(org.SharedObjectMessage so.23. decodeUnknown(byte.so.net. decodePing(ByteBuffer) public org.server. decodeSharedObject(ByteBuffer.ByteBuffer in). decodeVideoData(ByteBuffer) public org. Parameters rtmp in return RTMP protocol state Byte buffer Byte buffer 9.common.server. Decodes packet.apache.rtmp. Specified by: Method decodePing in interface IEventDecoder Decodes ping event.?rtmp.mina. ByteBuffer.event.Ping decodePing(org.ByteBuffer RTMP rtmp).server.?red5.rtmp.

red5. setupClassLoader() protected void setupClassLoader().?server.?codec org. org. 10. // Public Methods public void doEncodeSharedObject(org.ISharedObjectMessage so.common.ByteBuffer encodeAudioData(org.ByteBuffer out).red5.?protocol.Package org.?red5.Input input). public org. org. Setter for deserializer. org. org.mina.net.server.apache.?server. Class RTMPProtocolEncoder RTMP protocol encoder encodes RTMP messages and packets to byte buffers.25.?red5.?rtmp.Logger log .red5.net.object.?server.AudioData 786 .slf4j.slf4j.ByteBuffer encode(org.mina.so.?red5. Object message) throws Exception. 10. // Protected Fields protected static org.ProtocolState state.Logger ioLog .?net.?protocol. Perform the actual decoding of the shared object contents.?BaseProtocolEncoder implements.apache.server. Parameters so in input 9.?net. protected static org.?net. // Public Constructors public RTMPProtocolEncoder().?red5.?net.?server. setDeserializer(Deserializer) public void setDeserializer(org.protocol.io.24.io.apache. Setup the classloader to use when deserializing custom objects.mina.event.rtmp. RTMP rtmp.1.server. Parameters deserializer Deserializer 9.Deserializer deserializer).object. Synopsis public class RTMPProtocolEncoder extends.?rtmp.?SimpleProtocolEncoder.common.common. public org.red5.red5.

ByteBuffer encodeHeader(org.Serializer serializer).apache. public org.common.mina.mina.ByteBuffer encodeChunkSize(org. RTMP rtmp).?net.red5.red5.apache.rtmp.net.mina.server.common.red5.event.ByteBuffer encodeInvoke(org.red5.message.net.Ping ping).red5.apache.apache.?rtmp.net. public org.red5.message.net.net.?net.common.common.Header lastHeader.apache.net.rtmp.rtmp.apache.event.server.net.Notif public org.net.red5.Header hea org.?rtmpt.ISharedObjectMessag RTMP rtmp).mina.net.io.mina.rtmp.ByteBuffer encodeBytesRead(org.rtmp.common.mina.?codec.net. org.apache.ByteBuffer buf).net.net.event.message.ISharedObjectMe RTMP rtmp).?red5.?RTMPTProtocolEncoder 787 .apache.event.common.event.?net.red5.mina.apache. public org.red5. // Protected Methods protected void encodeNotifyOrInvoke(org.rtmp.common.ByteBuffer encodeMessage(RTMP rtmp.ByteBuffer encodeStreamMetadata(org. org.server.mina.red5.Notify invoke.ByteBuffer encodeSharedObject(org. public org.?rtmp.Package org.red5.red5.?codec. public org.Packet pack public org.server.server.red5.server.common.red5.server.ChunkSize public org.object.net.rtmp.ByteBuffer encodeFlexSharedObject(org.server.mina.?server.ByteBuffer encodeFlexMessage(org.server.ByteBuffer encodePing(org.ByteBuffer encodeFlexStreamSend(org.event.apache.red5.net.rtmp.server.server.net.ByteBuffer encodePacket(RTMP rtmp.ByteBuffer encodeVideoData(org.server.red5.mina.common.net.event.red5.mina.server.rtmp.so.server.Header header.mina.rtmp.server.mina.Notify notify RTMP rtmp).net.server.common.rtmp.server.mina.red5.?server.apache.Header head org.rtmp.VideoData public void setSerializer(org.ByteBuffer encodeNotify(org. } Direct known subclasses: org.event.Invoke invoke RTMP rtmp).common. org.net.server.apache.server.No RTMP rtmp).server.apache.mina.message.Header last public void encodeHeader(org.so.rtmp.red5.apache.Unknown unkn public org.IRTMPEvent m public org.common.net.common.common.message.event.common.server.event.mina.rtmp.event.rtmp.apache.rtmp.common.apache.?server.event.BytesRead public org. org.apache. protected org.common.?red5.apache.FlexMess RTMP rtmp).ByteBuffer encodeUnknown(org.rtmp.rtmp.ByteBuffer out. public org. org.red5.event.common.? RTMPMinaProtocolEncoder .?red5.?codec public org.red5.mina. org. public org.ByteBuffer encodeNotifyOrInvoke(org.rtmp.FlexS public org.mina.red5.message.

common.ByteBuffer encodeAudioData(org.?red5.ProtocolState state.rtmp. 10.net. Perform the actual encoding of the shared object contents.?codec Methods inherited from org.red5.apache. org.?server.net.slf4j.lang.7.apache.mina.?rtmp.protocol.common.?net.BaseProtocolEncoder: generateErrorResult Methods inherited from java. doEncodeSharedObject(ISharedObjectMessage.common.apache.3.6.red5.slf4j.mina. notify .4. encodeAudioData(AudioData) public org. 10. log protected static org.red5.server. Object message) throws Exception.apache. RTMP. equals .2.net. wait 10. ByteBuffer) public void doEncodeSharedObject(org.AudioData au Specified by: Method encodeAudioData in interface IEventEncoder Encodes AudioData event to byte buffer.5.rtmp. Object) public org.server.net.event.protocol.ByteBuffer encodeBytesRead(org. toString .server.Logger log . finalize .server.event.common.Logger ioLog . Logger. I/O operations logger. encode(ProtocolState. hashCode . RTMP rtmp.so. notifyAll .BytesRead by 788 .Object: clone . ioLog protected static org.red5. Parameters so rtmp out 10.mina. 10.ByteBuffer out).ISharedObjectMessage so. getClass .server. encodeBytesRead(BytesRead) public org.ByteBuffer encode(org.Package org.red5.mina. Specified by: Method encode in interface SimpleProtocolEncoder Encodes object with given protocol state to byte buffer 10.

encodeFlexMessage(FlexMessage.?net.12. 10.Package org.Header header.Header header org. RTMP) public org.so. Encodes Flex message event.mina.ChunkSize ch Specified by: Method encodeChunkSize in interface IEventEncoder Encodes ChunkSize event to byte buffer.event.ByteBuffer buf).net.common.common.apache.net.rtmp.?codec Specified by: Method encodeBytesRead in interface IEventEncoder Encodes BytesRead event to byte buffer. org.red5.common.server.apache.net.message.apache.mina.11.red5. Parameters header lastHeader return RTMP message header Previous header Encoded header data 10.red5. Parameters msg return Flex message event Encoded data 10.mina.server.server.red5.?rtmp.common.server. Header.red5.rtmp. 10. encodeHeader(Header.rtmp.server.server. encodeChunkSize(ChunkSize) public org.red5.net.message. RTMP) public org.message.Header lastHe Encode RTMP header. encodeHeader(Header.apache.9.apache.rtmp.ByteBuffer encodeFlexMessage(org.rtmp.ISharedObjectMess RTMP rtmp). Header) public org. org.net.common.ByteBuffer encodeHeader(org.Header lastHeader.?server.mina.mina.event.ByteBuffer encodeChunkSize(org.?red5.message. 789 .ByteBuffer encodeFlexSharedObject(org.10.8.net. ByteBuffer) public void encodeHeader(org. encodeFlexSharedObject(ISharedObjectMessage.rtmp. Specified by: Method encodeFlexSharedObject in interface IEventEncoder Encodes SharedObjectMessage event to byte buffer using AMF3 encoding. 10.FlexMessag RTMP rtmp).server. Encode RTMP header into given ByteBuffer.red5.

net.net.15.?red5.server.Notify invoke. RTMP) public org.server. Parameters out Byte buffer to fill 790 .mina.common. Parameters rtmp header message return RTMP protocol state RTMP message header RTMP message (event) Encoded message data 10. Encode notification event and fill given byte buffer.server.13.rtmp.common.Notify notify.event.?net.Header heade org.Invoke invoke.red5.?codec Parameters header lastHeader buf return RTMP message header Previous header Buffer to write encoded header to Encoded header data 10.?rtmp.red5.mina.apache.common. org.apache.ByteBuffer encodeMessage(RTMP rtmp. encodeNotifyOrInvoke(ByteBuffer.event. RTMP) public org.server.message.net. org.?server.common.net.14.event. RTMP rtmp).mina.rtmp. encodeInvoke(Invoke. Notify. Specified by: Method encodeNotify in interface IEventEncoder Encodes Notify event to byte buffer.IRTMPEvent mes Encode message.mina.rtmp. RTMP rtmp). encodeNotify(Notify. 10.server.event. RTMP rtmp).16.apache. 10.red5. IRTMPEvent) public org.ByteBuffer out.Package org.apache.rtmp.red5.ByteBuffer encodeNotify(org. encodeMessage(RTMP.red5.net. Specified by: Method encodeInvoke in interface IEventEncoder Encodes Invoke event to byte buffer.ByteBuffer encodeInvoke(org. Header.rtmp. RTMP) protected void encodeNotifyOrInvoke(org.

ISharedObjectMessage RTMP rtmp).20.ByteBuffer encodePacket(RTMP rtmp.apache.rtmp.ByteBuffer encodeSharedObject(org.red5.21.ByteBuffer encodeNotifyOrInvoke(org.ByteBuffer encodeUnknown(org.event. Encode notification event.18.server.apache. Specified by: Method encodeSharedObject in interface IEventEncoder Encodes SharedObjectMessage event to byte buffer.common.rtmp.?rtmp. encodeUnknown(Unknown) public org.net.mina. Parameters invoke return Notification event Encoded event data 10.net.common.server. encodePacket(RTMP.?codec invoke Notification event 10.event.server.Unknown unknow Specified by: Method encodeUnknown in interface IEventEncoder Encodes Unknown event to byte buffer. encodeNotifyOrInvoke(Notify.event.apache.Packet packet Encode packet. encodeSharedObject(ISharedObjectMessage.apache.Package org.common.red5.message.mina.common.net.19.red5.apache.mina.common.?server. encodePing(Ping) public org.rtmp.so.Noti RTMP rtmp).red5. RTMP) public org.rtmp.mina.Ping ping). 10. 10.?red5.ByteBuffer encodePing(org.mina.red5. Parameters rtmp packet return RTMP protocol state RTMP packet Encoded data 10.server. org.?net. Packet) public org. RTMP) protected org.net. 791 . Specified by: Method encodePing in interface IEventEncoder Encodes Ping event to byte buffer.server.17.

VideoData vi Specified by: Method encodeVideoData in interface IEventEncoder Encodes VideoData event to byte buffer.io.common.?red5.red5.event.net.ByteBuffer encodeVideoData(org.?net. Setter for serializer. setSerializer(Serializer) public void setSerializer(org.23.?rtmp.mina.object.Package org. encodeVideoData(VideoData) public org.?server.22.apache. Parameters serializer Serializer 792 .rtmp.server. 10.red5.Serializer serializer).?codec 10.

equals . Add event to map Parameters event Event 1. } Methods inherited from java. notifyAll . create(BaseEvent) protected synchronized void create(BaseEvent event). Dumps allocations 1. Class AllocationDebugger Simple allocation debugger for Event reference counting. // Public Methods public synchronized void dump().lang. finalize . // Protected Methods protected synchronized void create(BaseEvent event). Getter for instance Parameters return Allocation debugger instance 793 .Object: clone .1. protected synchronized void release(BaseEvent event). dump() public synchronized void dump().2. wait 1. toString . getClass .4. protected synchronized void retain(BaseEvent event). 1. notify .3. hashCode . getInstance() public static AllocationDebugger getInstance().1. Synopsis public class AllocationDebugger { // Public Static Methods public static AllocationDebugger getInstance().

release(BaseEvent) protected synchronized void release(BaseEvent event).ByteBuffer getData(). hasSource .?rtmp. org. getHeader . org.?event.server.?server. org.BaseEvent: getDataType .common. // Protected Methods protected void releaseInternal(). public void writeExternal(java.?stream. public void readExternal(java.6.Package org. // Public Methods public org.common. public String toString(). 794 . getType .?red5.net.rtmp. Release event if there's no more references to it Parameters event Event 1.?event 1.ObjectInput in) throws IOException. getTimestamp .?server.?IStreamPacket // Protected Fields protected org. ClassNotFoundException. public AudioData(org.?net.red5.5.apache.?red5.event.?net.common. } Methods inherited from org.io. Retain event Parameters event Event 2.mina.?rtmp.mina.ByteBuffer data).?BaseEvent implements. public byte getDataType().?server.io. getObject .?red5. getSource . // Public Constructors public AudioData().?red5.?api.ObjectOutput out) throws IOException. retain(BaseEvent) protected synchronized void retain(BaseEvent event). Class AudioData public class AudioData extends.apache.mina.ByteBuffer data .apache.?stream.?IStreamData.?server.

ByteBuffer getData(). source . org. releaseInternal .rtmp. Constructs a new AudioData.?net.server. 2. equals . object .3. toString .net. Specified by: Method getData in interface IStreamData Getter for property 'data'. timestamp 2.Header header .?Constants. 795 . setHeader .server. releaseInternal() protected void releaseInternal(). This is one of the TYPE_ constants.BaseEvent: header .?red5.?rtmp. toString() public String toString(). retain . 2.4.net. protected Object object . writeExternal readExternal Methods inherited from java. notify .common. org. release . wait Fields inherited from org.5.?server. Class BaseEvent Base abstract class for all RTMP events 3. setTimestamp .?net.event. 2. getDataType() public byte getDataType().Object: clone .Package org.?server.2. getData() public org. hashCode . AudioData() public AudioData(). setSource .?rtmp.1.?red // Protected Fields protected org. 2. Synopsis public abstract class BaseEventimplements.mina. Specified by: Method getDataType in interface IStreamPacket Type of this packet.?event .apache.red5. getClass .?message.lang. refcount . 3.1. finalize .rtmp.?red5.red5.message. notifyAll .

// Public Constructors public BaseEvent(). public boolean hasSource(). } Direct known subclasses: org.api.Type type.?Notify . org.server.IEvent.api.?server. public void setSource(org. ClassNotFoundException.? net.?rtmp.red5.io. org.? 796 . public org.?red5.?server. org. public BaseEvent(org. // Public Methods public abstract byte getDataType(). org.event.?event.server.event.red5. org.?net.?rtmp.?rtmp.? ChunkSize .?server. public void readExternal(java.server.server.server.?net.IEventListener source . public int getTimestamp().api. public void setTimestamp(int timestamp).IEvent.? red5.?red5.message.red5.?red5.?rtmp.?rtmp.?ClientBW .IEventListener source). public BaseEvent(org.red5.Type getType(). protected int timestamp .?event.?server.server.Header getHeader().?net.?rtmp.api.api. public void setHeader(org. // Protected Methods protected abstract void releaseInternal().?AudioData . protected org.server. public Object getObject().server.IEventListener getSource().event.?event protected int refcount .?event.?event. public synchronized void release().Package org.?event.event.IEventListener source).ObjectInput in) throws IOException.?server.red5. org.io.?Ping .?net.?red5.Type type).net.rtmp.api.api.red5.message. public synchronized void retain().ObjectOutput out) throws IOException.?net.red5.?red5.event.Header header).?server. public org.server.?server.red5.?event.IEvent.?red5.?BytesRead .?rtmp. org.net. public void writeExternal(java.event.event.?net.rtmp.red5. public org.

api.server.red5.Type) public BaseEvent(org. BaseEvent(IEvent. Event target object 3.server.event.? Unknown .3. notifyAll .rtmp.api. IEventListener) public BaseEvent(org. org.?event .6.5.?red5.?event.Package org. refcount protected int refcount .IEvent.?server. equals .red5.event.?red5.red5.Type type).?server.?rtmp.event.?rtmp.2.?so.IEventListener source).net.Object: clone .?red5.?red5.server.red5.?server.4. header protected org.7.?VideoData .?server.?event. Event references count 3. toString .message.?server. notify . Create new event of given type Parameters type source Event type Event source 3.?net. source protected org. org. Create new event of given type Parameters type Event type 3. 797 .?ServerBW SharedObjectMessage Methods inherited from java.?net.IEventListener source . BaseEvent(IEvent. hashCode .api.IEvent.?rtmp.api.Type. Event RTMP packet header 3.?net.Type type. getClass .server. wait 3. object protected Object object .? red5.?net. org.server. org.?rtmp.red5.?event.lang.event.Header header . finalize .

event.server.11. getType() public org.12. getObject() public Object getObject().IEvent.api.server. 3.13.?event Event listener 3.Type getType(). Event listener 3. getSource() public org.server. getHeader() public org.16.IEventListener getSource().event.?rtmp. timestamp protected int timestamp . 3.red5.Package org. release() public synchronized void release().?red5. Specified by: Method getTimestamp in interface IRTMPEvent Getter for timestamp 3.api.?server. getDataType() public abstract byte getDataType().10. 3.8.red5. Specified by: Method getDataType in interface IRTMPEvent Getter for data type 3.14. hasSource() public boolean hasSource().?net. getTimestamp() public int getTimestamp().15.Header getHeader().rtmp.9.net.message. 3.red5. Specified by: Method getHeader in interface IRTMPEvent Getter for header 3. Specified by: Method release in interface IRTMPEvent 798 .

setTimestamp(int) public void setTimestamp(int timestamp).server. Specified by: Method setHeader in interface IRTMPEvent Setter for header 3.20.net.Header header).?rtmp. Specified by: Method setTimestamp in interface IRTMPEvent Setter for timestamp 4.?event Hook to free buffers allocated by the event.18. releaseInternal() protected abstract void releaseInternal().?server. Specified by: Method retain in interface IRTMPEvent Retain event 3. Specified by: Method setSource in interface IRTMPEvent Setter for source 3.?red5. // Public Methods 799 .17.?event. setSource(IEventListener) public void setSource(org.IEventListener source).message.server.1. Class BytesRead Bytes read event 4.red5.Package org.?server.red5.?net.event.rtmp. Synopsis public class BytesRead extends.?rtmp.?BaseEvent { // Public Constructors public BytesRead(). org. setHeader(Header) public void setHeader(org. 3.?net.19. retain() public synchronized void retain().21. public BytesRead(int bytesRead).api.?red5. Rekease event 3.

rtmp. refcount .event. finalize . setSource . ClassNotFoundException. timestamp 4. BytesRead(int) public BytesRead(int bytesRead). object . Creates new event with given bytes number Parameters bytesRead Number of bytes read 4. readExternal .lang. hashCode .red5.?server. 800 . getSource . getClass . doRelease() protected void doRelease(). release .ObjectInput in) throws IOException. releaseInternal . public byte getDataType(). source .?red5. setTimestamp . getHeader . // Protected Methods protected void doRelease().?rtmp.net.BaseEvent: header . notifyAll .?event public int getBytesRead(). public void writeExternal(java. setHeader .event.?net.2. getTimestamp . writeExternal Methods inherited from java. getType .server.io.rtmp.4. getObject . } Methods inherited from org. toString . getBytesRead() public int getBytesRead().BaseEvent: getDataType .io. wait Fields inherited from org.server. equals .3. notify . protected void releaseInternal().Object: clone . public void setBytesRead(int bytesRead).red5. retain .ObjectOutput out) throws IOException. public void readExternal(java. hasSource .net.Package org. public String toString(). Release event (set bytes read to zero) 4.

ObjectInput in) throws IOException. public byte getDataType(). toString() public String toString().io.?net. Synopsis public class ChunkSize extends.8. public int hashCode(). 4.?server. 4.?event. org. releaseInternal() protected void releaseInternal(). // Public Methods public boolean equals(Object obj). Setter for bytes read Parameters bytesRead Number of bytes read 4. getDataType() public byte getDataType().Package org.?server.?red5.?event Return number of bytes read Parameters return Number of bytes 4. public void readExternal(java. 5.?rtmp.6. ClassNotFoundException.1. Class ChunkSize Chunk size event 5.?rtmp. 801 .?BaseEvent { // Public Constructors public ChunkSize().7. public ChunkSize(int size). setBytesRead(int) public void setBytesRead(int bytesRead).?net.5.?red5. public int getSize().

notifyAll .BaseEvent: getDataType .Object: clone . retain . getSize() public int getSize(). doRelease() protected void doRelease().io. equals(Object) public boolean equals(Object obj).lang.net. protected void releaseInternal().6. hashCode . public void writeExternal(java.ObjectOutput out) throws IOException. getObject .server.server. 802 . Create chunk size event with given size Parameters size Chunk size 5.event.3.?net. notify . refcount . setTimestamp . equals . releaseInternal .5. getSource .event. getHeader . getDataType() public byte getDataType().4. 5.?event public void setSize(int size). ChunkSize(int) public ChunkSize(int size).?server. 5. getClass . readExternal .?rtmp.?red5. getTimestamp .rtmp.Package org. wait Fields inherited from org.rtmp. object . release . finalize . public String toString().red5. hasSource . timestamp 5. setHeader . writeExternal Methods inherited from java. toString . Releases chunk (set size to zero) 5.red5. getType . source . } Methods inherited from org.2. setSource .net.BaseEvent: header . // Protected Methods protected void doRelease().

5.?net.Package org.?event.7. ClassNotFoundException. public byte getValue2(). Parameters return Chunk size 5.io. 803 . public void readExternal(java.8.?BaseEvent { // Public Constructors public ClientBW(). releaseInternal() protected void releaseInternal(). byte value2).?rtmp.ObjectInput in) throws IOException. 5. Synopsis public class ClientBW extends.?server. Class ClientBW Client bandwidth event 6. public byte getDataType(). // Public Methods public int getBandwidth(). public ClientBW(int bandwidth.?red5.9.?event Getter for size.?net. hashCode() public int hashCode(). 6. org. Parameters size Chunk size 5. public void setBandwidth(int bandwidth). toString() public String toString().1. Setter for size.?red5.10.?server.?rtmp. setSize(int) public void setSize(int size).

BaseEvent: header .net. setHeader . getDataType() public byte getDataType(). setSource . toString . hasSource . object . 6. getClass . timestamp 6. hashCode .5. refcount . source . getType .server.?net. readExternal . Getter for value2 Parameters return Value for property 'value2'.event.?red5. public String toString(). Parameters return Value for property 'bandwidth'. getValue2() public byte getValue2(). releaseInternal() protected void releaseInternal().rtmp. getObject . getTimestamp . wait Fields inherited from org.event.red5. retain .io. equals . 6. writeExternal Methods inherited from java.red5.lang. // Protected Methods protected void releaseInternal(). releaseInternal . 804 .4.BaseEvent: getDataType .server. getHeader .?server. getSource . } Methods inherited from org. release .?event public void setValue2(byte value2).3.?rtmp. public void writeExternal(java.Package org.ObjectOutput out) throws IOException.net. notifyAll . 6. notify . Getter for property 'bandwidth'.rtmp. getBandwidth() public int getBandwidth(). finalize .2.Object: clone . setTimestamp .

?red5. public static final int FRAMETYPE_DISPOSABLE = 3. Setter for bandwidth Parameters bandwidth New bandwidth 6.?net. Setter for property 'value2'.7. 7. public static final int AUDIO_NELLYMOOSER_8KHZ = 5.?server.?rtmp. 805 . Parameters value2 Value to set for property 'value2'.Package org. public static final int SOUND_SIZE_16_BIT = 2. 6. public static final int FRAMETYPE_KEYFRAME = 1.?event 6. setValue2(byte) public void setValue2(byte value2). public static final int AUDIO_UNCOMPRESSED = 0. toString() public String toString(). public static final int FRAMETYPE_INTERFRAME = 2. public static final int AUDIO_NELLYMOOSER = 6. public static final int SOUND_RATE_22_KHZ = 3. public static final int SOUND_RATE_11_KHZ = 2. setBandwidth(int) public void setBandwidth(int bandwidth). public static final int SOUND_RATE_5_5_KHZ = 1.8. public static final int AUDIO_MP3 = 2. Class FLVData public class FLVData { // Public Static Fields public static final int AUDIO_ADPCM = 1. public static final int SOUND_RATE_44_KHZ = 4.6.

?red5. toString .mina. wait 7. public static final int VIDEO_SCREEN_VIDEO = 3. notify . public boolean isDisposable(). public static final int VIDEO_ON2_VP6 = 4. AUDIO_NELLYMOOSER_8KHZ 806 .4. hashCode . public static final int TYPE_VIDEO = 9.Object: clone .ByteBuffer data .?rtmp. public static final int VIDEO_SORENSEN_H263 = 2. public static final int TYPE_AUDIO = 8.2. AUDIO_MP3 public static final int AUDIO_MP3 = 2.apache. // Protected Fields protected org.Package org. public static final int TYPE_METADATA = 12. MP3 data 7. finalize . protected int timestamp . ADPCM data 7. // Public Constructors public FLVData().3. getClass .common. notifyAll . AUDIO_NELLYMOOSER public static final int AUDIO_NELLYMOOSER = 6.lang. } Methods inherited from java.?event public static final int SOUND_SIZE_8_BIT = 0. equals . Nellymoser encoded data 7.1. // Public Methods public int getCodec().?net. AUDIO_ADPCM public static final int AUDIO_ADPCM = 1.?server.

Sound size when 22 khz rate marker 7. Sound size when 5. FRAMETYPE_DISPOSABLE public static final int FRAMETYPE_DISPOSABLE = 3.10. Disposable 7. AUDIO_UNCOMPRESSED public static final int AUDIO_UNCOMPRESSED = 0. SOUND_RATE_11_KHZ public static final int SOUND_RATE_11_KHZ = 2. SOUND_SIZE_16_BIT 807 .13.?net. Sound size when 11 khz rate marker 7.5. FRAMETYPE_INTERFRAME public static final int FRAMETYPE_INTERFRAME = 2.?red5. Nellymoser 8khz rate data 7. Interframe 7.5 khz rate marker 7. Sound size when 44 khz rate marker 7. SOUND_RATE_5_5_KHZ public static final int SOUND_RATE_5_5_KHZ = 1.?event public static final int AUDIO_NELLYMOOSER_8KHZ = 5.Package org. SOUND_RATE_44_KHZ public static final int SOUND_RATE_44_KHZ = 4. FRAMETYPE_KEYFRAME public static final int FRAMETYPE_KEYFRAME = 1.8.11. SOUND_RATE_22_KHZ public static final int SOUND_RATE_22_KHZ = 3.?server. Keyframe 7.7. Uncompressed 7.?rtmp.9.12.6.

Parameters 808 .15.17. VIDEO_SCREEN_VIDEO public static final int VIDEO_SCREEN_VIDEO = 3. Video data 7.?red5. Metadata 7. getCodec() public int getCodec().14. Screen video 7.?rtmp. Getter for codec.?net. VIDEO_ON2_VP6 public static final int VIDEO_ON2_VP6 = 4. Sound size when 8 khz quality marker 7.?event public static final int SOUND_SIZE_16_BIT = 2. Sorensen H263 codec marker 7.20. TYPE_VIDEO public static final int TYPE_VIDEO = 9. SOUND_SIZE_8_BIT public static final int SOUND_SIZE_8_BIT = 0. TYPE_AUDIO public static final int TYPE_AUDIO = 8. Audio data 7. Returns 0 by now.Package org.?server.21. Sound size when 16 khz quality marker 7. TYPE_METADATA public static final int TYPE_METADATA = 12.16. ON2 VP6 codec marker 7.18.19. VIDEO_SORENSEN_H263 public static final int VIDEO_SORENSEN_H263 = 2.

server.22. release . setHeader .red5.Notify: call .rtmp. finalize .event.net. data Fields inherited from org. getDataType() public byte getDataType().rtmp. Class FlexMessage Flex method invocation. setSource . isDisposable() public boolean isDisposable(). Getter for disposable state Parameters return true if FVL data is disposable.rtmp. timestamp 8.server. To be implemented.red5. retain .Object: clone .1. getTimestamp .server. getObject .net. getClass .red5.?server. // Public Methods public byte getDataType().event. getData .BaseEvent: getHeader .?red5. org.BaseEvent: header . getInvokeId .net.rtmp.2.rtmp.Notify: doRelease .net. getCall .event. } Methods inherited from org. 809 .?net.?rtmp.?rtmp. hashCode . wait Fields inherited from org. Synopsis public class FlexMessage extends.red5. getType . setConnectionParams . readExternal . setInvokeId .Package org.?red5.?Invoke { // Public Constructors public FlexMessage().?event return Codec 7.?event. false otherwise 8. setTimestamp Methods inherited from java. toString Methods inherited from org. hasSource .server. notifyAll . refcount .red5. setData .net.server.lang.?net. setCall . source . 8. writeExternal Methods inherited from org. getConnectionParams . getSource .Invoke: equals .event.event. getDataType . object . notify . releaseInternal .?server.

?api.red5. // Public Methods public byte getDataType().?event.ByteBuffer data). timestamp 9. setCall . getDataType .server. object . setInvokeId . refcount . FlexStreamSend(ByteBuffer) public FlexStreamSend(org. setTimestamp Methods inherited from java.red5.?rtmp.Object: clone . Class FlexStreamSend AMF3 stream send message.?event 9.?red5. getType . hasSource .?IEvent { 810 .ByteBuffer data).event.Notify: call . } Methods inherited from org.event.?red5. data Fields inherited from org.BaseEvent: header .1.rtmp. writeExternal Methods inherited from org.?net. toString .Notify: doRelease .lang. setSource .3. getClass .net. setHeader .server.?rtmp.common.?red5.?server. source . getCall . release .rtmp. notifyAll . getData . 9. equals . getTimestamp . finalize .BaseEvent: getHeader .apache. getObject .red5. Interface IRTMPEvent public interface IRTMPEvent extends.?server.red5. readExternal . setData .mina.rtmp.net.?Notify { // Public Constructors public FlexStreamSend().server. wait Fields inherited from org.event.net.apache. getSource .net. Parameters data 9. Create new stream send object.mina.2. getDataType() public byte getDataType(). retain . org.?event.event. releaseInternal . Synopsis public class FlexStreamSend extends.common. 10. setConnectionParams .rtmp. getConnectionParams . hashCode . org. getInvokeId .Package org.?net.?server. notify . public FlexStreamSend(org.server.

Header getHeader().message.server. getHeader() public org.IEventListener source).?server.Header header).event. public int getTimestamp().4.message.?event // Public Methods public byte getDataType().?red5.red5. public void setHeader(org. public void setSource(org. public void setTimestamp(int timestamp).Header getHeader(). getTimestamp() public int getTimestamp().net.2.server. Getter for data type Parameters return Data type 10.?rtmp.api.red5.net. release() public void release(). Getter for header Parameters return RTMP packet header 10.message.red5. public org. } 10.server.server.rtmp.Package org. public void retain().1.net. public void release().?net.red5. 811 . Getter for timestamp Parameters return Event timestamp 10.rtmp.3.rtmp. getDataType() public byte getDataType().

server. public Invoke(org.red5.?net.?server. Setter for source Parameters source Source 10.red5. setSource(IEventListener) public void setSource(org.IEventListener source).server. 812 .ByteBuffer data).8.Header header).1. Setter for timestamp Parameters timestamp New event timestamp 11. 10.mina.?rtmp.Package org.apache. Setter for header Parameters header RTMP packet header 10.server.event.net.message.IPendingServiceCall call).?red5. retain() public void retain(). setTimestamp(int) public void setTimestamp(int timestamp).7.red5. Synopsis public class Invoke extends.?event Hook to free buffers allocated by the event. org.6.?rtmp. setHeader(Header) public void setHeader(org. Retain event 10. public Invoke(org.service.rtmp.?server.common.?red5.?net.?event.?Notify { // Public Constructors public Invoke().api. Class Invoke Remote invocation event 11.5.api.

api. equals . Invoke(IPendingServiceCall) public Invoke(org.service.red5.rtmp. } Direct known subclasses: org.?red5. getType . getInvokeId . wait Fields inherited from org. Invoke() public Invoke().?rtmp. setHeader . notify .Notify: doRelease . getSource . Constructs a new Invoke. timestamp 11.server. getClass . public byte getDataType(). hashCode .rtmp.server. Create new invocation event with given pending service call 813 . setTimestamp Methods inherited from java. object .red5.Notify: call .?server.rtmp.api.server. finalize .3. data Fields inherited from org.apache. getCall . refcount . setData .red5.?event // Public Methods public boolean equals(Object obj).?red5.BaseEvent: getHeader . Invoke(ByteBuffer) public Invoke(org.ByteBuffer data). setInvokeId .event. retain . public org. getDataType .Package org. getConnectionParams .red5. getObject .net.rtmp.mina.red5. public String toString().common.?net.service. setConnectionParams . setCall . source . releaseInternal .event.lang. setSource .BaseEvent: header .net.server.?server.4. getTimestamp .?event. notifyAll .server. release . 11. hasSource .red5.event.IPendingServiceCall getCall(). Create new invocation event with given data Parameters data Event data 11.2.?rtmp. getData . toString .?net. writeExternal Methods inherited from org.server.net.event.IPendingServiceCall call). readExternal .Object: clone .net.?FlexMessage Methods inherited from org.

common.?stream. equals(Object) public boolean equals(Object obj).?red5. public Notify(org.?red5.?red5.5.?rtmp.?net.?server.?IStreamPacket // Protected Fields protected org.server.?api.?event Parameters call Pending call 11.ByteBuffer getData().common.server.?rtmp.1.api.util. getCall() public org.6. 814 .8. toString() public String toString(). protected org.apache. 11. 11.IServiceCall call). public org.server.IServiceCall call .ByteBuffer data . Class Notify Stream notification event 12. Synopsis public class Notify extends.?BaseEvent implements.?event. org. // Public Constructors public Notify(). public Notify(org.?server.mina.apache.?IStreamData.service.Map getConnectionParams().service. public int getInvokeId().ByteBuffer data).?red5.api. // Public Methods public boolean equals(Object obj).red5. 11. getDataType() public byte getDataType().red5. public java. org.Package org.server.IServiceCall getCall().?net.?server.IPendingServiceCall getCall(). org.?stream. public org.common.red5.api.red5.7.apache.service. 12.?server.mina.api.mina.service. public byte getDataType().

server.api. releaseInternal .ObjectInput in) throws IOException.Map connectionParams). wait Fields inherited from org. setTimestamp . Constructs a new Notify.red5.ObjectOutput out) throws IOException.red5.?Invoke Methods inherited from org.3.rtmp. public void setData(org.net.?red5. source .util.rtmp. getSource . Notify() public Notify().ByteBuffer data). notifyAll . refcount .server. setSource .BaseEvent: getDataType . public void setCall(org. getClass .event.ByteBuffer data).red5. Notify(ByteBuffer) public Notify(org. toString . getTimestamp .2. ClassNotFoundException. writeExternal Methods inherited from java. org. retain .?red5. equals . release .mina. public void writeExternal(java.?event public void readExternal(java. } Direct known subclasses: org.?server.common. public void setInvokeId(int invokeId).apache.BaseEvent: header . finalize . setHeader .server. hasSource .?event. notify .lang.IServiceCall call).common. object . Create new notification event with given byte buffer Parameters data Byte buffer 815 .service.?rtmp. readExternal . getHeader .Object: clone .?event. hashCode .net.?net.?rtmp.mina.?rtmp. public void setConnectionParams(java. 12.apache.?net.event. timestamp 12. public String toString().io.Package org. getObject . // Protected Methods protected void doRelease().?FlexStreamSend . getType . protected void releaseInternal().io.?red5.?server.?server.?net.

data protected org.server. Service call 12.red5.?red5.service.mina. Release event (nullify call object) 12.?rtmp.5.IServiceCall call).common.apache.IServiceCall getCall().red5.service. 12. Getter for service call Parameters return Service call 12.api.6.server.11.api.10.?server. call protected org.util.4. getConnectionParams() public java.IServiceCall call .service.?net.8. Event data 12. doRelease() protected void doRelease(). Notify(IServiceCall) public Notify(org.?event 12.ByteBuffer data .7.mina.apache.common.api. equals(Object) public boolean equals(Object obj). getCall() public org.server.red5. Getter for connection parameters Parameters return Connection parameters 12.Package org. getData() public org. 816 .ByteBuffer getData().Map getConnectionParams().9. Create new notification event with given service call Parameters call Service call 12.

getInvokeId() public int getInvokeId().13.red5. Setter for call Parameters call Service call 12.IServiceCall call).common. 12.14. setCall(IServiceCall) public void setCall(org.15.17. Setter for data Parameters 817 .Map connectionParams). Specified by: Method getDataType in interface IStreamPacket Type of this packet.?red5. setConnectionParams(Map) public void setConnectionParams(java.?server. getDataType() public byte getDataType(). 12.?net.?rtmp.mina.?event Specified by: Method getData in interface IStreamData Getter for property 'data'.service. Getter for invoke id Parameters return Invoke id 12.api. Setter for connection parameters Parameters connectionParams Connection parameters 12. setData(ByteBuffer) public void setData(org. releaseInternal() protected void releaseInternal().12.ByteBuffer data).server.util. This is one of the TYPE_ constants.16. 12.apache.Package org.

?net. public static final short UNKNOWN_5 = 5.?server.?red5. public static final short UNKNOWN_8 = 8. org. public static final short STREAM_CLEAR = 0. public static final short STREAM_PLAYBUFFER_CLEAR = 1.?event. Synopsis public class Ping extends.?rtmp. public static final short UNKNOWN_2 = 2. // Public Constructors public Ping(). public static final short PING_CLIENT = 6. Class Ping Ping event. public static final short STREAM_RESET = 4.?server. int value2). public Ping(short value1. Setter for invoke id Parameters invokeId Invoke id 12. actually combination of different events 13. 818 .?event data Data 12. public static final int UNDEFINED = -1.1.19.Package org. int value3). 13.?BaseEvent { // Public Static Fields public static final short CLIENT_BUFFER = 3. int value2. toString() public String toString().?rtmp. public Ping(short value1. setInvokeId(int) public void setInvokeId(int invokeId).?net.18. public static final short PONG_SERVER = 7.?red5.

setTimestamp .server.net. readExternal . object .?red5.Package org.?event public Ping(short value1. writeExternal Methods inherited from java. releaseInternal . getObject . protected void releaseInternal(). toString .BaseEvent: header .?rtmp. getSource .?net. refcount .ObjectOutput out) throws IOException.red5.Object: clone . // Protected Methods protected void doRelease().event. public void setDebug(String debug). retain . setSource . hasSource . } Methods inherited from org. timestamp 819 .rtmp.lang.ObjectInput in) throws IOException. public String getDebug(). equals . public void setValue3(int value3). getClass . wait Fields inherited from org. setHeader . public void setValue4(int value4). finalize . public void setValue1(short value1).rtmp. getTimestamp .BaseEvent: getDataType . int value4).server. int value2. ClassNotFoundException. public int getValue2(). notifyAll . release . public void readExternal(java.event.io. source .net.io.?server. public short getValue1(). public String toString().red5. hashCode . public int getValue4(). public int getValue3(). getType . public void writeExternal(java. int value3. // Public Methods public byte getDataType(). notify . public void setValue2(int value2). getHeader .

UNKNOWN_2 public static final short UNKNOWN_2 = 2.3. Server response event 13. Stream play 13. Stream reset 13.?net.5. Event type is undefined 13.10.6.?rtmp.?server.8.9. PONG_SERVER public static final short PONG_SERVER = 7. PING_CLIENT public static final short PING_CLIENT = 6.Package org. STREAM_RESET public static final short STREAM_RESET = 4. 13. STREAM_PLAYBUFFER_CLEAR public static final short STREAM_PLAYBUFFER_CLEAR = 1. Constructs a new Ping.?red5.4. STREAM_CLEAR public static final short STREAM_CLEAR = 0. UNDEFINED public static final int UNDEFINED = -1. Stream clear event 13. Unknown event 820 .7. Ping() public Ping().2. CLIENT_BUFFER public static final short CLIENT_BUFFER = 3. Client ping event 13. Client buffer 13.?event 13.

15. getDataType() public byte getDataType(). Getter for property 'value2'. 13.?rtmp. One more unknown event 13.17.?red5.13. Getter for property 'debug'. Getter for property 'value1'. Parameters return Value for property 'debug'.?server. Getter for property 'value3'. 13. getValue1() public short getValue1().?event 13. getDebug() public String getDebug(). getValue2() public int getValue2().Package org.12. UNKNOWN_8 public static final short UNKNOWN_8 = 8. One more unknown event 13. 13.11. Parameters return Value for property 'value1'. 13. Parameters 821 .14.?net. getValue3() public int getValue3(). Parameters return Value for property 'value2'.16. UNKNOWN_5 public static final short UNKNOWN_5 = 5.

13.?red5. setDebug(String) public void setDebug(String debug).?net. Parameters debug Value to set for property 'debug'. Parameters value2 Value to set for property 'value2'. Getter for property 'value4'.?server.Package org.18. 13. releaseInternal() protected void releaseInternal(). 13. Parameters 822 . Setter for property 'value2'.20. 13. 13. Setter for property 'value3'. Parameters return Value for property 'value4'. Parameters value1 Value to set for property 'value1'. setValue1(short) public void setValue1(short value1).22. 13. setValue2(int) public void setValue2(int value2).21.?event return Value for property 'value3'.23. setValue3(int) public void setValue3(int value3). Setter for property 'debug'. Setter for property 'value1'.?rtmp. getValue4() public int getValue4().19.

ByteBuffer buf).?event value3 Value to set for property 'value3'.?net.?server.?rtmp. } Methods inherited from java. public static byte[] NioByteBufferToByteArray(java.?net.?red5. getClass . toString . // Public Static Methods public static void ByteArrayToByteBuffer(byte[] byteBuf.mina.24.lang.1.?red5. Class SerializeUtils The utility class provides conversion methods to ease the use of byte arrays. hashCode . 13.?BaseEvent { // Public Constructors 823 . wait 15.nio.ByteBuffer buf). org. Synopsis public class SerializeUtils { // Public Constructors public SerializeUtils(). equals .ByteBuffer buf). public static void ByteArrayToNioByteBuffer(byte[] byteBuf. org.common.ByteBuffer buf). notify .?rtmp.?event. mina bytebuffers. toString() public String toString().nio. Parameters value4 Value to set for property 'value4'. 13.1. setValue4(int) public void setValue4(int value4). public static byte[] ByteBufferToByteArray(org. 14. finalize . and nio bytebuffers.common. 14.?server.apache. java.Package org.apache.mina.Object: clone .25. Synopsis public class ServerBW extends. notifyAll . Setter for property 'value4'. Class ServerBW Server bandwidth event 15.

red5.net. Server bandwidth event Parameters bandwidth Bandwidth 15. getClass .event.lang.?rtmp. public String toString(). getTimestamp . setTimestamp .io. finalize . source .net.?event public ServerBW(). } Methods inherited from org. release . public void readExternal(java. timestamp 15. ClassNotFoundException. public void writeExternal(java. setHeader .io. retain . getSource . getBandwidth() public int getBandwidth().red5. getHeader .server. public ServerBW(int bandwidth). getObject .rtmp. // Protected Methods protected void releaseInternal(). refcount .BaseEvent: header . notify . hasSource . toString . equals .rtmp. readExternal .Object: clone .ObjectOutput out) throws IOException. public void setBandwidth(int bandwidth). setSource .3.Package org.BaseEvent: getDataType .server. public byte getDataType(). object . hashCode . Getter for bandwidth Parameters 824 .?net. releaseInternal .2. wait Fields inherited from org. writeExternal Methods inherited from java.?server. getType .ObjectInput in) throws IOException.event. ServerBW(int) public ServerBW(int bandwidth). notifyAll .?red5. // Public Methods public int getBandwidth().

apache. 15.?event.?red5.?server. protected byte dataType . 16. 15.Package org.7.ByteBuffer data . public byte getDataType(). public void readExternal(java.ByteBuffer getData(). public Unknown(byte dataType.apache. getDataType() public byte getDataType().mina.ByteBuffer data).?net.6.?rtmp. 15. Setter for bandwidth Parameters bandwidth New bandwidth.common. org.4. 825 . Synopsis public class Unknown extends. setBandwidth(int) public void setBandwidth(int bandwidth). public String toString(). // Public Methods public org.?net.?event return Bandwidth 15.?red5.common.?rtmp.?BaseEvent { // Protected Fields protected org.apache.mina. toString() public String toString(). Class Unknown Unknown event 16.io.?server.mina. ClassNotFoundException.common. releaseInternal() protected void releaseInternal(). org.5.1. // Public Constructors public Unknown().ObjectInput in) throws IOException.

lang.net.server. getHeader .common.?red5.apache. getTimestamp . getObject .event. Unknown(byte.?server. } Methods inherited from org.?rtmp.BaseEvent: header . setSource . Getter for data Parameters 826 .Package org. refcount . notify . object . hashCode .common.io. timestamp 16. getSource .rtmp.mina. finalize .mina.mina. Type of data 16. toString . readExternal .red5.apache. Event data 16.5. source . equals . setTimestamp .2. getData() public org.4.3. setHeader .server. notifyAll . getType . Create new unknown event with given data and data type Parameters dataType data Data type Event data 16. getClass . writeExternal Methods inherited from java.Object: clone .ByteBuffer data).net.event.rtmp. wait Fields inherited from org.common.ByteBuffer data .?event public void writeExternal(java.?net.ByteBuffer getData(). ByteBuffer) public Unknown(byte dataType.red5. hasSource . dataType protected byte dataType . // Protected Methods protected void releaseInternal(). release . data protected org.ObjectOutput out) throws IOException. retain .apache.BaseEvent: getDataType . org. releaseInternal .

public org.apache.FrameType getFrameType(). // Public Constructors public VideoData(). public String toString(). // Public Methods public org. 17.?stream.mina. // Protected Fields protected org.?red5. org.?io.rtmp. releaseInternal() protected void releaseInternal(). org.red5. public void writeExternal(java.?server.mina.?event.VideoData.net.common. } Methods inherited from org.Package org. org.?BaseEvent implements.8. 16.?server.7.common.?red5.net.?server.ByteBuffer data .apache.red5.server.BaseEvent: getDataType .ObjectOutput out) throws IOException. getSource .1.?IoConstants.ByteBuffer data). getObject . org.?IStreamData.io. getHeader . public void readExternal(java.server.?net.event. getTimestamp .rtmp.?rtmp.6. getDataType() public byte getDataType().?net. Synopsis public class VideoData extends.event. hasSource .?red5. Class VideoData Video data event 17.apache. // Protected Methods protected void releaseInternal(). getType .io.?rtmp. public byte getDataType(). ClassNotFoundException.mina.?red5. 16.ByteBuffer getData().?event return Data 16.ObjectInput in) throws IOException.common. public VideoData(org.?red5.?server. toString() public String toString(). 827 .

timestamp 17.4. releaseInternal .BaseEvent: header .rtmp. Specified by: Method getData in interface IStreamData Getter for property 'data'.?server. 17. Video data 17. equals .mina.apache. refcount .3.?red5. This is one of the TYPE_ constants. release . data protected org.apache. hashCode .Object: clone .red5.?event .rtmp. getClass .?net.event. getDataType() public byte getDataType().?rtmp.server.ByteBuffer data . 17.Package org.7.FrameType getFrameType(). toString . getData() public org. notifyAll . retain .common. VideoData(ByteBuffer) public VideoData(org.2.VideoData. VideoData() public VideoData().red5. 17. wait Fields inherited from org.common.server.event. setTimestamp . source . Create video data event with given data buffer Parameters data Video data 17. finalize . getFrameType() public org.mina. Getter for frame type 828 .apache.ByteBuffer getData().mina. object .5.net.common.6.ByteBuffer data). Constructs a new VideoData.net. setHeader .lang. notify . setSource . Specified by: Method getDataType in interface IStreamPacket Type of this packet. writeExternal readExternal Methods inherited from java.

?event Parameters return Type of video frame 17. getDeclaringClass . releaseInternal() protected void releaseInternal().net.FrameType INTERFRAME . compareTo .rtmp. Class VideoData.FrameType valueOf(String name).event.red5.9. name .red5. wait 829 .VideoData.red5.server.?Enum { // Public Static Fields public static final org.?net.lang.rtmp.?lang.event.rtmp. Synopsis public static final class VideoData. notify .VideoData. toString() public String toString().red5.VideoData. 17.event.server.rtmp. toString . java. notifyAll . } Methods inherited from java.FrameType KEYFRAME . 18.red5.Package org.FrameType UNKNOWN . equals .1.?red5.server. public static final org.event.server.FrameType extends.Enum: clone .event.net.VideoData.?rtmp.event. public static final org.8.server.net.FrameType Videoframe type 18.net.?server.server.red5.net.rtmp.net.FrameType[] values(). ordinal .VideoData. hashCode . valueOf Methods inherited from java.rtmp. // Public Static Methods public static org.lang.VideoData. public static org. public static final org. finalize .Object: getClass .FrameType DISPOSABLE_INTERFRAME .

1. public static final int MEDIUM_INT_MAX = 16777215. public static final String ACTION_DELETE_STREAM = "deleteStream". public static final byte HEADER_CONTINUE = 3. public static final String ACTION_PLAY = "play". public static final String ACTION_RECEIVE_AUDIO = "receiveAudio". Synopsis public interface Constants { // Public Static Fields public static final String ACTION_CLOSE_STREAM = "closeStream". public static final String ACTION_DISCONNECT = "disconnect". public static final byte SO_CLIENT_CLEAR_DATA = 8. public static final byte SO_CLIENT_INITIAL_DATA = 11. 830 . public static final byte SO_CLIENT_DELETE_DATA = 9. public static final byte SO_CLIENT_SEND_MESSAGE = 6. public static final byte HEADER_SAME_SOURCE = 1. public static final String ACTION_CREATE_STREAM = "createStream". public static final String ACTION_SEEK = "seek". Interface Constants Class for AMF and RTMP marker values constants 1.1. public static final String ACTION_PAUSE = "pause". public static final byte HEADER_TIMER_CHANGE = 2. public static final String ACTION_RELEASE_STREAM = "releaseStream". public static final String ACTION_STOP = "disconnect". public static final int HANDSHAKE_SIZE = 1536. public static final byte HEADER_NEW = 0. public static final String ACTION_RECEIVE_VIDEO = "receiveVideo". public static final String ACTION_PUBLISH = "publish". public static final String ACTION_CONNECT = "connect".

public static final byte SO_SET_ATTRIBUTE = 3. public static final byte TYPE_CHUNK_SIZE = 1. public static final byte TYPE_SERVER_BANDWIDTH = 5. public static final byte SO_CLIENT_UPDATE_DATA = 4. public static final byte SO_DELETE_ATTRIBUTE = 10. public static final byte TYPE_FLEX_SHARED_OBJECT = 16.?rtmp. public static final byte SO_CONNECT = 1. public static final byte TYPE_FLEX_STREAM_SEND = 15.2. HEADER_CONTINUE 831 . public static final byte SO_SEND_MESSAGE = 6. public static final byte TYPE_VIDEO_DATA = 9. public static final byte TYPE_CLIENT_BANDWIDTH = 6. Size of initial handshake between client and server 1.?server. public static final byte TYPE_FLEX_MESSAGE = 17. public static final byte TYPE_PING = 4.?red5.Package org. public static final byte SO_DISCONNECT = 2. public static final byte TYPE_STREAM_METADATA = 18.?message public static final byte SO_CLIENT_STATUS = 7. public static final byte TYPE_SHARED_OBJECT = 19. } 1.?net. public static final byte TYPE_BYTES_READ = 3. HANDSHAKE_SIZE public static final int HANDSHAKE_SIZE = 1536. public static final byte TYPE_AUDIO_DATA = 8.3. public static final byte TYPE_INVOKE = 20. public static final byte SO_CLIENT_UPDATE_ATTRIBUTE = 5. public static final byte TYPE_NOTIFY = 18.

7.4.Package org. Clear event for Shared Object 1.6. Same source marker 1.?net.?server.5. SO_CLIENT_INITIAL_DATA public static final byte SO_CLIENT_INITIAL_DATA = 11. Send SO message flag 1. There's more to encode 1.11. HEADER_TIMER_CHANGE public static final byte HEADER_TIMER_CHANGE = 2. Delete data for Shared Object 1.8. Medium integer max value 1. SO_CLIENT_DELETE_DATA public static final byte SO_CLIENT_DELETE_DATA = 9. New header marker 1.?rtmp. HEADER_NEW public static final byte HEADER_NEW = 0. Initial SO data flag 1.?message public static final byte HEADER_CONTINUE = 3. SO_CLIENT_STATUS 832 . Timer change marker 1. SO_CLIENT_CLEAR_DATA public static final byte SO_CLIENT_CLEAR_DATA = 8. MEDIUM_INT_MAX public static final int MEDIUM_INT_MAX = 16777215. HEADER_SAME_SOURCE public static final byte HEADER_SAME_SOURCE = 1.9.12.?red5. SO_CLIENT_SEND_MESSAGE public static final byte SO_CLIENT_SEND_MESSAGE = 6.10.

18. Shared Object attribute deletion flag 1. TYPE_BYTES_READ 833 .Package org. SO_SET_ATTRIBUTE public static final byte SO_SET_ATTRIBUTE = 3. Send message flag 1. Client Shared Object attribute update 1.?message public static final byte SO_CLIENT_STATUS = 7. Client Shared Object data update 1. SO_CLIENT_UPDATE_DATA public static final byte SO_CLIENT_UPDATE_DATA = 4. Set Shared Object attribute flag 1.?server. TYPE_AUDIO_DATA public static final byte TYPE_AUDIO_DATA = 8.?red5.?net. SO_DISCONNECT public static final byte SO_DISCONNECT = 2. SO_CONNECT public static final byte SO_CONNECT = 1.?rtmp.19. SO_DELETE_ATTRIBUTE public static final byte SO_DELETE_ATTRIBUTE = 10. Shared Object connection 1. Shared Object disconnection 1.13.16.21. SO_SEND_MESSAGE public static final byte SO_SEND_MESSAGE = 6. Audio data marker 1.15. Shared Object status marker 1.20. SO_CLIENT_UPDATE_ATTRIBUTE public static final byte SO_CLIENT_UPDATE_ATTRIBUTE = 5.17.14.

RTMP chunk size constant 1. Client (upstream) bandwidth marker 1.24.26.23. TYPE_CLIENT_BANDWIDTH public static final byte TYPE_CLIENT_BANDWIDTH = 6. TYPE_NOTIFY public static final byte TYPE_NOTIFY = 18. TYPE_INVOKE public static final byte TYPE_INVOKE = 20. AMF3 message 1.Package org.?server. TYPE_PING public static final byte TYPE_PING = 4.27. TYPE_FLEX_SHARED_OBJECT public static final byte TYPE_FLEX_SHARED_OBJECT = 16. Invoke operation (remoting call but also used for streaming) marker 1. Notification is invocation without response 1. AMF3 shared object 1. TYPE_FLEX_STREAM_SEND public static final byte TYPE_FLEX_STREAM_SEND = 15. TYPE_FLEX_MESSAGE public static final byte TYPE_FLEX_MESSAGE = 17.?net.28. TYPE_SERVER_BANDWIDTH 834 .?rtmp. AMF3 stream send 1. TYPE_CHUNK_SIZE public static final byte TYPE_CHUNK_SIZE = 1.?red5. Ping is a stream control message.29. Send every x bytes read by both sides 1.30. has subtypes 1.?message public static final byte TYPE_BYTES_READ = 3.25.22.

Server (downstream) bandwidth marker 1.?message public static final byte TYPE_SERVER_BANDWIDTH = 5.io.?red5. org. public void setChannelId(int channelId).ObjectInput in) throws IOException.?server.?net.32. // Public Methods public Object clone().1. Synopsis public class Headerimplements. Shared Object marker 1.?red5. ClassNotFoundException. Video data marker 2. public int getSize().?rtmp.?io. public boolean equals(Object other).?Constants. public int getChannelId(). public boolean isTimerRelative(). TYPE_VIDEO_DATA public static final byte TYPE_VIDEO_DATA = 9. TYPE_STREAM_METADATA public static final byte TYPE_STREAM_METADATA = 18. public void readExternal(java.Package org.?server. public int getStreamId().33. TYPE_SHARED_OBJECT public static final byte TYPE_SHARED_OBJECT = 19. Class Header RTMP packet header 2. java.?Externaliz // Public Constructors public Header(). 835 . public int getTimer().?rtmp. Stream metadata 1.?message.?net.31. public byte getDataType().

getClass .?server.2.6. public String toString(). 2. public void setTimer(int timer). public void setTimerRelative(boolean timerRelative).Package org. Getter for data type Parameters return Data type 2. 2. notifyAll . Getter for size.?red5. } Methods inherited from java.?message public void setDataType(byte dataType).ObjectOutput out) throws IOException.5.Object: clone . getDataType() public byte getDataType(). getChannelId() public int getChannelId().?rtmp. public void setStreamId(int streamId). public void writeExternal(java. getSize() public int getSize(). 836 . Getter for channel id Parameters return Channel id 2.lang. public void setSize(int size).3. wait 2.io. equals . clone() public Object clone().?net. hashCode . finalize . equals(Object) public boolean equals(Object other).4. notify . toString .

11. getStreamId() public int getStreamId().9. setDataType(byte) public void setDataType(byte dataType).?message Parameters return Header size 2.Package org. Setter for channel id Parameters channelId Header channel id 2. Getter for timer relative flag Parameters return true if timer value is relative. getTimer() public int getTimer(). false otherwise 2. setChannelId(int) public void setChannelId(int channelId). Getter for timer Parameters return Timer 2.?red5. Setter for data type Parameters dataType Data type 837 . Getter for stream id Parameters return Stream id 2.?server.7.10.8. isTimerRelative() public boolean isTimerRelative().?net.?rtmp.

Package org. setTimer(int) public void setTimer(int timer).?red5. Setter for size Parameters size Header size 2.?Externalizable { // Protected Fields 838 . Setter for stream id Parameters streamId Stream id 2.15. Setter for timer Parameters timer Timer 2.14.?rtmp.?message 2. data and event context.12. setStreamId(int) public void setStreamId(int streamId). setTimerRelative(boolean) public void setTimerRelative(boolean timerRelative). toString() public String toString(). Class Packet RTMP packet. false otherwise 2.?server.13. java.?io. 3.16.?net. Consists of packet header.1. setSize(int) public void setSize(int size). Synopsis public class Packetimplements. 3. Setter for timer relative flag Parameters timerRelative true if timer values are relative.

protected Header header . // Public Constructors public Packet().server. public Header getHeader(). Packet(Header) public Packet(Header header).?net.event.?red5.apache.red5.IRTMPEvent event).lang.mina. equals . protected org.net.event.IRTMPEvent getMessage().red5. public void readExternal(java.io. public Packet(Header header).net. notifyAll .io.event. hashCode .ObjectInput in) throws IOException.server. toString . org. // Public Methods public org.red5. public void writeExternal(java.server.2.event.net.apache.ByteBuffer data). ClassNotFoundException. public Packet(Header header.mina.ByteBuffer getData(). finalize .server.server.common.rtmp.common. public void setData(org.mina.rtmp. Packet(Header.net. IRTMPEvent) public Packet(Header header.rtmp.net. public void setMessage(org.?rtmp. Create packet with given header and event context 839 .IRTMPEvent message .apache. } Methods inherited from java. getClass .red5.Package org.event.common. org. Create packet with given header Parameters header Packet header 3.Object: clone . wait 3.IRTMPEvent message).ByteBuffer data .?server.ObjectOutput out) throws IOException.?message protected org.IRTMPEvent event).rtmp. public org.3. notify .rtmp.red5.

Package org. getData() public org.IRTMPEvent getMessage(). message protected org.9.mina.4. Header 3. data protected org.common.apache.red5.?net.?rtmp. Getter for data Parameters return Packet data 3.apache.event.rtmp. Getter for event context Parameters return RTMP event context 840 .IRTMPEvent message .event.ByteBuffer data .red5.common. RTMP event 3.mina. getMessage() public org.server.ByteBuffer getData().?message Parameters header event RTMP header RTMP message 3.5. Packet data 3.8. Getter for header Parameters return Packet header 3.rtmp.7. header protected Header header .?red5.server.net.6. getHeader() public Header getHeader().net.?server.

log 841 .so.server. getClass . // Public Static Methods public static byte toByte(org.red5. Setter for event context Parameters message RTMP event context 4. hashCode . notify .ISharedObjectEvent. Setter for data Parameters data Packet data 3.mina.so. setMessage(IRTMPEvent) public void setMessage(org.2.Type type).Package org.?red5. Class SharedObjectTypeMapping SO event types mapping 4.red5. Synopsis public class SharedObjectTypeMapping { // Public Static Fields public static final org.slf4j.server.ISharedObjectEvent.?rtmp.IRTMPEvent message). setData(ByteBuffer) public void setData(org.event.ISharedObjectEvent.net.Logger log .10.11.Object: clone .so.?message 3.so.server. // Public Constructors public SharedObjectTypeMapping(). toString . public static org.Type[] typeMap .?server. } Methods inherited from java.apache.red5.Type type). finalize . public static String toString(org. notifyAll .common.lang. equals .server.server.rtmp.1.?net. wait 4.red5.ByteBuffer data).red5.Type toType(byte rtmpType). // Protected Fields protected static org.ISharedObjectEvent.

ISharedObjectEvent.red5.?red5.?rtmp.server. Logger 4.Package org. Convert SO event type to byte representation that RTMP uses Parameters type return Event type Byte representation of given event type 4.so.Type toType(byte rtmpType). Convert byte value of RTMP marker to event type Parameters rtmpType return RTMP marker value Corresponding Shared Object event type 842 .5.Type[] typeMap .ISharedObjectEvent.4.red5.red5.server. toType(byte) public static org.Type) public static String toString(org. toByte(ISharedObjectEvent.ISharedObjectEvent.6.slf4j.?server.so.Type type). typeMap public static final org.Type type).?message protected static org.ISharedObjectEvent.3.server.Type) public static byte toByte(org.server. String representation of type Parameters type return Type String representation of type 4. toString(ISharedObjectEvent.?net.so. Types map 4.Logger log .so.red5.

public void setDetails(String details). org. setApplication .?server.rtmp. public void setClientid(int clientid). String details. finalize .status.red5. description .?rtmp. toString . String level. setCode . STATUS . application . ClassNotFoundException.?status. Class RuntimeStatusObject Runtime status object 1. readExternal .rtmp. // Public Methods public int getClientid().1. public RuntimeStatusObject(String code.io. notifyAll . equals . public void writeExternal(java. serialize . WARNING 843 .StatusObject: additional . getClass .server. protected String details . String description).ObjectInput in) throws IOException.?StatusObject { // Protected Fields protected int clientid .1. int clientid). setLevel . getApplication . setDescription .lang. public String getDetails().io. String level. code . public void readExternal(java.red5. // Public Constructors public RuntimeStatusObject(). wait Fields inherited from org. hashCode .?red5.ObjectOutput out) throws IOException. getLevel . Synopsis public class RuntimeStatusObject extends. getCode . ERROR .?net.server. level . } Methods inherited from org. writeExternal Methods inherited from java. setAdditional .net. public RuntimeStatusObject(String code.StatusObject: asStatus . String description.status. getDescription .Object: clone . notify .net.

?status 1. int) public RuntimeStatusObject(String code.?server. String.?net.3. String details. description. RuntimeStatusObject(String. clientid protected int clientid . String. Status event details 844 .?red5. Constructs a new RuntimeStatusObject. Create runtime status object with given code. String.6. int clientid). details and client id Parameters code level description details clientid Status code Level Status event description Status event details Client id 1. 1. RuntimeStatusObject() public RuntimeStatusObject(). Create runtime status object with given code. level and description Parameters code level description Status code Level Status event description 1. RuntimeStatusObject(String. String) public RuntimeStatusObject(String code.?rtmp.Package org. details protected String details . String description). String level. String.4. String level.5. Client id 1.2. level. String description.

getDetails() public String getDetails().10.9. Getter for details Parameters return Status event details 1. Getter for client id Parameters return Client id 1. public static final String STATUS = "status". Setter for details Parameters details Status event details 2. getClientid() public int getClientid(). org. setClientid(int) public void setClientid(int clientid). setDetails(String) public void setDetails(String details).Package org.7.1. org.8.?StatusCodes.?red5.?net.?red5.?status 1.?server. Class Status Represents status object that are transferred between server and client 2.?rtmp. 845 .?net.?io.?obje // Public Static Fields public static final String ERROR = "error".?rtmp.?server. public static final String WARNING = "warning". Synopsis public class Statusimplements.?status. Setter for client id Parameters clientid Client id 1.?red5.

Serializer serializer).ObjectOutput out) throws IOException.ObjectInput in) throws IOException. public void setDescription(String description). public void setCode(String code).io. protected String details . public void setLevel(String level).object. String level. protected String code .io. public String getCode().Output output.?status // Protected Fields protected int clientid . public void writeExternal(java. public void setClientid(int clientid). public void setDetails(String details).red5.?rtmp.?server. } 846 . // Public Methods public int getClientid(). public Status(String code). org. public void setDesciption(String description). public void serialize(org. ClassNotFoundException.io. protected String level .object.red5. String description).?net. public void readExternal(java.Package org. public Status(String code. public String getDescription(). public String getDetails(). protected String description . // Public Constructors public Status().io.?red5. public String toString(). public String getLevel().

?rtmp. Creates status object with given status code Parameters code Status code 2. 847 .7.?server.?status Methods inherited from java. 2. notify . String description). equals . wait 2.6.?net. description protected String description . String.3. description and status code Parameters code level description Status code Level Description 2.Object: clone .Package org.4. Status(String. code protected String code . getClass . Constructs a new Status. String) public Status(String code.5. Creates status object with given level. String level. toString . finalize . Status code 2. clientid protected int clientid . Status(String) public Status(String code). notifyAll .?red5. hashCode .2.lang. Status() public Status(). Id of client 2.

Status event details 2. Error constant 2.8.?server.Package org. Status level 2.9.10.?rtmp. WARNING public static final String WARNING = "warning".14. getCode() public String getCode(). ERROR public static final String ERROR = "error". Parameters return Status code 848 . Warning constant 2. STATUS public static final String STATUS = "status". Status constant 2.?red5.?status Status event description 2. Getter for client id Parameters return Client id 2.12.?net.13. level protected String level .11. getClientid() public int getClientid(). Getter for status code. details protected String details .

15.red5. serialize(Output. Getter for description. 849 .io.?red5.object. Parameters return Level 2.18.?net. getDetails() public String getDetails(). getLevel() public String getLevel(). 2. org.?status 2.Package org. Parameters return Status event description.Serializer serializer). Getter for details Parameters return Status event details 2.io. Getter for level. Parameters output serializer Description copied from interface: serialize 2.17. Serializer) public void serialize(org. getDescription() public String getDescription().red5. setClientid(int) public void setClientid(int clientid).16.object.Output output.?rtmp.19.?server. Specified by: Method serialize in interface ICustomSerializable Serialize this object to the given output stream.

setDesciption(String) public void setDesciption(String description).21.?rtmp. Parameters details Status event details 2.24.Package org.?status Setter for client id Parameters clientid Client id 2. setDetails(String) public void setDetails(String details).?server. Setter for details.23.20.?red5. 850 .22. setDescription(String) public void setDescription(String description). setCode(String) public void setCode(String code).?net. Setter for description. 2. Parameters description Status event description. Setter for code Parameters code Status code 2. setLevel(String) public void setLevel(String level). Setter for desciption. Parameters description Status event description 2.

Script.AppShutdown". public static final String NS_DATA_START = "NetStream.Success".Shutdown". public static final String NC_CONNECT_APPSHUTDOWN = "NetConnection. toString() public String toString(). Descriptions provided as in FMS 2.Closed".Script.Error". public static final String NC_CONNECT_FAILED = "NetConnection. 3.Success".?net. public static final String NC_CONNECT_INVALID_APPLICATION = "NetConnection. public static final String NS_CLEAR_SUCCESS = "NetStream.1.Clear. Interface StatusCodes Collection of commonly used constants with status codes. public static final String APP_SCRIPT_WARNING = "Application.Rejected". public static final String APP_SHUTDOWN = "Application.Call.Connect. public static final String APP_RESOURCE_LOWMEMORY = "Application. Synopsis public interface StatusCodes { // Public Static Fields public static final String APP_GC = "Application.Failed".Clear.com with some minor additions and comments.?rtmp.?status Setter for level Parameters level Level 2.Start". public static final String NC_CONNECT_REJECTED = "NetConnection.1 documentation available at adobe.Connect.Connect.LowMemory".?red5. public static final String NC_CALL_FAILED = "NetConnection.Failed".Data. public static final String NS_INVALID_ARGUMENT = "NetStream. 851 .InvalidArg".Package org.Failed".GC".?server.Connect. public static final String NS_FAILED = "NetStream.Connect.Connect. 3.Warning".InvalidApp".Resource. public static final String NC_CONNECT_SUCCESS = "NetConnection.0.Call. public static final String NC_CALL_BADVERSION = "NetConnection.BadVersion".Failed". public static final String APP_SCRIPT_ERROR = "Application. public static final String NC_CONNECT_CLOSED = "NetConnection. public static final String NS_CLEAR_FAILED = "NetStream.25.

Play.BadName".Reset". public static final String NS_PLAY_START = "NetStream. public static final String NS_SEEK_FAILED = "NetStream.Package org.Publish.Play.NoReadAccess".StreamNotFound". public static final String NS_PUBLISH_BADNAME = "NetStream.Complete".PublishNotify".Failed". public static final String NS_PLAY_COMPLETE = "NetStream.Start". public static final String NS_UNPAUSE_NOTIFY = "NetStream. public static final String NS_PLAY_UNPUBLISHNOTIFY = "NetStream.Record.Play.Play.ObjectCreationFailed".Play. public static final String NS_RECORD_STOP = "NetStream.InsufficientBW". public static final String NS_PLAY_FAILED = "NetStream. public static final String SO_PERSISTENCE_MISMATCH = "SharedObject.Start".Failed". public static final String NS_RECORD_FAILED = "NetStream. public static final String NS_PLAY_STOP = "NetStream.Record.Stop".Seek.Pause.Record.Play.Play.Success".?net.?server.?red5.Notify". } 852 . public static final String NS_PLAY_NO_SUPPORTED_TRACK_FOUND = "NetStream.Play.FileStructureInvalid".Record. public static final String NS_PLAY_SWITCH = "NetStream.NoAccess". public static final String NS_SEEK_NOTIFY = "NetStream. public static final String SO_NO_WRITE_ACCESS = "SharedObject. public static final String SO_NO_READ_ACCESS = "SharedObject.Notify".Switch".NoSupportedTrackFoun public static final String NS_PLAY_PUBLISHNOTIFY = "NetStream.Notify".Publish.BadPersistence". public static final String NS_UNPUBLISHED_SUCCESS = "NetStream.Start".Play.NoWriteAccess".Seek. public static final String NS_PUBLISH_START = "NetStream.Play. public static final String NS_PLAY_RESET = "NetStream.?status public static final String NS_PAUSE_NOTIFY = "NetStream. public static final String NS_PLAY_STREAMNOTFOUND = "NetStream.Unpublish.Play. public static final String NS_PLAY_INSUFFICIENT_BW = "NetStream. public static final String NS_PLAY_FILE_STRUCTURE_INVALID = "NetStream. public static final String SO_CREATION_FAILED = "SharedObject.UnpublishNotify". public static final String NS_RECORD_NOACCESS = "NetStream.Unpause.?rtmp.Failed".Stop". public static final String NS_RECORD_START = "NetStream.Play.

If the application instance runs out of memory.6.8.Warning".?net. This provides an opportunity for the application instance to free some resources or take suitable action. APP_GC public static final String APP_GC = "Application. This information object is passed to the onAppStop handler when the application is being shut down 3. The URI specified in the NetConnection.?red5.BadVersion". In addition to the standard infoObject properties.3. In this state. APP_SCRIPT_WARNING public static final String APP_SCRIPT_WARNING = "Application.7.Package org.?status 3. APP_RESOURCE_LOWMEMORY public static final String APP_RESOURCE_LOWMEMORY = "Application.?rtmp. The ActionScript engine has encountered a runtime error.Resource. the following properties are set: filename: name of the offending ASC file. Either not supported version of AMF was used (3 when only 0 is supported) 3. linebuf: source code of the offending line 3.onAppStop event handler 3.GC".4.Error".5. lineno: line number where the error occurred. NC_CALL_BADVERSION public static final String NC_CALL_BADVERSION = "NetConnection.Script.?server.2. The ActionScript engine has encountered a runtime warning.onDisconnect event handler or the Application. In addition to the standard infoObject properties.Shutdown".Script. the server will not invoke the Application. This information object is passed to the onAppStop event handler when the application instance is about to be destroyed by the server. 'rtmp' must be specified when connecting to FMS and Red5.Call. 3.LowMemory".connect method did not specify 'rtmp' as the protocol. linebuf: source code of the offending line. the following properties are set: filename: name of the offending ASC file. APP_SHUTDOWN public static final String APP_SHUTDOWN = "Application. lineno: line number where the error occurred. APP_SCRIPT_ERROR public static final String APP_SCRIPT_ERROR = "Application. 3. The ActionScript engine is low on runtime memory. it is unloaded and all users are disconnected. NC_CALL_FAILED 853 .

or the application name specified during the connection attempt was not found on the server.Success".InvalidApp".Connect. if the application is out of memory resources and must shut down to prevent the server from crashing) or the server has shut down.16.9.Connect.15. A recorded stream failed to delete.11. NC_CONNECT_REJECTED public static final String NC_CONNECT_REJECTED = "NetConnection. NC_CONNECT_FAILED public static final String NC_CONNECT_FAILED = "NetConnection.?rtmp. NC_CONNECT_INVALID_APPLICATION public static final String NC_CONNECT_INVALID_APPLICATION = "NetConnection. The connection was closed successfully 3.14.10. 3. NC_CONNECT_SUCCESS public static final String NC_CONNECT_SUCCESS = "NetConnection.Connect. The application has been shut down (for example. 3. 3.Connect. NC_CONNECT_CLOSED public static final String NC_CONNECT_CLOSED = "NetConnection.12.Closed".Package org.?net.Rejected".?red5. 3. NS_CLEAR_SUCCESS 854 .Failed". the application expected different parameters from those that were passed. The application name specified during connect is invalid.Connect.Clear. 3.Failed". The client does not have permission to connect to the application.Failed". The NetConnection.Call. NS_CLEAR_FAILED public static final String NS_CLEAR_FAILED = "NetStream. 3.?status public static final String NC_CALL_FAILED = "NetConnection. NC_CONNECT_APPSHUTDOWN public static final String NC_CONNECT_APPSHUTDOWN = "NetConnection. The connection attempt succeeded. 3.Connect. The connection attempt failed.13.AppShutdown".call method was not able to invoke the server-side method or command.?server.

Failed".Play. A recorded stream was deleted successfully. 3.?net. NS_PLAY_FILE_STRUCTURE_INVALID public static final String NS_PLAY_FILE_STRUCTURE_INVALID = "NetStream. 3. An attempt to use a Stream method (at client-side) failed 3.Play.Pause.18.21.?status public static final String NS_CLEAR_SUCCESS = "NetStream.25. Flash Player cannot play files that have invalid file structures.?server.23.24.?rtmp. Invalid arguments were passed to a NetStream method. NS_PLAY_FAILED public static final String NS_PLAY_FAILED = "NetStream. 3. An attempt to play back a stream failed 3. Data is playing behind the normal speed 3.Failed".Success".Play. This event is sent if the player detects an MP4 with an invalid file structure. NS_PLAY_COMPLETE public static final String NS_PLAY_COMPLETE = "NetStream.?red5. NS_PLAY_NO_SUPPORTED_TRACK_FOUND 855 . 3. NS_PLAY_INSUFFICIENT_BW public static final String NS_PLAY_INSUFFICIENT_BW = "NetStream.Complete". NS_PAUSE_NOTIFY public static final String NS_PAUSE_NOTIFY = "NetStream.22.20.19.Data. NS_FAILED public static final String NS_FAILED = "NetStream.Package org. NS_DATA_START public static final String NS_DATA_START = "NetStream. The subscriber has used the seek command to move to a particular location in the recorded stream.InsufficientBW".Play. New for FMS3 3. 3.InvalidArg". NS_INVALID_ARGUMENT public static final String NS_INVALID_ARGUMENT = "NetStream. Playlist playback is complete.FileStructureInvalid".Notify".Start".Clear.17.

A playlist was reset 3.29.NoSupportedTrackFound" This event is sent if the player does not detect any supported tracks. Flash Player does not play the file. New for FMS3 3. An attempt was made to publish a stream that is already being published by someone else.?red5. NS_PUBLISH_BADNAME public static final String NS_PUBLISH_BADNAME = "NetStream.28. Playlist playback switched from one stream to another. NS_PLAY_UNPUBLISHNOTIFY public static final String NS_PLAY_UNPUBLISHNOTIFY = "NetStream.Play.Play.?server. 3.Play. audio or data tracks found.PublishNotify".Stop".?status public static final String NS_PLAY_NO_SUPPORTED_TRACK_FOUND = "NetStream.Start".32. Play was started 3.Play.UnpublishNotify".33.StreamNotFound". NS_PLAY_RESET public static final String NS_PLAY_RESET = "NetStream. An attempt was made to play a stream that does not exist 3.BadName". Play was stopped 3. This message is sent to all subscribers 3. NS_PLAY_START public static final String NS_PLAY_START = "NetStream.Publish. NS_PLAY_PUBLISHNOTIFY public static final String NS_PLAY_PUBLISHNOTIFY = "NetStream. An unpublish from a stream was successful.26.Switch". The initial publish to a stream was successful.Play.31. NS_PLAY_STOP public static final String NS_PLAY_STOP = "NetStream.?net. If there aren't any supported video.Play. 856 .Play.?rtmp.Reset". This message is sent to all subscribers 3.30.Play. NS_PLAY_SWITCH public static final String NS_PLAY_SWITCH = "NetStream. NS_PLAY_STREAMNOTFOUND public static final String NS_PLAY_STREAMNOTFOUND = "NetStream.Package org.27.

NS_SEEK_FAILED public static final String NS_SEEK_FAILED = "NetStream. NS_RECORD_NOACCESS public static final String NS_RECORD_NOACCESS = "NetStream.Failed".?server. NS_RECORD_STOP public static final String NS_RECORD_STOP = "NetStream.Record.Publish. The subscriber has used the seek command to move to a particular location in the recorded stream. An attempt to unpublish was successful 857 .Start". 3.42. NS_UNPAUSE_NOTIFY public static final String NS_UNPAUSE_NOTIFY = "NetStream.?rtmp.Unpublish. 3.?status 3.37.?red5. NS_UNPUBLISHED_SUCCESS public static final String NS_UNPUBLISHED_SUCCESS = "NetStream.Stop".Record. An attempt to publish was successful. Publishing has stopped 3. An attempt was made to record a read-only stream 3.39.Record. NS_PUBLISH_START public static final String NS_PUBLISH_START = "NetStream. An attempt to record a stream failed 3.Seek.38.40.36.Failed".Success". 3.41. NS_SEEK_NOTIFY public static final String NS_SEEK_NOTIFY = "NetStream.Package org. The stream doesn't support seeking. NS_RECORD_START public static final String NS_RECORD_START = "NetStream.Record.35. Recording was stopped 3.Unpause.?net. NS_RECORD_FAILED public static final String NS_RECORD_FAILED = "NetStream.Seek.Notify".Start".Notify".34. Recording was started 3.NoAccess".

Object> additional . protected String level . SO_PERSISTENCE_MISMATCH public static final String SO_PERSISTENCE_MISMATCH = "SharedObject.?server. protected Object application .?net.?io. SO_NO_READ_ACCESS public static final String SO_NO_READ_ACCESS = "SharedObject. org.45. 3.Package org. SO_NO_WRITE_ACCESS public static final String SO_NO_WRITE_ACCESS = "SharedObject.1. The creation of a shared object was denied.?Serializable.?red5. Synopsis public class StatusObjectimplements.NoWriteAccess". protected String code .getRemote() is different from the one used when the shared object was created.NoReadAccess". // Protected Fields protected java. 3.BadPersistence".44. SO_CREATION_FAILED public static final String SO_CREATION_FAILED = "SharedObject.?ICustomSerializab // Public Static Fields public static final String ERROR = "error". 4. java.43.?status 3.util. // Public Constructors public StatusObject().lang. public static final String STATUS = "status". Class StatusObject Status object that is sent to client with every status event 4.?io. protected String description . 858 . java.46.String.Map<java. public static final String WARNING = "warning".?object. The persistence parameter passed to SharedObject.lang. Write access to a shared object was denied. 3.?red5. Read access to a shared object was denied.ObjectCreationFailed".?rtmp.

public String getDescription().io.?net. Constructs a new StatusObject.object.?red5.2.red5. public Object getApplication(). 859 .io. public void setAdditional(String name.Serializer serializer).3. notify . } Direct known subclasses: org. hashCode . String level.Package org. public void setCode(String code).red5.?server. org. public String getLevel(). notifyAll .io.io. public void setLevel(String level). public String getCode(). asStatus() public Status asStatus(). Object value). equals . // Public Methods public Status asStatus(). public void setDescription(String description). public void readExternal(java.ObjectOutput out) throws IOException. public void serialize(org.Object: clone .Output output. toString .?rtmp.?status public StatusObject(String code.?RuntimeStatusObject Methods inherited from java.?rtmp.?net.object. 4. wait 4. String description).lang. ClassNotFoundException. StatusObject() public StatusObject(). public String toString().?server. public void writeExternal(java.ObjectInput in) throws IOException.?status. public void setApplication(Object application). getClass . finalize .?red5.

Parameters return Value for property 'application'.red5.5. Parameters return 4. Parameters return Value for property 'code'.4.?server. getCode() public String getCode().?net.8. Getter for property 'level'. Specified by: Method serialize in interface ICustomSerializable Serialize this object to the given output stream.?status Generate Status object that can be returned through a RTMP channel. 4. Getter for property 'application'.?red5. Serializer) public void serialize(org.io. 4. getApplication() public Object getApplication().io.red5. 860 . Getter for property 'code'.Output output. Parameters return Value for property 'description'.Serializer serializer). Getter for property 'description'. serialize(Output. Parameters return Value for property 'level'.Package org.object. 4.6.?rtmp.7. org.object. 4. getDescription() public String getDescription(). getLevel() public String getLevel().

?rtmp. Class StatusObjectService 861 .?server.12. Parameters application Value to set for property 'application'.?status Parameters output serializer Description copied from interface: serialize 4. Setter for property 'description'. setCode(String) public void setCode(String code).Package org. Parameters level Value to set for property 'level'. toString() public String toString(). Parameters code Value to set for property 'code'.10. 4.?red5. 4. setDescription(String) public void setDescription(String description). Setter for property 'application'. 4. 4. Setter for property 'level'. 5. setApplication(Object) public void setApplication(Object application).13. Setter for property 'code'. setLevel(String) public void setLevel(String level). Parameters description Value to set for property 'description'.11.9.?net.

apache.server.?server.io. // Public Methods public void cacheStatusObjects(). protected static org.red5.?server.Map<java. Cached status objects map 5.Object: clone .Serializer serializer). public void loadStatusObjects(). Synopsis public class StatusObjectServiceimplements.Package org. wait 5.util.ByteBuffer out.?rtmp.rtmp. public StatusObject getStatusObject(String statusCode). 5.object.StatusObject> statusObje // Public Constructors public StatusObjectService(). finalize . protected org.status.?status.?StatusCodes { // Protected Fields protected java.?red5.util. notifyAll . notify . org.Map<java. byte[]> cachedStatusObjects .3. log protected static org.?net.lang. getClass .lang. byte[]> cachedStatusObjects .object.lang.Serializer serializer .?status Service that works with status objects.slf4j.io.Map<java.String.?rtmp.1.util.String.mina. public void setSerializer(org. cachedStatusObjects protected java. StatusObject statusObject).net.?net.common.lang. } Methods inherited from java. toString .red5.Logger log .Logger log .slf4j. protected java. equals .2.?red5. hashCode .String. Logger 862 . Note all status object should aim to be under 128 bytes. org. public void initialize().red5. public byte[] getCachedStatusObjectAsByteArray(String statusCode). public void serializeStatusObject(org.

getCachedStatusObjectAsByteArray(String) public byte[] getCachedStatusObjectAsByteArray(String statusCode).object.io.7.rtmp.net.StatusObject> statusObject Status objects map 5.4. initialize() public void initialize().?net. cacheStatusObjects() public void cacheStatusObjects().util.8. org. Initialization 5.5.?rtmp.lang.red5. Serializer 5. Return status object by code as byte array Parameters statusCode return Status object code Status object with given code as byte array 5.red5.String. getStatusObject(String) public StatusObject getStatusObject(String statusCode). statusObjects protected java. loadStatusObjects() public void loadStatusObjects().9.status.Map<java. Creates all status objects and adds them to status objects map 863 .?server. Return status object by code Parameters statusCode return Status object code Status object with given code 5.?status 5.Serializer serializer .10. Cache status objects 5.Package org.server.?red5. serializer protected org.6.

?server.?status 5.red5. serializeStatusObject(ByteBuffer.apache. Setter for serializer Parameters serializer Serializer object 864 .mina. StatusObject) public void serializeStatusObject(org.Serializer serializer).common.io.?net.11. Serializes status object Parameters out statusObject Byte buffer for output object Status object to serialize 5.Package org. setSerializer(Serializer) public void setSerializer(org.?rtmp. StatusObject statusObject).ByteBuffer out.object.?red5.12.

// Public Constructors public TomcatRTMPSLoader(). getApplicationLoader . loader . removeContext . setMappings .IServer server).red5. rtmptEngine . getHost . formatPath . getClass . removeRed5ApplicationContext .LoaderBase: applicationContext .?red5.red5. server .tomcat.catalina.?net. setWebappFolder Methods inherited from java.1.?rtmpt.server. registerJMX . getRealm .server.lang. setConnector . embedded . } Methods inherited from org.TomcatLoader: addContext . // Public Methods public void init(). setApplicationLoader . setContexts . notify . servletMappings Fields inherited from org.TomcatRTMPTLoader: init .server. setRealm . Class TomcatRTMPSLoader Loader for the RTMPS server which uses Tomcat.red5. setValves .red5.Engine rtmpsEngine .rtmpt.?TomcatRTMPTLoader { // Protected Fields protected org. getEngine .tomcat. toString .red5.Object: clone .?server.TomcatRTMPTLoader: context . valves Fields inherited from org. rtmpsEngine 865 . shutdown Methods inherited from org.2. getConnector . setBaseHost . connector . setEmbedded . finalize .net. notifyAll . setHosts . getEmbedded . Synopsis public class TomcatRTMPSLoader extends.api. setRed5ApplicationContext . setConnectionProperties . red5AppCtx .red5.apache.red5. 1.server. getBaseHost . host .server. engine . getRed5ApplicationContext . webappFolder 1. setServer Methods inherited from org. public void setServer(org.net. realm . setConnectors . setApplicationContext .1. defaultSpringConfigLocation . org.rtmpt. wait Fields inherited from org.TomcatLoader: connectionProperties .LoaderBase: getApplicationContext . setHost . defaultParentContextKey . hashCode .server. equals .server.

apache. Setter for server Parameters server Value to set for property 'server'. RTMPS Tomcat engine. 866 . 1. setServer(IServer) public void setServer(org.3.4.api.IServer server).Package org.catalina.?rtmps protected org. init() public void init(). 1.server.?server.?red5.Engine rtmpsEngine .red5.?net.

util.mina.red5.util.util. public boolean isClosing(). protected final java.apache.IRTMPHandler handler .SimpleProtocolEncoder encoder .locks. protected final java. protected org.net.1.List decode(org.red5.apache. public long getReadBytes().server.?red5.ByteBuffer packet).locks.locks. public abstract org.common.apache.common. protected final java.server. Class BaseRTMPTConnection public abstract class BaseRTMPTConnection extends.ByteBuffer data). // Public Methods public void close(). public void rawWrite(org.util.locks.net.Lock notifyWrite . protected long writtenBytes . protected final java.concurrent.rtmp.ByteBuffer buffer . protected org.concurrent. // Public Constructors public BaseRTMPTConnection(String type).apache. public java.Lock notifyRead .common. protected volatile boolean closing . org.concurrent. protected java.common.common. protected long readBytes . 867 .concurrent.mina.Object> notifyMessages .ByteBuffer> pendingMessages .util.List<java.ByteBuffer getPendingMessages(int targetSize). public long getPendingMessages().mina.?net.?server.mina.lang. protected java. protected org.List<org. public void realClose().net.?rtmp.mina.util.SimpleProtocolDecoder decoder .util.protocol.red5.apache. public long getWrittenBytes().Lock pendingRead .server.protocol.?RTMPConnection { // Protected Fields protected org.Lock pendingWrite .

writtenMessages 868 . registerDeferredResult . path . write . setSchedulingService . remoteAddresses . setMaxInactivity . closeChannel .?red5. messageDropped .?net. messageReceived .?red5. registerPendingCall . // Protected Methods protected org. getReadMessages . newBroadcastStream . rawWrite .red5. getIntAttribute . log . pingInterval . getShortAttribute . messageSent . updateBytesRead .BaseConnection: basicScopes . getAttributeNames .apache. getHost . keepAliveJobName . onInactive .RTMPConnection: addClientStream . initialize . retrievePendingCall .?rtmpt. lastPingTime . getBandwidthConfigure .?RTMPTClientConnection . unregisterBasicScope Methods inherited from org.?net.?rtmpt public void write(org. scope . getClientBytesRead .?RTMPTConnection Methods inherited from org. remotePort . setAttributes Methods inherited from java. reserveStreamId . getLastPingTime . notifyAll .server. } Direct known subclasses: org. getEncoding . getId . getStreams .?server. getClass . unregisterStream . isChannelUsed . getWrittenBytes . getPendingVideoMessages .?red5. state .red5. readMessages .Object: clone . lastPongReceived . getVideoCodecFactory . getDroppedMessages . setAttribute . getBoolAttribute . streamBuffers Fields inherited from org. invokeId . sessionId .lang. getByteAttribute . hashCode .rtmp. maxInactivity . receivedBytesRead .red5. pingReceived . getReadBytes . newSingleItemSubscriberStream . toString . hasAttribute . registerStream . getSetAttribute . getStringAttribute . notifyEvent . setMaxHandshakeTimeout . droppedMessages .?rtmpt.?net. getChannel . getParentBWControllable . getConnectParams . getPendingMessages .red5.common. connect . getStreamByChannelId . equals .server. removeAttributes . org. encoding . getInvokeId . getListAttribute . getPath . getState .AttributeStore: filterNull . getAttributes . getRemoteAddress . getRemotePort . close .?server. getClient . unregisterDeferredResult .?server. startRoundTripMeasurement . getType . setBandwidthConfigure . invoke . newPlaylistSubscriberStream .net. getUsedStreamCount . closed . removeClientStream .server.red5.net. getRemoteAddresses . getLongAttribute . host .Package org. rememberStreamBufferDuration . deleteStreamById . oName . params . getWrittenMessages . getDoubleAttribute .RTMPConnection: clientId . setState . removeAttribute .red5.server.rtmp. getSessionId . writingMessage Methods inherited from org. unreserveStreamId .server. isConnected . ping . handleEvent . getMapAttribute . deferredResults . lastPingSent .mina. setup . remoteAddress . pendingCalls . registerBasicScope . setId . notify . getBasicScopes . getPendingCall . wait Fields inherited from org.rtmp.BaseConnection: dispatchEvent .Packet packet).ByteBuffer foldPendingMessages(int targetSize). getStreamById .server. createOutputStream . setPingInterval . createStreamName . getScope . getNextAvailableChannelId . finalize .message. getAttribute . type . getStreamIdForChannel . startWaitForHandshake . client .net.

pendingMessages protected java.rtmp.protocol.red5.SimpleProtocolDecoder decoder .common.9. readBytes protected long readBytes .server. closing protected volatile boolean closing .5.protocol. RTMP events handler 1.red5.mina.ByteBuffer> pendingMessages .2.?net.lang.SimpleProtocolEncoder encoder . List of notification messages 1.IRTMPHandler handler .?server.3.1.red5.Package org. decoder protected org. encoder protected org. Byte buffer 1. writtenBytes 869 .server.apache.util.apache.red5.common.List<org.net. Number of read bytes 1.?red5.List<java.server.AttributeStore: attributes 1.8.Object> notifyMessages .7.4.net. Protocol decoder 1. Protocol encoder 1. handler protected org.6. List of pending messages 1.net. notifyMessages protected java. Closing flag 1.ByteBuffer buffer .server.util. buffer protected org.mina.?rtmpt Fields inherited from org.

decode(ByteBuffer) public java. 1.?server. getPendingMessages() public long getPendingMessages(). isClosing() public boolean isClosing(). Number of written bytes 1.Package org. Getter for property 'closing'. 870 .common. Parameters data return the data to decode a list of decoded objects 1.10. getPendingMessages(int) public abstract org.?net. Decode data sent by the client.13.util.common. getWrittenBytes() public long getWrittenBytes().List decode(org. 1. 1.apache. Parameters targetSize return the size the resulting buffer should have a buffer containing the data to send or null if no messages are pending 1. Parameters return Value for property 'closing'.ByteBuffer getPendingMessages(int targetSize).ByteBuffer data).mina.?rtmpt protected long writtenBytes . getReadBytes() public long getReadBytes().16.apache.15.12. close() public void close().14.mina.11.?red5. 1. Return any pending messages up to a given size.

red5.1.lang.RTMPConnection conn.red5. org. realClose() public void realClose().?server. } Methods inherited from org.message. Send raw data down the connection.net. Synopsis public class RTMPTClient extends.mina.server.util. int port).?red5. disconnect . 871 .BaseRTMPClientHandler: connect .server. connectionClosed .18. Object in) throws Exception.lang.red5.?net.red5.Map<java.?rtmp. createStream .rtmp.?BaseRTMPClientHandler { // Public Constructors public RTMPTClient(). // Protected Methods protected void startConnector(String server.net.net.?rtmpt 1. write(Packet) public void write(org.Package org.server.ByteBuffer packet).?net. // Public Methods public java.protocol.?red5.Packet packet). connectionOpened . rawWrite(ByteBuffer) public void rawWrite(org. Real close 1.common.server. String applic public void messageReceived(org. Class RTMPTClient RTMPT client object 2.net.apache. Parameters packet the buffer containing the raw data 1.rtmp.?server.19.ProtocolState state.17.Object> makeDefaultConnectionParams(String server int port. java. Send RTMP packet down the connection. org.rtmp.String. Parameters packet the packet to send 2.

createStreamName . connectArguments .rtmp.server.net. onChunkSize . // Protected Methods protected void onInactive(). handlePendingCallResult .net.?net. publish .BaseRTMPClientHandler: codecFactory .?red5.?net.common. toString .server.red5. play . } Methods inherited from org. getState 872 . serviceProvider . closeChannel .server. isClosing . getNextAvailableChannelId .red5. setStreamEventDispatcher .red5. notifyAll .rtmp.rtmp. public void setClient(RTMPTClient handler).Object: clone . hashCode . Object in) throws Exception. Object) public void messageReceived(org. // Public Methods public org. getParentBWControllable .rtmpt.RTMPConnection conn.net. setExceptionHandler . getBandwidthConfigure . getClass . publishStreamData .BaseRTMPHandler: getHostname . finalize .server.net.?rtmpt. getEncoding . setConnectionClosedHandler . connect . getStreamId .server. notify .?BaseRTMPTConnection { // Public Constructors public RTMPTClientConnection().lang. onStreamBytesRead . sharedObjects .?rtmpt . connManager . onPing .RTMPConnection: addClientStream .?server. getId . decode . getClientBytesRead . messageReceived . handleException .BaseRTMPHandler: appCtx . serviceInvoker . Class RTMPTClientConnection public class RTMPTClientConnection extends.protocol.mina. onSharedObject . getPendingVideoMessages . getConnManager .server.red5. setServiceProvider . org. setCodecFactory .red5. log 2.BaseRTMPTConnection: close .ByteBuffer getPendingMessages(int targetSize). connectCallback . wait Fields inherited from org.red5. ProtocolState.net. foldPendingMessages . equals .?red5. messageSent . connectionParams .net. onInvoke . getReadBytes . rawWrite . invoke . org.red5. getInvokeId . createOutputStream . getPendingCall . streamEventDispatcher Fields inherited from org.Package org. getSharedObject . getPendingMessages . getWrittenBytes . getLastPingTime . setApplicationContext Methods inherited from java.ProtocolState state. write Methods inherited from org. getChannel . makeDefaultConnectionParams . messageReceived(RTMPConnection.rtmp.net.?server.rtmp.2.apache.server. deleteStreamById . 3. startConnector getCodecFactory Methods inherited from org. realClose .

receivedBytesRead . remoteAddresses . encoding . Class RTMPTConnection A RTMPT client / session.?rtmpt.?rtmpt . getStreamByChannelId . getScope . getStreams . closing .Package org. initialize .red5. registerDeferredResult . setAttribute . getDroppedMessages .?server.BaseConnection: basicScopes . type . setAttributes Methods inherited from java. getClass . setSchedulingService . equals . setMaxHandshakeTimeout . oName . getShortAttribute . getSessionId . startWaitForHandshake .rtmp. isConnected .AttributeStore: attributes 4.?server. getStringAttribute . readMessages . getLongAttribute .lang. getBoolAttribute . getVideoCodecFactory . removeClientStream . deferredResults .red5. getByteAttribute . scope . droppedMessages . handleEvent .?net. getSetAttribute . retrievePendingCall . setMaxInactivity . getAttribute .AttributeStore: filterNull . lastPingSent .red5. pendingWrite .server. streamBuffers Fields inherited from org. Synopsis public class RTMPTConnection extends. client . getPath . getBasicScopes . unregisterStream . notify .server.server. getRemoteAddresses . startRoundTripMeasurement . messageDropped . getStreamById .RTMPConnection: clientId . log . readBytes . getMapAttribute . state . notifyRead . setId . decoder .?red5. path . getUsedStreamCount . pingReceived . removeAttributes . rememberStreamBufferDuration .server. pendingCalls . notifyEvent . remoteAddress . pingInterval .net. getRemoteAddress .?net.server. writingMessage Methods inherited from org.?red5.BaseRTMPTConnection: buffer . lastPongReceived . closed . registerBasicScope . setPingInterval .red5. onInactive . unregisterBasicScope Methods inherited from org. sessionId . invokeId . notifyAll . setup . getWrittenMessages . ping . unreserveStreamId . updateBytesRead . writtenBytes Fields inherited from org. remotePort . getListAttribute . notifyMessages . newSingleItemSubscriberStream . invoke . getHost . getReadMessages . unregisterDeferredResult . registerStream . toString . getStreamIdForChannel .red5. getClient . getDoubleAttribute . getAttributes . pendingMessages .rtmpt. lastPingTime . hasAttribute . getConnectParams .red5. finalize .1. messageSent . reserveStreamId . encoder . keepAliveJobName . registerPendingCall . maxInactivity . setState . getIntAttribute . isChannelUsed . writtenMessages Fields inherited from org. messageReceived .server. org. setBandwidthConfigure .net.?BaseRTMPTConnection { // Protected Fields 873 . wait Fields inherited from org. notifyWrite . pendingRead . 4.BaseConnection: dispatchEvent . newPlaylistSubscriberStream . removeAttribute . hashCode . getAttributeNames . handler . getType . getRemotePort . params . host .Object: clone . newBroadcastStream .

messageReceived . toString . setMaxHandshakeTimeout . protected static final byte MAX_POLLING_DELAY = 32. retrievePendingCall .rtmpt.rtmp. notify . getId . foldPendingMessages . getRemotePort . decode . isClosing . setState .common.?server. getConnectParams . registerStream . getRemoteAddress . deleteStreamById .http. startWaitForHandshake . public byte getPollingDelay(). getStreamById .BaseConnection: dispatchEvent . protected volatile long noPendingMessages .apache. getPendingCall . getState . newPlaylistSubscriberStream . startRoundTripMeasurement .red5.?red5. setup . getLastPingTime . closeChannel . protected RTMPTServlet servlet . getParentBWControllable . 874 .net.Package org. getStreams . // Public Methods public org. unregisterDeferredResult . setId . connect . removeClientStream . getEncoding . getClientBytesRead . setBandwidthConfigure . realClose . onInactive . registerDeferredResult . updateBytesRead .mina. getClient . getHost . public void realClose(). setPingInterval . getDroppedMessages .?rtmpt protected static final long INCREASE_POLLING_DELAY_COUNT = 10L. protected void setServlet(RTMPTServlet servlet).BaseRTMPTConnection: close . getChannel . registerPendingCall . // Protected Methods protected void onInactive(). getStreamByChannelId .server. receivedBytesRead . setMaxInactivity . getStreamIdForChannel . messageSent .HttpServletRequest request). getReadBytes .red5. writingMessage Methods inherited from org.ByteBuffer getPendingMessages(int targetSize). rawWrite . messageDropped .servlet. protected volatile byte pollingDelay . public void setServletRequest(javax. invoke . setSchedulingService . getWrittenBytes . createOutputStream . getPendingVideoMessages . reserveStreamId .RTMPConnection: addClientStream . createStreamName . isChannelUsed .net. getBasicScopes . protected static final byte INITIAL_POLLING_DELAY = 0. getPendingMessages . } Methods inherited from org. getReadMessages .server. unregisterStream . getPath .server. write Methods inherited from org. rememberStreamBufferDuration . getUsedStreamCount .red5.?net. ping . getVideoCodecFactory . getNextAvailableChannelId . unreserveStreamId . newBroadcastStream . newSingleItemSubscriberStream . getInvokeId . getBandwidthConfigure . pingReceived . getRemoteAddresses .

hashCode . oName . equals . pendingRead . log .?rtmpt . keepAliveJobName .red5.Package org.3. notifyWrite . type . remoteAddresses . Polling delay to start with.Object: clone . setAttribute .AttributeStore: attributes 4. closing .net.net. notifyRead . getSetAttribute . pendingMessages . lastPingTime . getWrittenMessages . getAttribute . 4. streamBuffers Fields inherited from org. readMessages . writtenMessages Fields inherited from org. sessionId . getAttributes . closed . scope . remoteAddress . pendingCalls . Start to increase the polling delay after this many empty results 4.2. invokeId .rtmp. getDoubleAttribute . path . MAX_POLLING_DELAY protected static final byte MAX_POLLING_DELAY = 32.rtmpt.?net. Empty result counter. setAttributes Methods inherited from java. isConnected . finalize .BaseRTMPTConnection: buffer . 4. decoder . getStringAttribute .red5. pendingWrite .RTMPConnection: clientId .server. encoding . notifyEvent . getType . getByteAttribute .?server.red5. handler . getSessionId . getBoolAttribute . initialize . lastPingSent . host . getAttributeNames .BaseConnection: basicScopes . params . pingInterval .red5.red5. encoder .4. notifyMessages . readBytes . remotePort .5. client . registerBasicScope . INITIAL_POLLING_DELAY protected static final byte INITIAL_POLLING_DELAY = 0. getLongAttribute . getIntAttribute . notifyAll . getMapAttribute . maxInactivity . lastPongReceived .lang. removeAttribute . state . after reaching INCREASE_POLLING_DELAY_COUNT polling delay will increase 875 . writtenBytes Fields inherited from org. noPendingMessages protected volatile long noPendingMessages . getClass .server. deferredResults .server. hasAttribute .server. getShortAttribute .server.?red5. removeAttributes . handleEvent . wait Fields inherited from org. INCREASE_POLLING_DELAY_COUNT protected static final long INCREASE_POLLING_DELAY_COUNT = 10L.AttributeStore: filterNull . getListAttribute . Maximum polling delay. unregisterBasicScope getScope Methods inherited from org. droppedMessages .

?net. Parameters servlet 4. Servlet that created this connection.?red5.11.common.12. Setter for servlet request. 4.HttpServletRequest request). Polling delay value 4. setServlet(RTMPTServlet) protected void setServlet(RTMPTServlet servlet). 4.apache.9.mina. Parameters request Servlet request 876 .10. 4. onInactive() protected void onInactive().13. Return the polling delay to use.servlet.7. getPendingMessages(int) public org. Parameters return the polling delay 4. 4. getPollingDelay() public byte getPollingDelay().?rtmpt 4. Set the servlet that created the connection. setServletRequest(HttpServletRequest) public void setServletRequest(javax.http.8. realClose() public void realClose().Package org. pollingDelay protected volatile byte pollingDelay .?server.6. servlet protected RTMPTServlet servlet .ByteBuffer getPendingMessages(int targetSize).

public void messageReceived(org. hashCode . Class RTMPTHandler Handler for RTMPT messages.SimpleProtocolCodecFactory factory).red5. onChunkSize .red5.net.RMPTHandler". equals .SimpleProtocolCodecFactory getCodecFactory(). notifyAll . org. setServer .BaseRTMPHandler: appCtx 5.1. public void setCodecFactory(org.red5. statusObjectService Fields inherited from org.SimpleProtocolCodecFactory codecFactory . messageReceived .red5.Package org. // Protected Fields protected org.rtmp.server.server. } Methods inherited from org.?red5.RTMPConnection conn.?server.?red5.server.net.red5. Object in) throws Exception.protocol. getStreamId .protocol.SimpleProtocolCodecFactory codecFactory . messageSent .?rtmpt 5. onInvoke .server.net. server .2.server.server.Object: clone .ProtocolState state.protocol.rtmp.?net. setStatusObjectService Methods inherited from org. wait Fields inherited from org.BaseRTMPHandler: connectionClosed . connectionOpened .?net.net.net.RTMPHandler: getStatus .net. Protocol codec factory 877 .protocol.red5. finalize . // Public Methods public org. Synopsis public class RTMPTHandler extends.red5.red5.server.?rtmp. getClass .net. onSharedObject .server.rtmp.net. codecFactory protected org. toString .red5.RTMPHandler: log . 5.lang. setApplicationContext Methods inherited from java. onPing .server.server.net.rtmp. // Public Constructors public RTMPTHandler().?RTMPHandler { // Public Static Fields public static final String HANDLER_ATTRIBUTE = "red5.red5. getHostname .rtmp.net. invokeCall . notify .protocol. onStreamBytesRead .?server. org. handlePendingCallResult .

6.?rtmpt 5. ProtocolState.red5. Class RTMPTLoader Loader for the RTMPT server. setCodecFactory(SimpleProtocolCodecFactory) public void setCodecFactory(org. Setter for codec factory Parameters factory Codec factory to use 6.net.server.?context.Server rtmptServer .slf4j. Getter for codec factory Parameters return Codec factory 5.3.rtmp. protected static org. messageReceived(RTMPConnection.protocol.?springframework.RMPTHandler".RTMPConnection conn. Handler constant 5.SimpleProtocolCodecFactory getCodecFactory().mortbay. Synopsis public class RTMPTLoaderimplements.red5.server. protected org.4. Object in) throws Exception.IServer server .ApplicationContext applicationContext . 5. protected org.net. getCodecFactory() public org.?server.?red5. // Public Constructors public RTMPTLoader().Logger log .1. org.Package org.red5.SimpleProtocolCodecFactory factory).springframework. Object) public void messageReceived(org. HANDLER_ATTRIBUTE public static final String HANDLER_ATTRIBUTE = "red5.net.5. protected String rtmptConfig .red5.jetty.?ApplicationContextAware { // Protected Fields protected org.ProtocolState state.api.protocol.?net. 878 .red5.6.server. org.protocol.net.server.server.context.

?net.server. RTMP server 6. Initialization Exception Exception 879 .?red5. hashCode . getClass . public void setApplicationContext(org.context.IServer server). applicationContext protected org. Application context 6.lang.?rtmpt // Public Methods public void init() throws Exception.api. } Methods inherited from java.6. rtmptConfig protected String rtmptConfig . public void setServer(org.springframework.red5.?server. Red5 server instance 6.5. notify .3. wait 6. log protected static org.jetty.ApplicationContext context) throws BeansException.Package org.ApplicationContext applicationContext .springframework.7.red5.context.slf4j.server.Object: clone .4.IServer server . Logger 6.api. finalize . notifyAll . toString .Logger log .mortbay. equals .2. rtmptServer protected org. RTMP config path 6.Server rtmptServer . server protected org. init() public void init() throws Exception.

javax.?net.api.rtmp.ApplicationContext context) throws BeansException.http.net.Logger log . public void init() throws ServletException.http. // Protected Methods protected RTMPTConnection createConnection().9.?red5.context.springframework.?http.server. Class RTMPTServlet Servlet that handles all RTMPT requests.Package org.red5. Setter for server Parameters server Server instance 7. setServer(IServer) public void setServer(org.8. protected RTMPTConnection getConnection(int clientId).springframework.HttpServletRequest req). setApplicationContext(ApplicationContext) public void setApplicationContext(org. Specified by: Method setApplicationContext in interface ApplicationContextAware 6.HttpServletResponse resp) 880 .web.?server.context.?HttpServlet { // Protected Fields protected org.http. public void setHandler(RTMPTHandler handler). Synopsis public class RTMPTServlet extends.WebApplicationContext appCtx .1.server.servlet.?rtmpt 6.IRTMPConnManager rtmpConnManager). protected Integer getClientId(javax.servlet. protected static org. protected RTMPTConnection getClient(javax.red5.servlet.HttpServletRequest req). // Public Methods public void destroy(). // Public Constructors public RTMPTServlet().slf4j.?servlet. 7. public void setRtmpConnManager(org. protected void handleBadRequest(String message.IServer server). javax.

servlet. doTrace . } Methods inherited from javax.Package org.HttpServletRequest req) throws IOException. wait 881 . protected void returnMessage(String message.HttpServletResponse resp) throws IOException.servlet.http.servlet. protected void removeConnection(int clientId). notify .servlet. javax. protected void notifyClosed(RTMPTConnection conn). getLastModified .http.common. getInitParameterNames .lang.servlet. log Methods inherited from java. doOptions . getServletName . javax.http.http. javax.servlet. doPut .HttpServletResponse resp) throws ServletException.HttpServletRequest req.servlet.HttpServletResponse resp) throws IOException. doGet . toString . IOException.http.HttpServletRequest req.http.HttpServletResponse resp) throws ServletException.servlet. protected void returnMessage(RTMPTConnection client. IOException. getClass . javax. hashCode .http.servlet.?rtmpt throws IOException.servlet.ByteBuffer buffer. doHead .http.mina.HttpServletResponse resp) throws ServletException.HttpServletResponse resp) throws IOException. IOException. getServletConfig . IOException. protected void returnMessage(byte message.GenericServlet: destroy .servlet.http. javax.servlet.HttpServletResponse resp) throws ServletException.?red5.servlet.HttpServletResponse resp) throws IOException. init .Object: clone . notifyAll . IOException. javax.HttpServletRequest req. doPost . protected void skipData(javax. equals .http. protected void handleSend(javax.http.http. protected void service(javax.HttpServlet: doDelete .servlet. getServletContext . org.HttpServletRequest req.http. service Methods inherited from javax.HttpServletResponse resp) throws ServletException.servlet.servlet.servlet.http. protected void handleOpen(javax.apache.http.HttpServletRequest req.?net. javax. protected void handleIdle(javax. javax. getInitParameter . protected void handleClose(javax.?server. getServletInfo . finalize .http. javax. protected void returnPendingMessages(RTMPTConnection client.

Get the RTMPT client for a session. Web app context 7.http. Logger 7. Parameters req return Servlet request RTMP client connection 7.6.HttpServletResponse resp) throws IOException.http.slf4j.servlet. handleBadRequest(String.HttpServletRequest req). javax.?red5. getClientId(HttpServletRequest) protected Integer getClientId(javax.HttpServletRequest req).servlet. destroy() public void destroy().4. Return an error message to the client. Parameters message resp Message Servlet response 882 .5.?net. Return the client id from a url like /send/123456/12 -> 123456 Parameters req return Servlet request Client id 7.http.servlet.springframework.3.WebApplicationContext appCtx . appCtx protected org. getClient(HttpServletRequest) protected RTMPTConnection getClient(javax. HttpServletResponse) protected void handleBadRequest(String message.?rtmpt 7.?server.2. log protected static org.Package org.context.web. 7.Logger log .7.

http. handleOpen(HttpServletRequest.servlet.http.servlet. Parameters req resp ServletException Servlet request Servlet response Servlet exception IOException I/O exception 7. Parameters req resp ServletException Servlet request Servlet response Servlet exception IOException I/O exception 7.8.HttpServletRequest req.servlet.http.servlet. handleClose(HttpServletRequest.HttpServletResponse resp) throws ServletException.http.HttpServletResponse resp) throws ServletException. IOException.?server.?rtmpt IOException I/O exception 7.?net. IOException. javax. javax.servlet. HttpServletResponse) protected void handleIdle(javax.?red5.HttpServletRequest req.HttpServletRequest req.10. Start a new RTMPT session.servlet. HttpServletResponse) protected void handleClose(javax. HttpServletResponse) protected void handleOpen(javax.http.Package org. Close a RTMPT session. Parameters req resp Servlet request Servlet response 883 . Poll RTMPT session for updates. IOException.http.9.HttpServletResponse resp) throws ServletException. handleIdle(HttpServletRequest. javax.

HttpServletResponse resp) throws IOException. Parameters conn 7. HttpServletResponse) protected void returnMessage(byte message. 7. Add data for an established session.11. javax.?server.HttpServletResponse resp) throws ServletException. Parameters message resp Message Servlet response 884 .14.?rtmpt ServletException Servlet exception IOException I/O exception 7.http. handleSend(HttpServletRequest. Parameters req resp ServletException Servlet request Servlet response Servlet exception IOException I/O exception 7.Package org. notifyClosed(RTMPTConnection) protected void notifyClosed(RTMPTConnection conn).HttpServletRequest req. javax. returnMessage(byte.servlet.?net.servlet.http. HttpServletResponse) protected void handleSend(javax.servlet.13. Return a single byte to the client. A connection has been closed that was created by this servlet. init() public void init() throws ServletException. IOException.?red5.12.http.

HttpServletResponse resp) throws IOException. javax.17. org. Parameters message resp IOException Message Servlet response I/O exception 7. Parameters client buffer resp IOException RTMP connection Raw data as byte buffer Servlet response I/O exception 7. Send pending messages to client.HttpServletResponse resp) throws IOException. returnMessage(RTMPTConnection. Return raw data to the client.Package org. javax.common.ByteBuffer buffer. Parameters client resp IOException RTMP connection Servlet response I/O exception 885 .HttpServletResponse resp) throws IOException.mina. ByteBuffer. returnMessage(String.15.?server.?net. javax.http. HttpServletResponse) protected void returnMessage(String message.16.?red5.http.apache.servlet. Return a message to the client.servlet. HttpServletResponse) protected void returnPendingMessages(RTMPTConnection client.?rtmpt IOException I/O exception 7. returnPendingMessages(RTMPTConnection.http.servlet. HttpServletResponse) protected void returnMessage(RTMPTConnection client.

Parameters req IOException Servlet request I/O exception 8. skipData(HttpServletRequest) protected void skipData(javax.http. Parameters handler 7.HttpServletResponse resp) throws ServletException.lang.api.util.Engine rtmptEngine .?red5. IOException. 8.apache.?TomcatLoader { // Protected Fields protected org.19.?red5.?rtmpt 7.servlet. 886 .apache. javax.catalina. protected org.1.Map<java.catalina. setHandler(RTMPTHandler) public void setHandler(RTMPTHandler handler). Class TomcatRTMPTLoader Loader for the RTMPT server which uses Tomcat. Set the RTMPTHandler to use in this servlet.?server. Main entry point for the servlet.?net.http.20.http.Context context . protected org.servlet. protected java.server.Package org.?tomcat. Synopsis public class TomcatRTMPTLoader extends.servlet.18. Skip data sent by the client.HttpServletRequest req.?server. service(HttpServletRequest.IServer server .red5.String> servletMappings . java. Parameters req resp Request object Response object 7.String.lang. org. HttpServletResponse) protected void service(javax.HttpServletRequest req) throws IOException.

?rtmpt // Public Constructors public TomcatRTMPTLoader().apache. realm .api. equals . registerJMX .String> mappings). setValves . setConnectionProperties . valves Fields inherited from org. engine . shutdown Methods inherited from org. setApplicationContext .TomcatLoader: addContext . removeRed5ApplicationContext .?server. public void setMappings(java.catalina. connector .Map<java.lang.?net. setWebappFolder Methods inherited from java. defaultSpringConfigLocation . setApplicationLoader . setRealm .4.Engine rtmptEngine . setRed5ApplicationContext . wait Fields inherited from org.lang.Package org. java.red5.server.?net.catalina.Context context .3. removeContext .?rtmps. loader . host .?red5.TomcatLoader: connectionProperties . getEngine . formatPath .server. RTMPT Tomcat engine. defaultParentContextKey .LoaderBase: getApplicationContext . // Public Methods public void init().red5. Context. red5AppCtx .LoaderBase: applicationContext .red5. getRed5ApplicationContext . setConnector . getEmbedded . finalize . getApplicationLoader .IServer server). setConnectors . notify .server.server. setHosts .server.api.red5. setHost .tomcat. rtmptEngine protected org.String.?red5. 8. hashCode . toString . context protected org. setContexts . init .2. setBaseHost . } Direct known subclasses: org.util.?server. in terms of JEE context is web application in a servlet container 8.apache. getHost . setEmbedded . getConnector . webappFolder 8. public void setServer(org.red5. server protected org.red5. getRealm .?TomcatRTMPSLoader Methods inherited from org.tomcat.server.Object: clone . 887 . embedded . getClass .IServer server . getBaseHost . notifyAll .lang.

String.Package org. setServer(IServer) public void setServer(org.util.server.?rtmpt Server instance 8. 888 .String> servletMappings .?server.String> mappings). setMappings(Map<String. java.String.api.lang.IServer server).8.Map<java. init() public void init(). Set servlet mappings Parameters mappings 8.?net.red5.6.?red5. Setter for server Parameters server Value to set for property 'server'.Map<java. java. servletMappings protected java. 8.7.5.lang.lang.util.lang. Extra servlet mappings to add 8. String>) public void setMappings(java.

object.red5. deserializer protected org.red5.?server.net. encoder protected RTMPTProtocolEncoder encoder .SimpleProtocolEncoder getSimpleEncoder(). notifyAll . } Methods inherited from java.2.protocol. // Public Constructors public RTMPTCodecFactory().protocol.Serializer serializer).Serializer serializer .object. equals . public void setDeserializer(org. public void setSerializer(org.3. Synopsis public class RTMPTCodecFactoryimplements.object.io. public void init(). notify .?protocol.Deserializer deserializer). public org.Object: clone .Deserializer deserializer .Deserializer deserializer .?net.red5.red5.net. getClass . toString . protected RTMPTProtocolEncoder encoder .4.SimpleProtocolDecoder getSimpleDecoder().1. decoder protected RTMPTProtocolDecoder decoder .io. Class RTMPTCodecFactory RTMP codec factory creates RTMP codec objects 1.lang. wait 1.red5. Deserializer 1.server.1. RTMP decoder 1. 889 . hashCode .red5.?SimpleProtocolCodecFactor // Protected Fields protected RTMPTProtocolDecoder decoder .io.object.io.io. org. protected org.red5.?red5.object.server. protected org. // Public Methods public org. finalize .

red5.Package org.Serializer serializer .?red5.net.Deserializer deserializer). 890 . setSerializer(Serializer) public void setSerializer(org. getSimpleEncoder() public org. serializer protected org.protocol. Setter for serializer Parameters serializer Value to set for property 'serializer'. init() public void init(). Specified by: Method getSimpleEncoder in interface SimpleProtocolCodecFactory Getter for simple encoder. getSimpleDecoder() public org. 1. Setter for deserializer.protocol.7.SimpleProtocolDecoder getSimpleDecoder().10.?rtmpt.9. Class RTMPTProtocolDecoder RTMPT protocol decoder.server.8.net.?codec RTMP encoder 1. 1.?server. Parameters deserializer Deserializer used by this codec factory.object.object.io. 2.?net.red5.server.red5.SimpleProtocolEncoder getSimpleEncoder().red5. Serializer 1. To be implemeted. 1.io.6. setDeserializer(Deseria