Class DefaultSipListener
java.lang.Object
io.github.lunasaw.sip.common.transmit.AbstractSipListener
io.github.lunasaw.sip.common.transmit.AsyncSipListener
io.github.lunasaw.sip.common.transmit.DefaultSipListener
- All Implemented Interfaces:
EventListener
,javax.sip.SipListener
默认SIP监听器
继承AsyncSipListener,使用Spring传入的线程池
作为Spring管理的Bean,支持依赖注入和配置管理
- Author:
- luna
-
Field Summary
Fields inherited from class io.github.lunasaw.sip.common.transmit.AbstractSipListener
REQUEST_PROCESSOR_MAP, RESPONSE_PROCESSOR_MAP, sipMetrics, TIMEOUT_PROCESSOR_MAP
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSipListener
(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor messageExecutor, SipMetrics sipMetrics) 构造函数 使用Spring传入的线程池和SIP指标收集器 -
Method Summary
Modifier and TypeMethodDescription获取默认监听器统计信息void
setMessageExecutor
(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor messageExecutor) 设置消息执行器 覆盖父类的本地线程池,使用Spring管理的线程池Methods inherited from class io.github.lunasaw.sip.common.transmit.AsyncSipListener
createDefaultThreadPool, destroy, processDialogTerminated, processIOException, processRequest, processResponse, processTimeout, processTransactionTerminated
Methods inherited from class io.github.lunasaw.sip.common.transmit.AbstractSipListener
addRequestProcessor, addResponseProcessor, addTimeoutProcessor, getRequestProcessors, getResponseProcessors, getTimeoutProcessors, handleIOException, handleRequestException, handleResponseException, handleUnsupportedRequest, removeRequestProcessor, removeResponseProcessor, removeTimeoutProcessor, shouldCreateTransaction
-
Constructor Details
-
DefaultSipListener
public DefaultSipListener(@Qualifier("sipMessageProcessor") org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor messageExecutor, SipMetrics sipMetrics) 构造函数 使用Spring传入的线程池和SIP指标收集器- Parameters:
messageExecutor
- Spring管理的线程池执行器sipMetrics
- SIP指标收集器
-
-
Method Details
-
setMessageExecutor
public void setMessageExecutor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor messageExecutor) 设置消息执行器 覆盖父类的本地线程池,使用Spring管理的线程池- Parameters:
messageExecutor
- Spring管理的线程池执行器
-
getProcessorStats
获取默认监听器统计信息- Overrides:
getProcessorStats
in classAsyncSipListener
- Returns:
- 统计信息
-