Class MessageHandlerAbstract
java.lang.Object
io.github.lunasaw.sip.common.transmit.event.message.MessageHandlerAbstract
- All Implemented Interfaces:
RequestHandler
,MessageHandler
- Direct Known Subclasses:
MessageClientHandlerAbstract
,MessageServerHandlerAbstract
,NotifyServerHandlerAbstract
,SubscribeClientHandlerAbstract
-
Field Summary
Fields inherited from interface io.github.lunasaw.sip.common.transmit.event.message.MessageHandler
CONTROL, NOTIFY, QUERY, RESPONSE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription处理消息类型getDeviceSession
(javax.sip.RequestEvent event) 处理标签void
handForEvt
(javax.sip.RequestEvent event) 处理消息static String
parseRequest
(javax.sip.RequestEvent event, String charset) static <T> T
parseRequest
(javax.sip.RequestEvent event, String charset, Class<T> clazz) <T> T
void
responseAck
(javax.sip.RequestEvent event) 响应ackvoid
responseError
(javax.sip.RequestEvent event) 响应errorvoid
responseError
(javax.sip.RequestEvent event, Integer code, String error) 自定义错误回复void
当前接受到的原始消息Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.lunasaw.sip.common.transmit.event.message.MessageHandler
needResponseAck
-
Constructor Details
-
MessageHandlerAbstract
public MessageHandlerAbstract()
-
-
Method Details
-
parseRequest
-
parseRequest
-
handForEvt
public void handForEvt(javax.sip.RequestEvent event) Description copied from interface:MessageHandler
处理消息- Specified by:
handForEvt
in interfaceMessageHandler
-
getRootType
Description copied from interface:MessageHandler
处理标签- Specified by:
getRootType
in interfaceMessageHandler
- Returns:
-
getCmdType
Description copied from interface:MessageHandler
处理消息类型- Specified by:
getCmdType
in interfaceMessageHandler
- Returns:
-
setXmlStr
Description copied from interface:MessageHandler
当前接受到的原始消息- Specified by:
setXmlStr
in interfaceMessageHandler
-
getDeviceSession
-
responseAck
public void responseAck(javax.sip.RequestEvent event) Description copied from interface:MessageHandler
响应ack- Specified by:
responseAck
in interfaceMessageHandler
- Parameters:
event
- 请求事件
-
responseError
public void responseError(javax.sip.RequestEvent event) Description copied from interface:MessageHandler
响应error- Specified by:
responseError
in interfaceMessageHandler
- Parameters:
event
- 请求事件
-
responseError
Description copied from interface:MessageHandler
自定义错误回复- Specified by:
responseError
in interfaceMessageHandler
-
parseXml
-