|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.transport.base.AbstractTransportListener
public abstract class AbstractTransportListener
| Field Summary | |
|---|---|
protected ConfigurationContext |
cfgCtx
the axis2 configuration context |
protected AxisEngine |
engine
an axis2 engine over the above configuration context to process messages |
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 String |
transportName
the name of the transport |
protected boolean |
useAxis2ThreadPool
use the thread pool available in the axis2 configuration context |
protected WorkerPool |
workerPool
the thread pool to execute actual poll invocations |
| Fields inherited from interface org.apache.axis2.transport.TransportListener |
|---|
HOST_ADDRESS, PARAM_PORT |
| Constructor Summary | |
|---|---|
protected |
AbstractTransportListener()
A constructor that makes subclasses pick up the correct logger |
| Method Summary | |
|---|---|
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 |
long |
getBytesReceived()
|
long |
getBytesSent()
|
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 |
long |
getFaultsReceiving()
|
long |
getFaultsSending()
|
long |
getMessagesReceived()
|
long |
getMessagesSent()
|
MetricsCollector |
getMetricsCollector()
|
int |
getQueueSize()
Return the number of requests queued in the thread pool |
SessionContext |
getSessionContext(MessageContext messageContext)
|
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 |
resume()
Resume the lister - Brings the lister into active mode back from a paused state |
void |
setTransportName(String transportName)
|
void |
start()
|
protected abstract void |
startListeningForService(AxisService service)
|
void |
stop()
|
protected abstract void |
stopListeningForService(AxisService service)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.axis2.transport.TransportListener |
|---|
getEPRsForService |
| Field Detail |
|---|
protected org.apache.commons.logging.Log log
protected String transportName
protected ConfigurationContext cfgCtx
protected AxisEngine engine
protected int state
protected boolean isNonBlocking
protected WorkerPool workerPool
protected boolean useAxis2ThreadPool
protected MetricsCollector metrics
| Constructor Detail |
|---|
protected AbstractTransportListener()
| Method Detail |
|---|
public void init(ConfigurationContext cfgCtx,
TransportInDescription transportIn)
throws AxisFault
init in interface TransportListenercfgCtx - the axis configuration contexttransportIn - the transport-in description
AxisFault - on errorpublic void destroy()
destroy in interface TransportListener
public void stop()
throws AxisFault
stop in interface TransportListenerAxisFault
public void start()
throws AxisFault
start in interface TransportListenerAxisFaultpublic void disableTransportForService(AxisService service)
protected abstract void startListeningForService(AxisService service)
protected abstract void stopListeningForService(AxisService service)
public EndpointReference getEPRForService(String serviceName,
String ip)
throws AxisFault
getEPRForService in interface TransportListenerAxisFaultpublic SessionContext getSessionContext(MessageContext messageContext)
getSessionContext in interface TransportListenerpublic 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 message
AxisFault
protected void handleException(String msg,
Exception e)
throws AxisFault
AxisFault
protected void logException(String msg,
Exception e)
public String getTransportName()
public void setTransportName(String transportName)
public MetricsCollector getMetricsCollector()
public void pause()
throws AxisFault
AxisFault - on error
public void resume()
throws AxisFault
AxisFault - on error
public void maintenenceShutdown(long millis)
throws AxisFault
millis - a number of milliseconds to wait until pending requests are allowed to complete
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||