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
|
destroy
public static final String NAMESPACE
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 Iterator<DiscoItem> getItems(String name, String node, org.xmpp.packet.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(org.xmpp.packet.Packet packet) throws UnauthorizedException, PacketException
ChannelHandler
process
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()
RoutableChannelHandler
getAddress
in interface RoutableChannelHandler
public Iterator<DiscoServerItem> getItems()
ServerItemsProvider
getItems
in interface ServerItemsProvider
public Iterator<org.dom4j.Element> getIdentities(String name, String node, org.xmpp.packet.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, org.xmpp.packet.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 org.xmpp.forms.DataForm getExtendedInfo(String name, String node, org.xmpp.packet.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, org.xmpp.packet.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 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–2019 Ignite Realtime. All rights reserved.