de.humatic.dsj.src.rtmp
Class ConnectionParameter

java.lang.Object
  extended by de.humatic.dsj.src.rtmp.AMFType
      extended by de.humatic.dsj.src.rtmp.ConnectionParameter

public class ConnectionParameter
extends AMFType

Struct used when passing extended connection parameters to the RTMPSource. For example, to pass a parameter to the Source, that's typed as an AMF0 number and to be placed inside the AMF object that most standard parameters going to the connect method are encapsulated in, create a ConnectionParameter object like this:
ConnectionParameter cp = new ConnectionParameter("myCustomParameter", new Double(1), AMF.NUM, OBJECT).
Username / password, chatroom names etc. are mostly appended to said object with or without a key, so a username ConnectionParameter could be created like:
cp = new ConnectionParameter("", "testuser", AMF.STRING, APPEND)
To create a secondary object, itself holding multiple parameters, create another ConnectionParameter array
ConnectionParameter[] nested = new ConnectionParameter[2];
nested[0] = new ConnectionParameter("user", myName, AMF.STRING, ConnectionParameter.NESTED);
nested[1] = new ConnectionParameter("pw", myPw, AMF.STRING, ConnectionParameter.NESTED);
and add it to the one going into the RTMPSource's constructor:
params[x] = new ConnectionParameter("", nested, AMF.OBJECT, ConnectionParameter.APPEND);
The way parameters need to be given ultimately depends on the serverside actionscript and dsj may not be able to satisfy all requirements at the time being.


Field Summary
static int APPEND
           
static int NESTED
           
static int OBJECT
           
static int PREPEND
           
 
Constructor Summary
ConnectionParameter(java.lang.String key, java.lang.Object value, int parameterType, int flags)
           
 
Method Summary
 int getFlags()
           
 java.lang.String getKey()
           
 java.lang.String toString()
           
 
Methods inherited from class de.humatic.dsj.src.rtmp.AMFType
getEncoding, getType, getValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OBJECT

public static final int OBJECT
See Also:
Constant Field Values

APPEND

public static final int APPEND
See Also:
Constant Field Values

PREPEND

public static final int PREPEND
See Also:
Constant Field Values

NESTED

public static final int NESTED
See Also:
Constant Field Values
Constructor Detail

ConnectionParameter

public ConnectionParameter(java.lang.String key,
                           java.lang.Object value,
                           int parameterType,
                           int flags)
Method Detail

getKey

public java.lang.String getKey()

getFlags

public int getFlags()

toString

public java.lang.String toString()
Overrides:
toString in class AMFType