public void setProtection ( int protection ) { switch ( protection ) { case GridFTPSession . PROTECTION_CLEAR : throw new IllegalArgumentException ( "Unsupported protection: " + protection ) ; case GridFTPSession . PROTECTION_SAFE : case GridFTPSession . PROTECTION_CONFIDENTIAL : case GridFTPSession . PROTECTION_PRIVATE : break ; default : throw new IllegalArgumentException ( "Bad protection: " + protection ) ; } this . protection = protection ; }
Sets data channel protection level .