Package org.apache.axis2.transport.xmpp
Class XMPPListener
- java.lang.Object
-
- org.apache.axis2.transport.xmpp.XMPPListener
-
- All Implemented Interfaces:
TransportListener
public class XMPPListener extends Object implements TransportListener
-
-
Field Summary
-
Fields inherited from interface org.apache.axis2.kernel.TransportListener
HOST_ADDRESS, PARAM_PORT
-
-
Constructor Summary
Constructors Constructor Description XMPPListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
EndpointReference
getEPRForService(String serviceName, String ip)
Returns Default EPR for a given Service name & IPEndpointReference[]
getEPRsForService(String serviceName, String ip)
Returns all EPRs for a given Service name & IPSessionContext
getSessionContext(MessageContext messageContext)
To get the sessionContext transport dependent manner.void
init(ConfigurationContext configurationCtx, TransportInDescription transportIn)
Initializing the XMPPListener.void
start()
Start a pool of Workers.void
stop()
Stop XMPP listener & disconnect from all XMPP Servers
-
-
-
Method Detail
-
init
public void init(ConfigurationContext configurationCtx, TransportInDescription transportIn) throws AxisFault
Initializing the XMPPListener. Retrieve connection details provided in xmpp transport receiver, connect to those servers & start listening in for messages.- Specified by:
init
in interfaceTransportListener
- Throws:
AxisFault
-
stop
public void stop()
Stop XMPP listener & disconnect from all XMPP Servers- Specified by:
stop
in interfaceTransportListener
-
getEPRForService
public EndpointReference getEPRForService(String serviceName, String ip) throws AxisFault
Returns Default EPR for a given Service name & IP- Parameters:
serviceName
-ip
-- Throws:
AxisFault
-
getEPRsForService
public EndpointReference[] getEPRsForService(String serviceName, String ip) throws AxisFault
Returns all EPRs for a given Service name & IP- Specified by:
getEPRsForService
in interfaceTransportListener
- Parameters:
serviceName
-ip
-- Returns:
- an array of endpoint references for the given service
- Throws:
AxisFault
-
getSessionContext
public SessionContext getSessionContext(MessageContext messageContext)
Description copied from interface:TransportListener
To get the sessionContext transport dependent manner. So that transport listener can return its own implementation of session managment- Specified by:
getSessionContext
in interfaceTransportListener
- Parameters:
messageContext
- : MessageContext which has all the relavent data- Returns:
- SessionContext
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceTransportListener
-
start
public void start() throws AxisFault
Start a pool of Workers. For each connection in connectionFactories, assign a packer listener. This packet listener will trigger when a message arrives.- Specified by:
start
in interfaceTransportListener
- Throws:
AxisFault
-
-