Commit 7f0ca858504e37a2cb597a7b3010068130dc1321

Authored by 648540858
1 parent ff3c30f3

规范代码写法

src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java
... ... @@ -8,6 +8,7 @@ import org.slf4j.Logger;
8 8 import org.slf4j.LoggerFactory;
9 9 import org.springframework.beans.factory.annotation.Autowired;
10 10 import org.springframework.context.annotation.Bean;
  11 +import org.springframework.context.annotation.Configuration;
11 12 import org.springframework.context.annotation.DependsOn;
12 13 import org.springframework.stereotype.Component;
13 14  
... ... @@ -18,7 +19,7 @@ import java.util.concurrent.LinkedBlockingQueue;
18 19 import java.util.concurrent.ThreadPoolExecutor;
19 20 import java.util.concurrent.TimeUnit;
20 21  
21   -@Component
  22 +@Configuration
22 23 public class SipLayer{
23 24  
24 25 private final static Logger logger = LoggerFactory.getLogger(SipLayer.class);
... ... @@ -35,7 +36,7 @@ public class SipLayer{
35 36  
36 37  
37 38 @Bean("sipFactory")
38   - private SipFactory createSipFactory() {
  39 + SipFactory createSipFactory() {
39 40 sipFactory = SipFactory.getInstance();
40 41 sipFactory.setPathName("gov.nist");
41 42 return sipFactory;
... ... @@ -43,7 +44,7 @@ public class SipLayer{
43 44  
44 45 @Bean("sipStack")
45 46 @DependsOn({"sipFactory"})
46   - private SipStack createSipStack() throws PeerUnavailableException {
  47 + SipStack createSipStack() throws PeerUnavailableException {
47 48 Properties properties = new Properties();
48 49 properties.setProperty("javax.sip.STACK_NAME", "GB28181_SIP");
49 50 properties.setProperty("javax.sip.IP_ADDRESS", sipConfig.getMonitorIp());
... ... @@ -64,7 +65,7 @@ public class SipLayer{
64 65  
65 66 @Bean(name = "tcpSipProvider")
66 67 @DependsOn("sipStack")
67   - private SipProviderImpl startTcpListener() {
  68 + SipProviderImpl startTcpListener() {
68 69 ListeningPoint tcpListeningPoint = null;
69 70 SipProviderImpl tcpSipProvider = null;
70 71 try {
... ... @@ -89,7 +90,7 @@ public class SipLayer{
89 90  
90 91 @Bean(name = "udpSipProvider")
91 92 @DependsOn("sipStack")
92   - private SipProviderImpl startUdpListener() {
  93 + SipProviderImpl startUdpListener() {
93 94 ListeningPoint udpListeningPoint = null;
94 95 SipProviderImpl udpSipProvider = null;
95 96 try {
... ...