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

public class MessageHandlerAbstract extends Object implements MessageHandler
  • Constructor Details

    • MessageHandlerAbstract

      public MessageHandlerAbstract()
  • Method Details

    • parseRequest

      public static <T> T parseRequest(javax.sip.RequestEvent event, String charset, Class<T> clazz)
    • parseRequest

      public static String parseRequest(javax.sip.RequestEvent event, String charset)
    • handForEvt

      public void handForEvt(javax.sip.RequestEvent event)
      Description copied from interface: MessageHandler
      处理消息
      Specified by:
      handForEvt in interface MessageHandler
    • getRootType

      public String getRootType()
      Description copied from interface: MessageHandler
      处理标签
      Specified by:
      getRootType in interface MessageHandler
      Returns:
    • getCmdType

      public String getCmdType()
      Description copied from interface: MessageHandler
      处理消息类型
      Specified by:
      getCmdType in interface MessageHandler
      Returns:
    • setXmlStr

      public void setXmlStr(String xmlStr)
      Description copied from interface: MessageHandler
      当前接受到的原始消息
      Specified by:
      setXmlStr in interface MessageHandler
    • getDeviceSession

      public DeviceSession getDeviceSession(javax.sip.RequestEvent event)
    • responseAck

      public void responseAck(javax.sip.RequestEvent event)
      Description copied from interface: MessageHandler
      响应ack
      Specified by:
      responseAck in interface MessageHandler
      Parameters:
      event - 请求事件
    • responseError

      public void responseError(javax.sip.RequestEvent event)
      Description copied from interface: MessageHandler
      响应error
      Specified by:
      responseError in interface MessageHandler
      Parameters:
      event - 请求事件
    • responseError

      public void responseError(javax.sip.RequestEvent event, Integer code, String error)
      Description copied from interface: MessageHandler
      自定义错误回复
      Specified by:
      responseError in interface MessageHandler
    • parseXml

      public <T> T parseXml(Class<T> clazz)