Package io.hekate.network
Interface NetworkConnector<T>
-
- Type Parameters:
T
- Base type of messages that can be sent/received by by this connector. Note thatNetworkConnector
must beconfigured
to use aCodec
which is capable of serializing messages of this type.
- All Known Implementing Classes:
NettyClientFactory
public interface NetworkConnector<T>
Network connector.Instances of this interface can be obtained via
NetworkService.connector(String)
method.For more details about connectors and networking please see the documentation of
NetworkService
.- See Also:
NetworkService
,NetworkConnectorConfig
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NetworkClient<T>
newClient()
Creates a newNetworkClient
instance.String
protocol()
Returns the protocol identifier of this connector.
-
-
-
Method Detail
-
protocol
String protocol()
Returns the protocol identifier of this connector.- Returns:
- Protocol identifier.
- See Also:
NetworkConnectorConfig.setProtocol(String)
-
newClient
NetworkClient<T> newClient()
Creates a newNetworkClient
instance.- Returns:
- New client.
-
-