Package moe.kyokobot.libdave.netty
Interface NettyDaveFactory
- All Superinterfaces:
DaveFactory
-
Method Summary
Modifier and TypeMethodDescriptionfromDecryptor(Decryptor decryptor) Converts aDecryptorinto a Netty-enabledNettyDecryptor.fromEncryptor(Encryptor encryptor) Converts aEncryptorinto a Netty-enabledNettyEncryptor.Methods inherited from interface moe.kyokobot.libdave.DaveFactory
createDecryptor, createEncryptor, createSession, maxSupportedProtocolVersion
-
Method Details
-
fromDecryptor
Converts aDecryptorinto a Netty-enabledNettyDecryptor.If the provided decryptor already supports Netty (implements
NettyDecryptor), it is returned unchanged. Otherwise, its internal state is transferred to a new Netty-enabled decryptor, and the original is closed.Note: After calling this method, the original decryptor is closed and should not be used.
- Parameters:
decryptor- A decryptor instance created by this factory.- Returns:
- A Netty-enabled decryptor.
- Throws:
IllegalArgumentException- if the decryptor was created by an incompatible factory.
-
fromEncryptor
Converts aEncryptorinto a Netty-enabledNettyEncryptor.If the provided encryptor already supports Netty (implements
NettyEncryptor), it is returned unchanged. Otherwise, its internal state is transferred to a new Netty-enabled encryptor, and the original is closed.Note: After calling this method, the original encryptor is closed and should not be used.
- Parameters:
encryptor- An encryptor instance created by this factory.- Returns:
- A Netty-enabled encryptor.
- Throws:
IllegalArgumentException- if the encryptor was created by an incompatible factory.
-