private ProtocolOptions getProtocolOptions() {
int port = cpConfig.getPort();
int protocolVersion = -1; // use default
AuthProvider authProvider = AuthProvider.NONE;
AuthenticationCredentials creds = cpConfig.getAuthenticationCredentials();
if (creds != null) {
authProvider = new PlainTextAuthProvider(creds.getUsername(), creds.getPassword());
}