|
Openfire 3.3.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.openfire.mediaproxy.MediaProxy
public class MediaProxy
A Media Proxy relays UDP traffic between two IPs to provide connectivity between two parties that are behind NAT devices. It also provides connectivity between two parties that are directly connected to the internet or one party on the internet and another behind a NAT.
Each connection relay between two parties is called a session. You can setup a MediaProxy for all network interfaces with an empty constructor, or bind it to a specific interface with the MediaProxy(String localhost) constructor. The media proxy ONLY works if you are directly connected to the Internet with a valid IP address..
Constructor Summary | |
---|---|
MediaProxy(String localhost)
Contruct a MediaProxy instance that will listen on a specific network interface. |
Method Summary | |
---|---|
ProxyCandidate |
addRelayAgent(String id,
String creator)
Add a new Dynamic Session to the mediaproxy WITHOUT defined IPs and ports. |
ProxyCandidate |
addRelayAgent(String id,
String creator,
String hostA,
int portA,
String hostB,
int portB)
Add a new Dynamic Session to the mediaproxy for defined IPs and ports. |
long |
getIdleTime()
Returns the max time (in millis) that a session can remain open without receiving any packets. |
long |
getLifetime()
Returns the maximum lifetime (in seconds) of a session. |
int |
getMaxPort()
Returns the maximum port value to listen for incoming packets. |
int |
getMinPort()
Returns the minimum port value to listen for incoming packets. |
String |
getPublicIP()
Get the public IP of this media proxy that listen for incomming packets. |
MediaProxySession |
getSession(String sid)
Returns a media proxy session with the specified ID. |
Collection<MediaProxySession> |
getSessions()
Returns the list of all currently active and running sessions. |
void |
sessionClosed(MediaProxySession session)
Implements Session Listener stopAgent event. |
void |
setIdleTime(long idleTime)
Sets the max time (in millis) that a session can remain open without receiving any packets. |
void |
setLifetime(long lifetime)
Sets the maximum lifetime (in seconds) of a session. |
void |
setMaxPort(int maxPort)
Sets the maximum port value to listen for incoming packets. |
void |
setMinPort(int minPort)
Sets the minimum port value to listen from incoming packets. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MediaProxy(String localhost)
localhost
- the IP of the locahost that will listen for packets.Method Detail |
---|
public String getPublicIP()
public long getIdleTime()
public void setIdleTime(long idleTime)
idleTime
- the max idle time in millis.public Collection<MediaProxySession> getSessions()
public int getMinPort()
public void setMinPort(int minPort)
minPort
- the minimum port value.public int getMaxPort()
public void setMaxPort(int maxPort)
maxPort
- the maximun port value.public long getLifetime()
public void setLifetime(long lifetime)
lifetime
- the max lifetime of a session (in seconds).public MediaProxySession getSession(String sid)
sid
- the session ID.
public void sessionClosed(MediaProxySession session)
sessionClosed
in interface SessionListener
session
- the session that stoppedpublic ProxyCandidate addRelayAgent(String id, String creator, String hostA, int portA, String hostB, int portB)
id
- id of the candidate returned (Could be a Jingle session ID)creator
- the agent creator name or descriptionhostA
- the hostname or IP of the point A of the ChannelportA
- the port number point A of the ChannelhostB
- the hostname or IP of the point B of the ChannelportB
- the port number point B of the Channel
public ProxyCandidate addRelayAgent(String id, String creator)
id
- id of the candidate returned (Could be a Jingle session ID)creator
- the agent creator name or description
|
Openfire 3.3.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |