|
Wildfire 3.2.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.wildfire.container.BasicModule org.jivesoftware.wildfire.stun.STUNService
public class STUNService
STUN Server and Service Module Provides especial Address discovery for p2p sessions to be used for media transmission and receiving of UDP packets. Especialy used for behind NAT users to ensure connectivity between parties.
Field Summary | |
---|---|
static String |
NAMESPACE
|
Constructor Summary | |
---|---|
STUNService()
Constructs a new STUN Service |
Method Summary | |
---|---|
void |
destroy()
Destroys the module. |
JID |
getAddress()
Returns the XMPP address. |
List<InetAddress> |
getAddresses()
|
XDataFormImpl |
getExtendedInfo(String name,
String node,
JID senderJID)
Returns an XDataForm with the extended information about the entity or null if none. |
Iterator<String> |
getFeatures(String name,
String node,
JID senderJID)
Returns an Iterator (of String) with the supported features. |
Iterator<org.dom4j.Element> |
getIdentities(String name,
String node,
JID senderJID)
Returns an Iterator (of Element) with the target entity's identities. |
Iterator<DiscoServerItem> |
getItems()
Returns an Iterator (of DiscoServerItem) with the items associated with the server or null if none. |
Iterator<org.dom4j.Element> |
getItems(String name,
String node,
JID senderJID)
Returns an Iterator (of Element) with the target entity's items or null if none. |
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 |
String |
getServiceDomain()
Returns the fully-qualifed domain name of this chat service. |
boolean |
hasInfo(String name,
String node,
JID senderJID)
Returns true if we can provide information related to the requested name and node. |
void |
initialize(XMPPServer server)
Initializes the basic module. |
boolean |
isEnabled()
Get if the service is enabled. |
void |
process(Packet packet)
Process an XMPP packet. |
void |
setEnabled(boolean enabled)
Set the service enable status. |
void |
start()
Starts the basic module. |
void |
startServer()
|
void |
stop()
Stops the basic module. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NAMESPACE
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 startServer()
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 Iterator<org.dom4j.Element> getItems(String name, String node, JID senderJID)
DiscoItemsProvider
getItems
in interface DiscoItemsProvider
name
- the recipient JID's name.node
- the requested disco node.senderJID
- the XMPPAddress of user that sent the disco items request.
public void process(Packet packet) throws UnauthorizedException, PacketException
ChannelHandler
process
in interface ChannelHandler
packet
- a packet to process.
UnauthorizedException
- if not allowed to process the packet.
PacketException
- thrown if the packet is malformed (results in the sender's
session being shutdown).public String getServiceDomain()
public JID getAddress()
RoutableChannelHandler
getAddress
in interface RoutableChannelHandler
public Iterator<DiscoServerItem> getItems()
ServerItemsProvider
getItems
in interface ServerItemsProvider
public Iterator<org.dom4j.Element> getIdentities(String name, String node, JID senderJID)
DiscoInfoProvider
getIdentities
in interface DiscoInfoProvider
name
- the recipient JID's name.node
- the requested disco node.senderJID
- the XMPPAddress of user that sent the disco info request.
public Iterator<String> getFeatures(String name, String node, JID senderJID)
DiscoInfoProvider
getFeatures
in interface DiscoInfoProvider
name
- the recipient JID's name.node
- the requested disco node.senderJID
- the XMPPAddress of user that sent the disco info request.
public XDataFormImpl getExtendedInfo(String name, String node, JID senderJID)
DiscoInfoProvider
getExtendedInfo
in interface DiscoInfoProvider
name
- the recipient JID's name.node
- the requested disco node.senderJID
- the XMPPAddress of user that sent the disco info request.
public boolean hasInfo(String name, String node, JID senderJID)
DiscoInfoProvider
hasInfo
in interface DiscoInfoProvider
name
- the recipient JID's name.node
- the requested disco node.senderJID
- the XMPPAddress of user that sent the disco info request.
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- boolean to enable or disablepublic int getSecondaryPort()
public int getPrimaryPort()
public String getSecondaryAddress()
public String getPrimaryAddress()
public List<InetAddress> getAddresses()
|
Wildfire 3.2.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |