public abstract class AbstractTransportListener extends Object implements org.apache.axis2.transport.TransportListener
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.axis2.context.ConfigurationContext |
cfgCtx
the axis2 configuration context
|
protected TransportConfiguration |
config
Transport Configuration for the respective transports
|
protected boolean |
isNonBlocking
is this transport non-blocking?
|
protected org.apache.commons.logging.Log |
log
the reference to the actual commons logger to be used for log messages
|
protected MetricsCollector |
metrics
Metrics collector for this transport
|
protected int |
state
state of the listener
|
protected boolean |
useAxis2ThreadPool
use the thread pool available in the axis2 configuration context
|
protected WorkerPool |
workerPool
the thread pool to execute actual poll invocations
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTransportListener()
A constructor that makes subclasses pick up the correct logger
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.axis2.context.MessageContext |
createMessageContext()
Create a new axis MessageContext for an incoming message through this transport
|
void |
destroy() |
void |
disableTransportForService(org.apache.axis2.description.AxisService service) |
int |
getActiveThreadCount()
Returns the number of active threads processing messages
|
double |
getAvgSizeReceived() |
double |
getAvgSizeSent() |
long |
getBytesReceived() |
long |
getBytesSent() |
org.apache.axis2.context.ConfigurationContext |
getConfigurationContext() |
org.apache.axis2.addressing.EndpointReference |
getEPRForService(String serviceName,
String ip)
This is a deprecated method in Axis2 and this default implementation returns the first
result from the getEPRsForService() method
|
protected org.apache.axis2.addressing.EndpointReference[] |
getEPRsForService(String serviceName) |
org.apache.axis2.addressing.EndpointReference[] |
getEPRsForService(String serviceName,
String ip) |
long |
getFaultsReceiving() |
long |
getFaultsSending() |
long |
getLastResetTime() |
long |
getMaxSizeReceived() |
long |
getMaxSizeSent() |
long |
getMessagesReceived() |
long |
getMessagesSent() |
MetricsCollector |
getMetricsCollector() |
long |
getMetricsWindow() |
long |
getMinSizeReceived() |
long |
getMinSizeSent() |
int |
getQueueSize()
Return the number of requests queued in the thread pool
|
Map |
getResponseCodeTable() |
org.apache.axis2.context.SessionContext |
getSessionContext(org.apache.axis2.context.MessageContext messageContext) |
long |
getTimeoutsReceiving() |
long |
getTimeoutsSending() |
org.apache.axis2.description.TransportInDescription |
getTransportInDescription() |
String |
getTransportName() |
protected void |
handleException(String msg,
Exception e) |
void |
handleIncomingMessage(org.apache.axis2.context.MessageContext msgCtx,
Map trpHeaders,
String soapAction,
String contentType)
Process a new incoming message through the axis engine
|
void |
init(org.apache.axis2.context.ConfigurationContext cfgCtx,
org.apache.axis2.description.TransportInDescription transportIn)
Initialize the generic transport.
|
protected void |
logException(String msg,
Exception e) |
void |
maintenenceShutdown(long millis)
Stop processing new messages, and wait the specified maximum time for in-flight
requests to complete before a controlled shutdown for maintenence
|
void |
pause()
Pause the listener - Stop accepting/processing new messages, but continues processing existing
messages until they complete.
|
void |
resetStatistics() |
void |
resume()
Resume the lister - Brings the lister into active mode back from a paused state
|
void |
start() |
protected abstract void |
startListeningForService(org.apache.axis2.description.AxisService service) |
void |
stop() |
protected abstract void |
stopListeningForService(org.apache.axis2.description.AxisService service) |
protected org.apache.commons.logging.Log log
protected org.apache.axis2.context.ConfigurationContext cfgCtx
protected int state
protected boolean isNonBlocking
protected WorkerPool workerPool
protected boolean useAxis2ThreadPool
protected MetricsCollector metrics
protected TransportConfiguration config
protected AbstractTransportListener()
public void init(org.apache.axis2.context.ConfigurationContext cfgCtx,
org.apache.axis2.description.TransportInDescription transportIn)
throws org.apache.axis2.AxisFault
init in interface org.apache.axis2.transport.TransportListenercfgCtx - the axis configuration contexttransportIn - the transport-in descriptionorg.apache.axis2.AxisFault - on errorpublic void destroy()
destroy in interface org.apache.axis2.transport.TransportListenerpublic void stop()
throws org.apache.axis2.AxisFault
stop in interface org.apache.axis2.transport.TransportListenerorg.apache.axis2.AxisFaultpublic void start()
throws org.apache.axis2.AxisFault
start in interface org.apache.axis2.transport.TransportListenerorg.apache.axis2.AxisFaultpublic org.apache.axis2.addressing.EndpointReference[] getEPRsForService(String serviceName, String ip) throws org.apache.axis2.AxisFault
getEPRsForService in interface org.apache.axis2.transport.TransportListenerorg.apache.axis2.AxisFaultprotected org.apache.axis2.addressing.EndpointReference[] getEPRsForService(String serviceName)
public void disableTransportForService(org.apache.axis2.description.AxisService service)
protected abstract void startListeningForService(org.apache.axis2.description.AxisService service)
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFaultprotected abstract void stopListeningForService(org.apache.axis2.description.AxisService service)
public org.apache.axis2.addressing.EndpointReference getEPRForService(String serviceName, String ip) throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFaultpublic org.apache.axis2.context.SessionContext getSessionContext(org.apache.axis2.context.MessageContext messageContext)
getSessionContext in interface org.apache.axis2.transport.TransportListenerpublic org.apache.axis2.context.MessageContext createMessageContext()
public void handleIncomingMessage(org.apache.axis2.context.MessageContext msgCtx,
Map trpHeaders,
String soapAction,
String contentType)
throws org.apache.axis2.AxisFault
msgCtx - the axis MessageContexttrpHeaders - the map containing transport level message headerssoapAction - the optional soap action or nullcontentType - the optional content-type for the messageorg.apache.axis2.AxisFaultprotected void handleException(String msg, Exception e) throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFaultpublic org.apache.axis2.description.TransportInDescription getTransportInDescription()
public String getTransportName()
public org.apache.axis2.context.ConfigurationContext getConfigurationContext()
public MetricsCollector getMetricsCollector()
public void pause()
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault - on errorpublic void resume()
throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault - on errorpublic void maintenenceShutdown(long millis)
throws org.apache.axis2.AxisFault
millis - a number of milliseconds to wait until pending requests are allowed to completeorg.apache.axis2.AxisFault - on errorpublic int getActiveThreadCount()
public int getQueueSize()
public long getMessagesReceived()
public long getFaultsReceiving()
public long getBytesReceived()
public long getMessagesSent()
public long getFaultsSending()
public long getBytesSent()
public long getTimeoutsReceiving()
public long getTimeoutsSending()
public long getMinSizeReceived()
public long getMaxSizeReceived()
public double getAvgSizeReceived()
public long getMinSizeSent()
public long getMaxSizeSent()
public double getAvgSizeSent()
public Map getResponseCodeTable()
public void resetStatistics()
public long getLastResetTime()
public long getMetricsWindow()
Copyright © 2004–2017 The Apache Software Foundation. All rights reserved.