设备注册

This commit is contained in:
shikong 2023-08-12 18:36:03 +08:00
parent a04e56cae4
commit cfd692dee2
2 changed files with 5 additions and 3 deletions

View File

@ -13,6 +13,10 @@ import javax.sip.message.MessageFactory;
public interface MessageProcessor {
Logger log = LoggerFactory.getLogger(MessageProcessor.class);
class Method {
public static final String REGISTER = "REGISTER";
}
void process(RequestEvent requestEvent);
default MessageFactory getMessageFactory() {

View File

@ -39,8 +39,6 @@ import java.util.Locale;
@RequiredArgsConstructor
@Component
public class RegisterRequestProcessor implements MessageProcessor {
private final static String METHOD = "REGISTER";
private final SipListener sipListener;
private final SipMessageSender sender;
private final SipConfig sipConfig;
@ -48,7 +46,7 @@ public class RegisterRequestProcessor implements MessageProcessor {
@PostConstruct
private void init(){
sipListener.addProcessor(METHOD,this);
sipListener.addProcessor(Method.REGISTER,this);
}
@SneakyThrows