Package com.wowza.wms.rtp.model
Class RTPPort
- Object
-
- com.wowza.wms.rtp.model.RTPPort
-
- All Implemented Interfaces:
IUDPMessageHandler
public class RTPPort extends Object implements IUDPMessageHandler
-
-
Constructor Summary
Constructors Constructor Description RTPPort(String inIpAddress, int inPort, String outIpAddress, int outPort, boolean isMulticast)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(int direction)
Bind to portint
getAddressCount()
Get address countIRTPMessageHandler
getHandler()
Get the message handlerString
getInIpAddress()
Get in IP addressint
getInPort()
Get in portString
getOutIpAddress()
Get out IP addressint
getOutPort()
Get out portcom.wowza.wms.rtp.model.RTPTrack
getTrack()
Get RTP trackint
getTTL()
Get time to live (milliseconds)IUDPTransport
getUDPTransport()
Get the UDP transportvoid
handleMessage(java.net.SocketAddress socketAddr, Object message)
boolean
isBlockUDPOut()
boolean
isConnected()
boolean
isInMulticast()
Is in stream multicastboolean
isMulticast()
Is multicastboolean
isOutMulticast()
Is out stream multicastvoid
sendMessage(byte[] message, int offset, int len)
Send a message outvoid
sendResponse(byte[] message)
Send a responsevoid
sendResponse(byte[] message, int offset, int len)
Send responsevoid
sendResponse(byte[] message, int offset, int len, java.net.SocketAddress destination, long timecode)
Send response to destinationvoid
sessionClosed(IUDPTransportSession session)
void
sessionOpened(IUDPTransportSession session)
void
setAddressCount(int addressCount)
Set address countvoid
setBlockUDPOut(boolean blockUDPOut)
void
setHandler(IRTPMessageHandler handler)
Set the message handlervoid
setTrack(com.wowza.wms.rtp.model.RTPTrack track)
Set RTP trackvoid
setTTL(int ttl)
Set time to live (milliseconds)void
shutdown()
Shutdown portvoid
unbind()
Unbind
-
-
-
Method Detail
-
getTrack
public com.wowza.wms.rtp.model.RTPTrack getTrack()
Get RTP track- Returns:
- RTP track
-
setTrack
public void setTrack(com.wowza.wms.rtp.model.RTPTrack track)
Set RTP track- Parameters:
track
- RTP track
-
getUDPTransport
public IUDPTransport getUDPTransport()
Get the UDP transport- Returns:
- UDP transport
-
getInIpAddress
public String getInIpAddress()
Get in IP address- Returns:
- in IP address
-
getOutIpAddress
public String getOutIpAddress()
Get out IP address- Returns:
- out IP address
-
getInPort
public int getInPort()
Get in port- Returns:
- in port
-
getOutPort
public int getOutPort()
Get out port- Returns:
- out port
-
isConnected
public boolean isConnected()
-
bind
public void bind(int direction)
Bind to port- Parameters:
direction
- in or out, see IUDPTransport.DIRECTION_*
-
unbind
public void unbind()
Unbind
-
shutdown
public void shutdown()
Shutdown port
-
getHandler
public IRTPMessageHandler getHandler()
Get the message handler- Returns:
- message handler
-
setHandler
public void setHandler(IRTPMessageHandler handler)
Set the message handler- Parameters:
handler
- message handler
-
sendMessage
public void sendMessage(byte[] message, int offset, int len)
Send a message out- Parameters:
message
- messageoffset
- offsetlen
- len
-
sendResponse
public void sendResponse(byte[] message)
Send a response- Parameters:
message
- message
-
sendResponse
public void sendResponse(byte[] message, int offset, int len)
Send response- Parameters:
message
- messageoffset
- offsetlen
- len
-
sendResponse
public void sendResponse(byte[] message, int offset, int len, java.net.SocketAddress destination, long timecode)
Send response to destination- Parameters:
message
- messageoffset
- offsetlen
- lendestination
- destination address
-
sessionOpened
public void sessionOpened(IUDPTransportSession session)
- Specified by:
sessionOpened
in interfaceIUDPMessageHandler
-
sessionClosed
public void sessionClosed(IUDPTransportSession session)
- Specified by:
sessionClosed
in interfaceIUDPMessageHandler
-
handleMessage
public void handleMessage(java.net.SocketAddress socketAddr, Object message)
- Specified by:
handleMessage
in interfaceIUDPMessageHandler
-
isInMulticast
public boolean isInMulticast()
Is in stream multicast- Returns:
- true if multicast
-
isOutMulticast
public boolean isOutMulticast()
Is out stream multicast- Returns:
- true if multicast
-
isMulticast
public boolean isMulticast()
Is multicast- Returns:
- true if multicast
-
getTTL
public int getTTL()
Get time to live (milliseconds)- Returns:
- time to live (milliseconds)
-
setTTL
public void setTTL(int ttl)
Set time to live (milliseconds)- Parameters:
ttl
- time to live (milliseconds)
-
getAddressCount
public int getAddressCount()
Get address count- Returns:
- address count
-
setAddressCount
public void setAddressCount(int addressCount)
Set address count- Parameters:
addressCount
- address count
-
isBlockUDPOut
public boolean isBlockUDPOut()
-
setBlockUDPOut
public void setBlockUDPOut(boolean blockUDPOut)
-
-