public class ResponseFunction
extends Object
ResponseFunction: class for sending status messages to the client.
| Modifier and Type | Field | Description |
|---|---|---|
boolean |
doBreak |
| Constructor | Description |
|---|---|
ResponseFunction(IClient client) |
Create an empty ResponseFunction
|
ResponseFunction(IClient client,
AMFObj amfObj) |
Create an empty ResponseFunction
|
ResponseFunction(INetConnection netConnection) |
Create an empty ResponseFunction
|
ResponseFunction(INetConnection netConnection,
AMFObj amfObj) |
Create an empty ResponseFunction
|
ResponseFunction(IMediaStream stream,
AMFObj amfObj) |
Create an empty ResponseFunction
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addBody(AMFData body) |
Add AMFData to the body of the message.
|
void |
addBytes(byte[] inbytes) |
Add raw AMFData bytes[] to message body
|
void |
createBroadcastMessage(java.nio.ByteBuffer messageBytes) |
Create broadcast message.
|
void |
createConnectMessage(String inName,
double inResultNum) |
Create net connection connect message.
|
void |
createDefaultMessage(String inName,
double inResultNum) |
Create a default message (onStatus type messages).
|
void |
createEnhancedSeekMessage(byte[] messageBuffer,
int src,
int tc) |
|
void |
createPlayStatusMessage(String inName) |
Create onPlayStatus message.
|
void |
createSeekMessage(String inName) |
Create a seek result message.
|
void |
createSOMessage(byte[] messageBuffer,
int objectEncoding) |
Create shared object message.
|
long |
getTimecode() |
Get function timecode (milliseconds).
|
int |
getType() |
Get message type.
|
boolean |
isForceAMF0() |
|
void |
setBody(int index,
AMFData body) |
Add AMFData to the body of the message.
|
void |
setForceAMF0(boolean forceAMF0) |
|
void |
setMessageBytes(byte[] messageBytes) |
|
void |
setRetAMFNumber(int innum) |
Set the return channel id
|
void |
setSrc(int src) |
Set the src (stream id) for the message.
|
void |
setTimecode(long timecode) |
Set function timecode (milliseconds).
|
void |
setType(int type) |
Set message type.
|
int |
write(java.io.OutputStream out,
boolean isAbsTimecode,
int chunkSize) |
Write message directly to OutputStream
|
int |
write(java.io.OutputStream out,
int chunkSize) |
Write message directly to OutputStream.
|
public ResponseFunction(IClient client)
client - clientpublic ResponseFunction(IClient client, AMFObj amfObj)
client - client objectamfObj - amf objectpublic ResponseFunction(INetConnection netConnection)
netConnection - net connectionpublic ResponseFunction(INetConnection netConnection, AMFObj amfObj)
netConnection - net connectionamfObj - amf objectpublic ResponseFunction(IMediaStream stream, AMFObj amfObj)
stream - media stream objectamfObj - amf objectpublic void addBody(AMFData body)
body - AMFData messagepublic void addBytes(byte[] inbytes)
inbytes - raw AMFData bytes[]public void createBroadcastMessage(java.nio.ByteBuffer messageBytes)
messageBytes - ByteBuffer with raw AMFData bytes to be sent to clientpublic void createConnectMessage(String inName,
double inResultNum)
inName - handler name (example: connection)inResultNum - result number if 0 not a resultpublic void createDefaultMessage(String inName,
double inResultNum)
inName - handler name (example: onStatus)inResultNum - result number of 0 if not resultpublic void createEnhancedSeekMessage(byte[] messageBuffer,
int src,
int tc)
public void createPlayStatusMessage(String inName)
inName - handler name (example: onPlayStatus)public void createSeekMessage(String inName)
inName - handler name (example: onStatus)public void createSOMessage(byte[] messageBuffer,
int objectEncoding)
messageBuffer - public long getTimecode()
public int getType()
public boolean isForceAMF0()
public void setBody(int index,
AMFData body)
index - index in body listbody - AMFData messagepublic void setForceAMF0(boolean forceAMF0)
public void setMessageBytes(byte[] messageBytes)
public void setRetAMFNumber(int innum)
innum - return channel idpublic void setSrc(int src)
src - src (stream id)public void setTimecode(long timecode)
timecode - function timecode (milliseconds)public void setType(int type)
type - message typepublic int write(java.io.OutputStream out,
boolean isAbsTimecode,
int chunkSize)
out - OutputStreamisAbsTimecode - is timecode absolutepublic int write(java.io.OutputStream out,
int chunkSize)
out - OutputStream