This commit is contained in:
29
src/org/redkale/boot/watch/AppWatchService.java
Normal file
29
src/org/redkale/boot/watch/AppWatchService.java
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.redkale.boot.watch;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import org.redkale.boot.Application;
|
||||
import org.redkale.net.TransportFactory;
|
||||
import org.redkale.net.http.RestService;
|
||||
import org.redkale.watch.WatchService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
@RestService(name = "watch", repair = false)
|
||||
public class AppWatchService implements WatchService {
|
||||
|
||||
@Resource
|
||||
private Application application;
|
||||
|
||||
@Resource
|
||||
private TransportFactory transportFactory;
|
||||
|
||||
}
|
||||
@@ -16,6 +16,8 @@ import org.redkale.service.Service;
|
||||
import org.redkale.util.ObjectPool;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
|
||||
@@ -72,6 +72,7 @@ public class HttpServer extends Server<String, HttpContext, HttpRequest, HttpRes
|
||||
/**
|
||||
* 删除HttpServlet
|
||||
*
|
||||
* @param <T> 泛型
|
||||
* @param websocketOrServletType Class
|
||||
*
|
||||
* @return HttpServlet
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
package org.redkale.util;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
|
||||
@@ -99,8 +99,8 @@ public final class ResourceFactory {
|
||||
* 1: "$"有特殊含义, 不能表示"$"资源本身
|
||||
* 2: 只能是字母、数字、(短横)-、(下划线)_、点(.)的组合
|
||||
* </pre></blockquote>
|
||||
* <p>
|
||||
* @param name
|
||||
*
|
||||
* @param name String
|
||||
*/
|
||||
public void checkName(String name) {
|
||||
if (name == null || (!name.isEmpty() && !name.matches("^[a-zA-Z0-9_;\\-\\.\\[\\]\\(\\)]+$"))) {
|
||||
|
||||
@@ -8,6 +8,8 @@ package org.redkale.watch;
|
||||
import org.redkale.net.http.HttpFilter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
|
||||
@@ -10,6 +10,9 @@ import org.redkale.service.*;
|
||||
/**
|
||||
* 只给WATCH协议的Server才能加载的Service,其他协议的Server均不能自动加载WatchService
|
||||
*
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
public interface WatchService extends Service {
|
||||
|
||||
@@ -9,7 +9,9 @@ import org.redkale.net.http.HttpServlet;
|
||||
|
||||
/**
|
||||
*
|
||||
* <p> 详情见: https://redkale.org
|
||||
* <p>
|
||||
* 详情见: https://redkale.org
|
||||
*
|
||||
* @author zhangjx
|
||||
*/
|
||||
public class WatchServlet extends HttpServlet {
|
||||
|
||||
Reference in New Issue
Block a user