public interface Router
Router for server.
Router contains routings of various types, so the server can handle each protocol as fast as possible.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Builder for a standalone router.static interface
Router.RouterBuilder<B extends Router.RouterBuilder<B>>
Generic builder interface used byRouter.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
This is called after server closes ports.void
This is called before server opens ports.static Router.Builder
builder()
Builder for router.static Router
empty()
Empty router.<T extends Routing>
TGet routing of a specific type.
-
Method Details
-
builder
Builder for router.- Returns:
- a new builder
-
empty
Empty router.- Returns:
- new empty router
-
routing
Get routing of a specific type.- Type Parameters:
T
- type of routing- Parameters:
routingType
- type of the routingdefaultValue
- default value to use if the routing is not defined in this router- Returns:
- routing defined or default value if not found
-
afterStop
void afterStop()This is called after server closes ports. -
beforeStart
void beforeStart()This is called before server opens ports.
-