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
FieldsModifier and TypeFieldDescriptionprotected org.apache.axis2.context.ConfigurationContextprotected intprotected intFields inherited from interface org.apache.axis2.transport.TransportListener
HOST_ADDRESS, PARAM_PORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()protected org.apache.axis2.addressing.EndpointReferenceReturns the endpoint reference for a service.intdoubledoublelonglongorg.apache.axis2.addressing.EndpointReferencelonglonglonglonglonglonglonglonglonglongintorg.apache.axis2.context.SessionContextgetSessionContext(org.apache.axis2.context.MessageContext messageContext) longlongvoidinit(org.apache.axis2.context.ConfigurationContext configContext, org.apache.axis2.description.TransportInDescription transportIn) voidmaintenenceShutdown(long l) voidpause()voidvoidresume()voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.axis2.transport.TransportListener
getEPRForService, getEPRsForService
-
Field Details
-
configurationContext
protected org.apache.axis2.context.ConfigurationContext configurationContext -
port
protected int port -
proxyPort
protected int proxyPort
-
-
Constructor Details
-
AbstractTransportListener
public AbstractTransportListener()
-
-
Method Details
-
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
- 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
-