public abstract class AbstractTransportListener extends Object implements TransportListener
Modifier and Type | Field and Description |
---|---|
protected 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
|
HOST_ADDRESS, PARAM_PORT
Modifier | Constructor and Description |
---|---|
protected |
AbstractTransportListener()
A constructor that makes subclasses pick up the correct logger
|
Modifier and Type | Method and Description |
---|---|
MessageContext |
createMessageContext()
Create a new axis MessageContext for an incoming message through this transport
|
void |
destroy() |
void |
disableTransportForService(AxisService service) |
int |
getActiveThreadCount()
Returns the number of active threads processing messages
|
double |
getAvgSizeReceived() |
double |
getAvgSizeSent() |
long |
getBytesReceived() |
long |
getBytesSent() |
ConfigurationContext |
getConfigurationContext() |
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 EndpointReference[] |
getEPRsForService(String serviceName) |
EndpointReference[] |
getEPRsForService(String serviceName,
String ip)
Get the endpoint references for a given service.
|
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() |
SessionContext |
getSessionContext(MessageContext messageContext)
To get the sessionContext transport dependent manner.
|
long |
getTimeoutsReceiving() |
long |
getTimeoutsSending() |
TransportInDescription |
getTransportInDescription() |
String |
getTransportName() |
protected void |
handleException(String msg,
Exception e) |
void |
handleIncomingMessage(MessageContext msgCtx,
Map trpHeaders,
String soapAction,
String contentType)
Process a new incoming message through the axis engine
|
void |
init(ConfigurationContext cfgCtx,
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(AxisService service) |
void |
stop() |
protected abstract void |
stopListeningForService(AxisService service) |
protected org.apache.commons.logging.Log log
protected 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(ConfigurationContext cfgCtx, TransportInDescription transportIn) throws AxisFault
init
in interface TransportListener
cfgCtx
- the axis configuration contexttransportIn
- the transport-in descriptionAxisFault
- on errorpublic void destroy()
destroy
in interface TransportListener
public void stop() throws AxisFault
stop
in interface TransportListener
AxisFault
public void start() throws AxisFault
start
in interface TransportListener
AxisFault
public EndpointReference[] getEPRsForService(String serviceName, String ip) throws AxisFault
TransportListener
getEPRsForService
in interface TransportListener
serviceName
- TODO: this is actually not simply the service name!ip
- The host name or IP address of the local host. The implementation should use
this information instead of InetAddress.getLocalHost()
.
The value of this parameter may be null
, in which case the
implementation should use Utils.getIpAddress(
org.apache.axis2.engine.AxisConfiguration)
.AxisFault
protected EndpointReference[] getEPRsForService(String serviceName)
public void disableTransportForService(AxisService service)
protected abstract void startListeningForService(AxisService service) throws AxisFault
AxisFault
protected abstract void stopListeningForService(AxisService service)
public EndpointReference getEPRForService(String serviceName, String ip) throws AxisFault
AxisFault
public SessionContext getSessionContext(MessageContext messageContext)
TransportListener
getSessionContext
in interface TransportListener
messageContext
- : MessageContext which has all the relavent datapublic MessageContext createMessageContext()
public void handleIncomingMessage(MessageContext msgCtx, Map trpHeaders, String soapAction, String contentType) throws AxisFault
msgCtx
- the axis MessageContexttrpHeaders
- the map containing transport level message headerssoapAction
- the optional soap action or nullcontentType
- the optional content-type for the messageAxisFault
protected void handleException(String msg, Exception e) throws AxisFault
AxisFault
public TransportInDescription getTransportInDescription()
public String getTransportName()
public ConfigurationContext getConfigurationContext()
public MetricsCollector getMetricsCollector()
public void pause() throws AxisFault
AxisFault
- on errorpublic void resume() throws AxisFault
AxisFault
- on errorpublic void maintenenceShutdown(long millis) throws AxisFault
millis
- a number of milliseconds to wait until pending requests are allowed to completeAxisFault
- 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–2019 The Apache Software Foundation. All rights reserved.