- java.lang.Object
-
- org.redkale.boot.NodeServer
-
- 直接已知子类:
NodeHttpServer
,NodeSncpServer
public abstract class NodeServer extends Object
Server节点的初始化配置类详情见: https://redkale.org
- 作者:
- zhangjx
-
-
字段概要
字段 修饰符和类型 字段 说明 protected Application
application
protected Map<Service,Servlet>
dynServletMap
protected NodeInterceptor
interceptor
static String
LINE_SEPARATOR
protected Set<Service>
localServices
protected Logger
logger
protected Map<String,MessageAgent>
messageAgents
protected Set<Service>
remoteServices
protected ResourceFactory
resourceFactory
protected Server
server
protected RedkaleClassLoader
serverClassLoader
protected AnyValue
serverConf
protected Thread
serverThread
protected Set<Service>
servletServices
protected SncpClient
sncpClient
protected String
sncpGroup
protected Map<String,MessageAgent>
sncpRemoteAgents
protected String
threadName
-
构造器概要
构造器 构造器 说明 NodeServer(Application application, Server server)
-
方法概要
-
-
-
字段详细资料
-
logger
protected final Logger logger
-
application
protected final Application application
-
resourceFactory
protected final ResourceFactory resourceFactory
-
server
protected final Server server
-
serverClassLoader
protected RedkaleClassLoader serverClassLoader
-
serverThread
protected final Thread serverThread
-
serverConf
protected AnyValue serverConf
-
threadName
protected final String threadName
-
interceptor
protected NodeInterceptor interceptor
-
messageAgents
protected final Map<String,MessageAgent> messageAgents
-
sncpRemoteAgents
protected final Map<String,MessageAgent> sncpRemoteAgents
-
sncpGroup
protected String sncpGroup
-
sncpClient
protected SncpClient sncpClient
-
-
构造器详细资料
-
NodeServer
public NodeServer(Application application, Server server)
-
-
方法详细资料
-
create
public static <T extends NodeServer> NodeServer create(Class<T> clazz, Application application, AnyValue serconf)
-
loadOthers
protected void loadOthers(List<ClassFilter> otherFilters) throws Exception
- 抛出:
Exception
-
loadFilter
protected abstract void loadFilter(ClassFilter<? extends Filter> filterFilter) throws Exception
- 抛出:
Exception
-
loadServlet
protected abstract void loadServlet(ClassFilter<? extends Servlet> servletFilter) throws Exception
- 抛出:
Exception
-
loadService
protected void loadService(ClassFilter<? extends Service> serviceFilter) throws Exception
- 抛出:
Exception
-
interceptComponent
protected boolean interceptComponent(Service service)
-
getMessageAgent
protected MessageAgent getMessageAgent(AnyValue serviceConf)
-
preInitServices
protected void preInitServices(Set<Service> localServices, Set<Service> remoteServices, Set<Service> servletServices)
-
postLoadServlets
protected void postLoadServlets()
-
preDestroyServices
protected void preDestroyServices(Set<Service> localServices, Set<Service> remoteServices, Set<Service> servletServices)
-
afterClusterDeregisterOnPreDestroyServices
protected void afterClusterDeregisterOnPreDestroyServices(ClusterAgent cluster, String protocol)
-
postStartServer
protected void postStartServer(Set<Service> localServices, Set<Service> remoteServices, Set<Service> servletServices)
-
createFilterClassFilter
protected abstract ClassFilter<Filter> createFilterClassFilter()
-
createServletClassFilter
protected abstract ClassFilter<Servlet> createServletClassFilter()
-
createOtherClassFilters
protected List<ClassFilter> createOtherClassFilters()
-
createServiceClassFilter
protected ClassFilter<Service> createServiceClassFilter()
-
createClassFilter
protected ClassFilter createClassFilter(String localGroup, Class<? extends Annotation> ref, Class inter, Class[] excludeSuperClasses, Class<? extends Annotation> ref2, String properties, String property)
-
getSocketAddress
public abstract InetSocketAddress getSocketAddress()
-
isSNCP
public boolean isSNCP()
-
isWATCH
public boolean isWATCH()
-
getApplication
public Application getApplication()
-
getResourceFactory
public ResourceFactory getResourceFactory()
-
getServerClassLoader
public RedkaleClassLoader getServerClassLoader()
-
setServerClassLoader
public void setServerClassLoader(RedkaleClassLoader serverClassLoader)
-
getSncpAddress
public InetSocketAddress getSncpAddress()
-
getServerConf
public AnyValue getServerConf()
-
getLogger
public Logger getLogger()
-
getSncpGroup
public String getSncpGroup()
-
start
public void start() throws IOException
- 抛出:
IOException
-
shutdown
public void shutdown() throws IOException
- 抛出:
IOException
-
command
public List<Object> command(String cmd, String[] params) throws IOException
- 抛出:
IOException
-
getServer
public <T extends Server> T getServer()
-
getThreadName
public String getThreadName()
-
-