|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.neomedia.RTPConnectorOutputStream
public abstract class RTPConnectorOutputStream
| Field Summary | |
|---|---|
static int |
MAX_PACKETS_PER_MILLIS_POLICY_PACKET_QUEUE_CAPACITY
The maximum number of packets to be sent to be kept in the queue of MaxPacketsPerMillisPolicy. |
protected List<InetSocketAddress> |
targets
Stream targets' IP addresses and ports. |
| Constructor Summary | |
|---|---|
RTPConnectorOutputStream()
Initializes a new RTPConnectorOutputStream which is to send packet data out through a specific socket. |
|
| Method Summary | |
|---|---|
void |
addTarget(InetAddress remoteAddr,
int remotePort)
Add a target to stream targets list |
void |
close()
Close this output stream. |
protected RawPacket |
createRawPacket(byte[] buffer,
int offset,
int length)
Creates a new RawPacket from a specific byte[] buffer in order to have this instance send its packet data through its write(byte[], int, int) method. |
protected abstract void |
doLogPacket(RawPacket packet,
InetSocketAddress target)
Logs a specific RawPacket associated with a specific remote address. |
protected abstract boolean |
isSocketValid()
Returns whether or not this RTPConnectorOutputStream has a valid socket. |
(package private) static boolean |
logPacket(long numOfPacket)
Determines whether a RawPacket which has a specific number in the total number of sent RawPackets is to be logged by PacketLoggingService. |
boolean |
removeTarget(InetAddress remoteAddr,
int remotePort)
Remove a target from stream targets list |
void |
removeTargets()
Remove all stream targets from this session. |
protected abstract void |
sendToTarget(RawPacket packet,
InetSocketAddress target)
Sends a specific RawPacket through this OutputDataStream to a specific InetSocketAddress. |
void |
setMaxPacketsPerMillis(int maxPackets,
long perMillis)
Sets the maximum number of RTP packets to be sent by this OutputDataStream through its DatagramSocket per a specific number of milliseconds. |
void |
setPriority(int priority)
Changes current thread priority. |
int |
write(byte[] buffer,
int offset,
int length)
Implements OutputDataStream.write(byte[], int, int). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_PACKETS_PER_MILLIS_POLICY_PACKET_QUEUE_CAPACITY
protected final List<InetSocketAddress> targets
| Constructor Detail |
|---|
public RTPConnectorOutputStream()
| Method Detail |
|---|
public void addTarget(InetAddress remoteAddr,
int remotePort)
remoteAddr - target ip addressremotePort - target portpublic void close()
protected RawPacket createRawPacket(byte[] buffer,
int offset,
int length)
write(byte[], int, int) method. Allows extenders to intercept
the packet data and possibly filter and/or modify it.
buffer - the packet data to be sent to the targets of this instanceoffset - the offset of the packet data in bufferlength - the length of the packet data in buffer
write(byte[], int, int) method
public boolean removeTarget(InetAddress remoteAddr,
int remotePort)
remoteAddr - target ip addressremotePort - target port
public void removeTargets()
static boolean logPacket(long numOfPacket)
PacketLoggingService.
numOfPacket - the number of the RawPacket in the total
number of sent RawPackets
protected abstract void sendToTarget(RawPacket packet,
InetSocketAddress target)
throws IOException
packet - the RawPacket to send through this
OutputDataStream to the specified targettarget - the InetSocketAddress to which the specified
packet is to be sent through this OutputDataStream
IOException - if anything goes wrong while sending the specified
packet through this OutputDataStream to the specified
target
protected abstract void doLogPacket(RawPacket packet,
InetSocketAddress target)
packet - packet to logtarget - the remote address associated with the packetprotected abstract boolean isSocketValid()
public void setMaxPacketsPerMillis(int maxPackets,
long perMillis)
maxPackets - the maximum number of RTP packets to be sent by this
OutputDataStream through its DatagramSocket per the
specified number of milliseconds; -1 if no maximum is to be setperMillis - the number of milliseconds per which maxPackets
are to be sent by this OutputDataStream through its
DatagramSocket
public int write(byte[] buffer,
int offset,
int length)
OutputDataStream.write(byte[], int, int).
write in interface javax.media.rtp.OutputDataStreambuffer - the byte[] that we'd like to copy the content
of the packet to.offset - the position where we are supposed to start writing in
buffer.length - the number of bytes available for writing in
inBuffer.
public void setPriority(int priority)
priority - the new priority.
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||