Class NhttpMetricsCollector
- java.lang.Object
-
- org.apache.axis2.transport.base.MetricsCollector
-
- org.apache.synapse.transport.nhttp.util.NhttpMetricsCollector
-
public class NhttpMetricsCollector extends org.apache.axis2.transport.base.MetricsCollectorThis simple extension of the Axis2 transport MetricsCollector implementation, maintains a ConnectionsView instance, which is updated based on the events fired by the NHTTP transport implementation. In addition to the usual events handled by the Axis2 MetricsCollector, this implementation handles two new events:
- connected (this should get called whenever a new connection is created)
- disconnected (this should get called whenever an existing connection is closed)
These new events are used to update the ConnectionsView at runtime.
-
-
Constructor Summary
Constructors Constructor Description NhttpMetricsCollector(boolean listener, String schemeName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnected()voiddestroy()voiddisconnected()intgetActiveConnectionCount()voidnotifyReceivedMessageSize(long l)voidnotifySentMessageSize(long l)voidsetConnectionsPerHosts(Map<String,AtomicInteger> activeConnectionsPerHost)-
Methods inherited from class org.apache.axis2.transport.base.MetricsCollector
getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getFaultsReceiving, getFaultsSending, getLastResetTime, getLevel, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMinSizeReceived, getMinSizeSent, getResponseCodeTable, getTimeoutsReceiving, getTimeoutsSending, incrementBytesReceived, incrementBytesReceived, incrementBytesSent, incrementBytesSent, incrementFaultsReceiving, incrementFaultsReceiving, incrementFaultsSending, incrementFaultsSending, incrementMessagesReceived, incrementMessagesReceived, incrementMessagesSent, incrementMessagesSent, incrementTimeoutsReceiving, incrementTimeoutsReceiving, incrementTimeoutsSending, incrementTimeoutsSending, notifyReceivedMessageSize, notifySentMessageSize, reportResponseCode, reportResponseCode, reset, setLevel
-
-
-
-
Constructor Detail
-
NhttpMetricsCollector
public NhttpMetricsCollector(boolean listener, String schemeName)
-
-
Method Detail
-
destroy
public void destroy()
-
connected
public void connected()
-
disconnected
public void disconnected()
-
notifyReceivedMessageSize
public void notifyReceivedMessageSize(long l)
- Overrides:
notifyReceivedMessageSizein classorg.apache.axis2.transport.base.MetricsCollector
-
notifySentMessageSize
public void notifySentMessageSize(long l)
- Overrides:
notifySentMessageSizein classorg.apache.axis2.transport.base.MetricsCollector
-
setConnectionsPerHosts
public void setConnectionsPerHosts(Map<String,AtomicInteger> activeConnectionsPerHost)
-
getActiveConnectionCount
public int getActiveConnectionCount()
-
-