public class MediaProxyService extends BasicModule implements ServerItemsProvider, RoutableChannelHandler, DiscoInfoProvider, DiscoItemsProvider
| Constructor and Description |
|---|
MediaProxyService()
Constructs a new MediaProxyService.
|
| Modifier and Type | Method and Description |
|---|---|
org.xmpp.packet.JID |
getAddress()
Returns the XMPP address.
|
Collection<MediaProxySession> |
getAgents()
Return the list of active Agents
|
int |
getEchoPort()
Get the Port used to the UDP Echo Test
|
org.xmpp.forms.DataForm |
getExtendedInfo(String name,
String node,
org.xmpp.packet.JID senderJID)
Returns an XDataForm with the extended information about the entity or null if none.
|
Iterator<String> |
getFeatures(String name,
String node,
org.xmpp.packet.JID senderJID)
Returns an Iterator (of String) with the supported features.
|
Iterator<org.dom4j.Element> |
getIdentities(String name,
String node,
org.xmpp.packet.JID senderJID)
Returns an Iterator (of Element) with the target entity's identities.
|
long |
getIdleTime()
Returns the maximum amount of time (in milleseconds) that a session can
be idle before it's closed.
|
Iterator<DiscoServerItem> |
getItems()
Returns an Iterator (of DiscoServerItem) with the items associated with the server or null
if none.
|
Iterator<DiscoItem> |
getItems(String name,
String node,
org.xmpp.packet.JID senderJID)
Returns an Iterator (of DiscoItem) with the target entity's items or null if none.
|
long |
getLifetime()
Get the Life Time of Sessions
|
int |
getMaxPort()
Get Maximum port value to listen from incoming packets.
|
int |
getMinPort()
Get Minimal port value to listen from incoming packets.
|
String |
getName()
Obtain the name of the module.
|
String |
getServiceDomain()
Returns the fully-qualifed domain name of this chat service.
|
boolean |
hasInfo(String name,
String node,
org.xmpp.packet.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(org.xmpp.packet.Packet packet)
Process an XMPP packet.
|
void |
setEchoPort(int echoPort)
Set the Port used to the UDP Echo Test
|
void |
setEnabled(boolean enabled)
Set the service enable status.
|
void |
setKeepAliveDelay(long delay)
Set the keep alive delay of the mediaproxy agents.
|
void |
setLifetime(long lifetime)
Set the Life time of Sessions
|
void |
setMaxPort(int maxPort)
Set Maximum port value to listen for incoming packets.
|
void |
setMinPort(int minPort)
Set Minimal port value to listen for incoming packets.
|
void |
start()
Starts the basic module.
|
void |
stop()
Stops the basic module.
|
void |
stopAgents()
Stops every running agents
|
destroypublic static final String NAMESPACE
public 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 Iterator<DiscoItem> getItems(String name, String node, org.xmpp.packet.JID senderJID)
DiscoItemsProvidergetItems in interface DiscoItemsProvidername - the recipient JID's name.node - the requested disco node.senderJID - the XMPPAddress of user that sent the disco items request.public void process(org.xmpp.packet.Packet packet)
throws UnauthorizedException,
PacketException
ChannelHandlerprocess in interface ChannelHandler<org.xmpp.packet.Packet>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 org.xmpp.packet.JID getAddress()
RoutableChannelHandlergetAddress in interface RoutableChannelHandlerpublic Iterator<DiscoServerItem> getItems()
ServerItemsProvidergetItems in interface ServerItemsProviderpublic Iterator<org.dom4j.Element> getIdentities(String name, String node, org.xmpp.packet.JID senderJID)
DiscoInfoProvidergetIdentities in interface DiscoInfoProvidername - 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, org.xmpp.packet.JID senderJID)
DiscoInfoProvidergetFeatures in interface DiscoInfoProvidername - the recipient JID's name.node - the requested disco node.senderJID - the XMPPAddress of user that sent the disco info request.public org.xmpp.forms.DataForm getExtendedInfo(String name, String node, org.xmpp.packet.JID senderJID)
DiscoInfoProvidergetExtendedInfo in interface DiscoInfoProvidername - 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, org.xmpp.packet.JID senderJID)
DiscoInfoProviderhasInfo in interface DiscoInfoProvidername - the recipient JID's name.node - the requested disco node.senderJID - the XMPPAddress of user that sent the disco info request.public Collection<MediaProxySession> getAgents()
public void setKeepAliveDelay(long delay)
delay - time in millispublic long getIdleTime()
public void setMinPort(int minPort)
minPort - port value to listen for incoming packetspublic void setMaxPort(int maxPort)
maxPort - port value to listen for incoming packetspublic int getMinPort()
public int getMaxPort()
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - boolean value setting enabled or disabledpublic void stopAgents()
public long getLifetime()
public void setLifetime(long lifetime)
lifetime - lifetime in secondspublic int getEchoPort()
public void setEchoPort(int echoPort)
echoPort - port numberCopyright © 2003-2008 Jive Software.