public class Packet extends Object implements Externalizable
| Constructor and Description |
|---|
Packet() |
Packet(Header header)
Create packet with given header.
|
Packet(Header header,
IRTMPEvent event)
Create packet with given header and event context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearData()
Clears the data buffer.
|
org.apache.mina.core.buffer.IoBuffer |
getData()
Getter for data
|
long |
getExpirationTime()
Return the expiration time.
|
Header |
getHeader()
Getter for header
|
IRTMPEvent |
getMessage()
Getter for event context
|
boolean |
hasData()
Returns whether or not the packet has a data buffer.
|
boolean |
isExpired()
Returns true if expiration time has been reached and false otherwise.
|
boolean |
isProcessed()
Gets the processed flag.
|
void |
readExternal(ObjectInput in) |
void |
setData(org.apache.mina.core.buffer.IoBuffer buffer)
Setter for data
|
void |
setExpirationTime(long expirationTime)
Set the expiration time.
|
void |
setMessage(IRTMPEvent message)
Setter for event context
|
void |
setProcessed(boolean isProcessed)
Sets the processed flag.
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public Packet()
public Packet(Header header)
header - Packet headerpublic Packet(Header header, IRTMPEvent event)
header - RTMP headerevent - RTMP messagepublic Header getHeader()
public void setMessage(IRTMPEvent message)
message - RTMP event contextpublic IRTMPEvent getMessage()
public void setData(org.apache.mina.core.buffer.IoBuffer buffer)
buffer - Packet datapublic org.apache.mina.core.buffer.IoBuffer getData()
public boolean hasData()
public void clearData()
public long getExpirationTime()
public void setExpirationTime(long expirationTime)
expirationTime - new expiration time to setpublic boolean isExpired()
public void setProcessed(boolean isProcessed)
isProcessed - true if processed and false otherwisepublic boolean isProcessed()
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionCopyright © 2005–2017 Red5. All rights reserved.