|
Openfire 3.7.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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()
BasicModuleDestroys the module.
Does nothing in the basic module.
destroy in interface Moduledestroy in class BasicModulepublic void initialize(XMPPServer server)
BasicModuleInitializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
initialize in interface Moduleinitialize in class BasicModuleserver - the server hosting this module.public void start()
BasicModuleStarts the basic module.
Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.
start in interface Modulestart in class BasicModulepublic void stop()
BasicModuleStops the basic module.
Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.
stop in interface Modulestop in class BasicModulepublic String getName()
BasicModuleObtain the name of the module.
getName in interface ModulegetName in class BasicModulepublic 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.7.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||