|
Openfire 3.5.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.container.BasicModule org.jivesoftware.openfire.stun.STUNService
public class STUNService
STUN server and service module. It provides address discovery for p2p sessions to be used for media transmission and receiving of UDP packets. It's especially useful for clients behind NAT devices.
Constructor Summary | |
---|---|
STUNService()
Constructs a new STUN Service |
Method Summary | |
---|---|
void |
addExternalServer(String server,
String port)
|
void |
destroy()
Destroys the module. |
List<InetAddress> |
getAddresses()
|
List<StunServerAddress> |
getExternalServers()
|
String |
getName()
Obtain the name of the module. |
String |
getPrimaryAddress()
Get the primary Address used by the STUN server |
int |
getPrimaryPort()
Get the primary Port used by the STUN server |
String |
getSecondaryAddress()
Get the secondary Address used by the STUN server |
int |
getSecondaryPort()
Get the secondary Port used by the STUN server |
void |
initialize(XMPPServer server)
Initializes the basic module. |
boolean |
isEnabled()
Returns true if the service is enabled. |
boolean |
isLocalEnabled()
Returns true if the local STUN server is enabled. |
void |
removeExternalServer(int index)
|
void |
setEnabled(boolean enabled,
boolean localEnabled)
Set the service enable status. |
void |
setLocalEnabled(boolean enabled)
Set the Local STUN Server enable status. |
void |
start()
Starts the basic module. |
void |
stop()
Stops the basic module. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public STUNService()
Method Detail |
---|
public void destroy()
BasicModule
Destroys the module.
Does nothing in the basic module.
destroy
in interface Module
destroy
in class BasicModule
public void initialize(XMPPServer server)
BasicModule
Initializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
initialize
in interface Module
initialize
in class BasicModule
server
- the server hosting this module.public void start()
BasicModule
Starts the basic module.
Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.
start
in interface Module
start
in class BasicModule
public void stop()
BasicModule
Stops the basic module.
Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.
stop
in interface Module
stop
in class BasicModule
public String getName()
BasicModule
Obtain the name of the module.
getName
in interface Module
getName
in class BasicModule
public List<StunServerAddress> getExternalServers()
public void addExternalServer(String server, String port)
public void removeExternalServer(int index)
public boolean isEnabled()
public boolean isLocalEnabled()
public void setEnabled(boolean enabled, boolean localEnabled)
enabled
- boolean to enable or disablelocalEnabled
- local Server enable or disablepublic void setLocalEnabled(boolean enabled)
enabled
- boolean to enable or disablepublic int getSecondaryPort()
public int getPrimaryPort()
public String getSecondaryAddress()
public String getPrimaryAddress()
public List<InetAddress> getAddresses()
|
Openfire 3.5.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |