Package org.wso2.carbon.utils.transport
Class AbstractTransportListener
- java.lang.Object
-
- org.wso2.carbon.utils.transport.AbstractTransportListener
-
- All Implemented Interfaces:
org.apache.axis2.transport.base.ManagementSupport,org.apache.axis2.transport.TransportListener
public abstract class AbstractTransportListener extends Object implements org.apache.axis2.transport.TransportListener, org.apache.axis2.transport.base.ManagementSupport
This class will provide basic functionality to write http and https listeners for WSO2 projects.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.axis2.context.ConfigurationContextconfigurationContextprotected intportprotected intproxyPort
-
Constructor Summary
Constructors Constructor Description AbstractTransportListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()protected org.apache.axis2.addressing.EndpointReferencegenEpr(String protocol, String ip, String serviceContextPath, String serviceName)Returns the endpoint reference for a service.intgetActiveThreadCount()doublegetAvgSizeReceived()doublegetAvgSizeSent()longgetBytesReceived()longgetBytesSent()org.apache.axis2.addressing.EndpointReferencegetEPR(String protocol, String serviceName, String ip)longgetFaultsReceiving()longgetFaultsSending()longgetLastResetTime()longgetMaxSizeReceived()longgetMaxSizeSent()longgetMessagesReceived()longgetMessagesSent()longgetMetricsWindow()longgetMinSizeReceived()longgetMinSizeSent()intgetQueueSize()MapgetResponseCodeTable()org.apache.axis2.context.SessionContextgetSessionContext(org.apache.axis2.context.MessageContext messageContext)longgetTimeoutsReceiving()longgetTimeoutsSending()voidinit(org.apache.axis2.context.ConfigurationContext configContext, org.apache.axis2.description.TransportInDescription transportIn)voidmaintenenceShutdown(long l)voidpause()voidresetStatistics()voidresume()voidstart()voidstop()
-
-
-
Method Detail
-
init
public void init(org.apache.axis2.context.ConfigurationContext configContext, org.apache.axis2.description.TransportInDescription transportIn) throws org.apache.axis2.AxisFault- Specified by:
initin interfaceorg.apache.axis2.transport.TransportListener- Throws:
org.apache.axis2.AxisFault
-
start
public void start() throws org.apache.axis2.AxisFault- Specified by:
startin interfaceorg.apache.axis2.transport.TransportListener- Throws:
org.apache.axis2.AxisFault
-
stop
public void stop() throws org.apache.axis2.AxisFault- Specified by:
stopin interfaceorg.apache.axis2.transport.TransportListener- Throws:
org.apache.axis2.AxisFault
-
getEPR
public org.apache.axis2.addressing.EndpointReference getEPR(String protocol, String serviceName, String ip) throws org.apache.axis2.AxisFault
- Throws:
org.apache.axis2.AxisFault
-
getSessionContext
public org.apache.axis2.context.SessionContext getSessionContext(org.apache.axis2.context.MessageContext messageContext)
- Specified by:
getSessionContextin interfaceorg.apache.axis2.transport.TransportListener
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.apache.axis2.transport.TransportListener
-
genEpr
protected org.apache.axis2.addressing.EndpointReference genEpr(String protocol, String ip, String serviceContextPath, String serviceName) throws org.apache.axis2.AxisFault
Returns the endpoint reference for a service.- Parameters:
protocol- The protocol used eg: httpip- The IP for the serviceserviceContextPath- The context pathserviceName- The name of the service- Returns:
- The end point reference
- Throws:
org.apache.axis2.AxisFault- Thrown in case of a socket exception
-
pause
public void pause() throws org.apache.axis2.AxisFault- Specified by:
pausein interfaceorg.apache.axis2.transport.base.ManagementSupport- Throws:
org.apache.axis2.AxisFault
-
resume
public void resume() throws org.apache.axis2.AxisFault- Specified by:
resumein interfaceorg.apache.axis2.transport.base.ManagementSupport- Throws:
org.apache.axis2.AxisFault
-
maintenenceShutdown
public void maintenenceShutdown(long l) throws org.apache.axis2.AxisFault- Specified by:
maintenenceShutdownin interfaceorg.apache.axis2.transport.base.ManagementSupport- Throws:
org.apache.axis2.AxisFault
-
getActiveThreadCount
public int getActiveThreadCount()
- Specified by:
getActiveThreadCountin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getQueueSize
public int getQueueSize()
- Specified by:
getQueueSizein interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getMessagesReceived
public long getMessagesReceived()
- Specified by:
getMessagesReceivedin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getFaultsReceiving
public long getFaultsReceiving()
- Specified by:
getFaultsReceivingin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getBytesReceived
public long getBytesReceived()
- Specified by:
getBytesReceivedin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getMessagesSent
public long getMessagesSent()
- Specified by:
getMessagesSentin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getFaultsSending
public long getFaultsSending()
- Specified by:
getFaultsSendingin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getBytesSent
public long getBytesSent()
- Specified by:
getBytesSentin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getTimeoutsReceiving
public long getTimeoutsReceiving()
- Specified by:
getTimeoutsReceivingin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getTimeoutsSending
public long getTimeoutsSending()
- Specified by:
getTimeoutsSendingin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getMinSizeReceived
public long getMinSizeReceived()
- Specified by:
getMinSizeReceivedin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getMaxSizeReceived
public long getMaxSizeReceived()
- Specified by:
getMaxSizeReceivedin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getAvgSizeReceived
public double getAvgSizeReceived()
- Specified by:
getAvgSizeReceivedin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getMinSizeSent
public long getMinSizeSent()
- Specified by:
getMinSizeSentin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getMaxSizeSent
public long getMaxSizeSent()
- Specified by:
getMaxSizeSentin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getAvgSizeSent
public double getAvgSizeSent()
- Specified by:
getAvgSizeSentin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getResponseCodeTable
public Map getResponseCodeTable()
- Specified by:
getResponseCodeTablein interfaceorg.apache.axis2.transport.base.ManagementSupport
-
resetStatistics
public void resetStatistics()
- Specified by:
resetStatisticsin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getLastResetTime
public long getLastResetTime()
- Specified by:
getLastResetTimein interfaceorg.apache.axis2.transport.base.ManagementSupport
-
getMetricsWindow
public long getMetricsWindow()
- Specified by:
getMetricsWindowin interfaceorg.apache.axis2.transport.base.ManagementSupport
-
-