Class: Takagi::ServerRegistry
- Inherits:
-
Object
- Object
- Takagi::ServerRegistry
- Defined in:
- sig/takagi/server_registry.rbs
Overview
Registry for CoAP server implementations
Allows registering different protocol implementations (UDP, TCP, DTLS, QUIC, etc.) without modifying core code. Follows the Open/Closed Principle.
Defined Under Namespace
Classes: ProtocolNotFoundError
Class Method Summary collapse
-
.build ⇒ Object
Build a server instance for the given protocol.
-
.clear! ⇒ Object
Clear all registrations (useful for testing).
-
.metadata_for ⇒ Hash?
Get metadata for a protocol.
-
.protocols ⇒ Array<Symbol>
Get all registered protocols.
-
.register ⇒ Object
Register a server implementation for a protocol.
-
.registered? ⇒ Boolean
Check if a protocol is registered.
Class Method Details
.build ⇒ Object
Build a server instance for the given protocol
49 |
# File 'sig/takagi/server_registry.rbs', line 49 def self.build: (untyped protocol, **untyped ) -> untyped |
.clear! ⇒ Object
Clear all registrations (useful for testing)
69 |
# File 'sig/takagi/server_registry.rbs', line 69 def self.clear!: () -> untyped |
.metadata_for ⇒ Hash?
Get metadata for a protocol
66 |
# File 'sig/takagi/server_registry.rbs', line 66 def self.metadata_for: (untyped protocol) -> untyped |
.protocols ⇒ Array<Symbol>
Get all registered protocols
60 |
# File 'sig/takagi/server_registry.rbs', line 60 def self.protocols: () -> untyped |
.register ⇒ Object
Register a server implementation for a protocol
38 |
# File 'sig/takagi/server_registry.rbs', line 38 def self.register: (untyped protocol, untyped klass, **untyped ) -> untyped |
.registered? ⇒ Boolean
Check if a protocol is registered
55 |
# File 'sig/takagi/server_registry.rbs', line 55 def self.registered?: (untyped protocol) -> untyped |