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 voiddestroy()EndpointReferencegetEPRForService(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 & IPSessionContextgetSessionContext(MessageContext messageContext)To get the sessionContext transport dependent manner.voidinit(ConfigurationContext configurationCtx, TransportInDescription transportIn)Initializing the XMPPListener.voidstart()Start a pool of Workers.voidstop()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:
initin interfaceTransportListener- Throws:
AxisFault
-
stop
public void stop()
Stop XMPP listener & disconnect from all XMPP Servers- Specified by:
stopin 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:
getEPRsForServicein 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:TransportListenerTo get the sessionContext transport dependent manner. So that transport listener can return its own implementation of session managment- Specified by:
getSessionContextin interfaceTransportListener- Parameters:
messageContext- : MessageContext which has all the relavent data- Returns:
- SessionContext
-
destroy
public void destroy()
- Specified by:
destroyin interfaceTransportListener
-
start
public void start() throws AxisFaultStart a pool of Workers. For each connection in connectionFactories, assign a packer listener. This packet listener will trigger when a message arrives.- Specified by:
startin interfaceTransportListener- Throws:
AxisFault
-
-