repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java
GridMap.getAllGlobusID
public String[] getAllGlobusID(String userID) { if (userID == null) { throw new IllegalArgumentException(i18n.getMessage("userIdNull")); } if (this.map == null) { return null; } Vector v = new Vector(); Iterator iter = this.map.entrySet().iterat...
java
public String[] getAllGlobusID(String userID) { if (userID == null) { throw new IllegalArgumentException(i18n.getMessage("userIdNull")); } if (this.map == null) { return null; } Vector v = new Vector(); Iterator iter = this.map.entrySet().iterat...
[ "public", "String", "[", "]", "getAllGlobusID", "(", "String", "userID", ")", "{", "if", "(", "userID", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "i18n", ".", "getMessage", "(", "\"userIdNull\"", ")", ")", ";", "}", "if", "...
Returns all globus IDs associated with the specified local user name. @param userID local user name @return associated globus ID, null if there is not any.
[ "Returns", "all", "globus", "IDs", "associated", "with", "the", "specified", "local", "user", "name", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java#L364-L397
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/trustmanager/DateValidityChecker.java
DateValidityChecker.invoke
public void invoke(X509Certificate cert, GSIConstants.CertificateType certType) throws CertPathValidatorException { try { cert.checkValidity(); } catch (CertificateExpiredException e) { throw new CertPathValidatorException( "Certificate " + cert.getSubjectDN()...
java
public void invoke(X509Certificate cert, GSIConstants.CertificateType certType) throws CertPathValidatorException { try { cert.checkValidity(); } catch (CertificateExpiredException e) { throw new CertPathValidatorException( "Certificate " + cert.getSubjectDN()...
[ "public", "void", "invoke", "(", "X509Certificate", "cert", ",", "GSIConstants", ".", "CertificateType", "certType", ")", "throws", "CertPathValidatorException", "{", "try", "{", "cert", ".", "checkValidity", "(", ")", ";", "}", "catch", "(", "CertificateExpiredEx...
Method that checks the time validity. Uses the standard Certificate.checkValidity method. @throws CertPathValidatorException If certificate has expired or is not yet valid.
[ "Method", "that", "checks", "the", "time", "validity", ".", "Uses", "the", "standard", "Certificate", ".", "checkValidity", "method", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/trustmanager/DateValidityChecker.java#L39-L49
train
jglobus/JGlobus
myproxy/src/main/java/org/globus/myproxy/MyProxy.java
MyProxy.info
public CredentialInfo info(GSSCredential credential, String username, String passphrase) throws MyProxyException { InfoParams request = new InfoParams(); request.setUserName(username); request.setPassphrase(passphrase); ...
java
public CredentialInfo info(GSSCredential credential, String username, String passphrase) throws MyProxyException { InfoParams request = new InfoParams(); request.setUserName(username); request.setPassphrase(passphrase); ...
[ "public", "CredentialInfo", "info", "(", "GSSCredential", "credential", ",", "String", "username", ",", "String", "passphrase", ")", "throws", "MyProxyException", "{", "InfoParams", "request", "=", "new", "InfoParams", "(", ")", ";", "request", ".", "setUserName",...
Retrieves credential information from MyProxy server. Only the information of the default credential is returned by this operation. @param credential The local GSI credentials to use for authentication. @param username The username of the credentials to remove. @param passphrase The passphrase of the credentials to...
[ "Retrieves", "credential", "information", "from", "MyProxy", "server", ".", "Only", "the", "information", "of", "the", "default", "credential", "is", "returned", "by", "this", "operation", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/myproxy/src/main/java/org/globus/myproxy/MyProxy.java#L726-L734
train
jglobus/JGlobus
myproxy/src/main/java/org/globus/myproxy/MyProxy.java
MyProxy.getTrustroots
public void getTrustroots(GSSCredential credential, GetTrustrootsParams params) throws MyProxyException { if (params == null) { throw new IllegalArgumentException("params == null"); } if (credential == null) { try { ...
java
public void getTrustroots(GSSCredential credential, GetTrustrootsParams params) throws MyProxyException { if (params == null) { throw new IllegalArgumentException("params == null"); } if (credential == null) { try { ...
[ "public", "void", "getTrustroots", "(", "GSSCredential", "credential", ",", "GetTrustrootsParams", "params", ")", "throws", "MyProxyException", "{", "if", "(", "params", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"params == null\"", "...
Retrieves trustroot information from the MyProxy server. @param credential The local GSI credentials to use for authentication. Can be set to null if no local credentials. @param params The parameters for the get-trustroots operation. @exception MyProxyException If an error occurred during the operation.
[ "Retrieves", "trustroot", "information", "from", "the", "MyProxy", "server", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/myproxy/src/main/java/org/globus/myproxy/MyProxy.java#L1105-L1157
train
jglobus/JGlobus
myproxy/src/main/java/org/globus/myproxy/MyProxy.java
MyProxy.writeTrustRoots
public boolean writeTrustRoots(String directory) throws IOException { if (this.trustrootFilenames == null || this.trustrootData == null) { return false; } File rootDir = new File(directory); if (!rootDir.exists()) { rootDir.mkdirs(); } for (int i =...
java
public boolean writeTrustRoots(String directory) throws IOException { if (this.trustrootFilenames == null || this.trustrootData == null) { return false; } File rootDir = new File(directory); if (!rootDir.exists()) { rootDir.mkdirs(); } for (int i =...
[ "public", "boolean", "writeTrustRoots", "(", "String", "directory", ")", "throws", "IOException", "{", "if", "(", "this", ".", "trustrootFilenames", "==", "null", "||", "this", ".", "trustrootData", "==", "null", ")", "{", "return", "false", ";", "}", "File"...
Writes the retrieved trust roots to a trusted certificates directory. @param directory path where the trust roots should be written @return true if trust roots are written successfully, false if no trust roots are available to be written
[ "Writes", "the", "retrieved", "trust", "roots", "to", "a", "trusted", "certificates", "directory", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/myproxy/src/main/java/org/globus/myproxy/MyProxy.java#L1475-L1490
train
jglobus/JGlobus
myproxy/src/main/java/org/globus/myproxy/MyProxy.java
MyProxy.toHex
protected static String toHex(final byte[] bin) { if (bin == null || bin.length == 0) return ""; char[] buffer = new char[bin.length * 2]; final char[] hex = "0123456789abcdef".toCharArray(); // i tracks input position, j tracks output position for (int i = 0, j = ...
java
protected static String toHex(final byte[] bin) { if (bin == null || bin.length == 0) return ""; char[] buffer = new char[bin.length * 2]; final char[] hex = "0123456789abcdef".toCharArray(); // i tracks input position, j tracks output position for (int i = 0, j = ...
[ "protected", "static", "String", "toHex", "(", "final", "byte", "[", "]", "bin", ")", "{", "if", "(", "bin", "==", "null", "||", "bin", ".", "length", "==", "0", ")", "return", "\"\"", ";", "char", "[", "]", "buffer", "=", "new", "char", "[", "bi...
encode binary to hex
[ "encode", "binary", "to", "hex" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/myproxy/src/main/java/org/globus/myproxy/MyProxy.java#L1522-L1538
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java
PEMKeyStore.engineGetKey
@Override public Key engineGetKey(String s, char[] chars) throws NoSuchAlgorithmException, UnrecoverableKeyException { CredentialWrapper credential = getKeyEntry(s); Key key = null; if (credential != null) { try { String password = null; if (chars != null) { password = new String(chars); ...
java
@Override public Key engineGetKey(String s, char[] chars) throws NoSuchAlgorithmException, UnrecoverableKeyException { CredentialWrapper credential = getKeyEntry(s); Key key = null; if (credential != null) { try { String password = null; if (chars != null) { password = new String(chars); ...
[ "@", "Override", "public", "Key", "engineGetKey", "(", "String", "s", ",", "char", "[", "]", "chars", ")", "throws", "NoSuchAlgorithmException", ",", "UnrecoverableKeyException", "{", "CredentialWrapper", "credential", "=", "getKeyEntry", "(", "s", ")", ";", "Ke...
Get the key referenced by the specified alias. @param s The key's alias. @param chars The key's password. @return The key reference by the alias or null. @throws NoSuchAlgorithmException If the key is encoded with an invalid algorithm. @throws UnrecoverableKeyException If the key can not be retrieved.
[ "Get", "the", "key", "referenced", "by", "the", "specified", "alias", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java#L139-L159
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java
PEMKeyStore.engineStore
@Override public void engineStore(OutputStream outputStream, char[] chars) throws IOException, NoSuchAlgorithmException, CertificateException { for (SecurityObjectWrapper<?> object : this.aliasObjectMap.values()) { if (object instanceof Storable) { try { ((Storable) object).store(); } catch (Resou...
java
@Override public void engineStore(OutputStream outputStream, char[] chars) throws IOException, NoSuchAlgorithmException, CertificateException { for (SecurityObjectWrapper<?> object : this.aliasObjectMap.values()) { if (object instanceof Storable) { try { ((Storable) object).store(); } catch (Resou...
[ "@", "Override", "public", "void", "engineStore", "(", "OutputStream", "outputStream", ",", "char", "[", "]", "chars", ")", "throws", "IOException", ",", "NoSuchAlgorithmException", ",", "CertificateException", "{", "for", "(", "SecurityObjectWrapper", "<", "?", "...
Persist the security material in this keystore. If the object has a path associated with it, the object will be persisted to that path. Otherwise it will be stored in the default certificate directory. As a result, the parameters of this method are ignored. @param outputStream This parameter is ignored. @param chars T...
[ "Persist", "the", "security", "material", "in", "this", "keystore", ".", "If", "the", "object", "has", "a", "path", "associated", "with", "it", "the", "object", "will", "be", "persisted", "to", "that", "path", ".", "Otherwise", "it", "will", "be", "stored"...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java#L187-L199
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java
PEMKeyStore.engineGetCreationDate
@Override public Date engineGetCreationDate(String s) { try { ResourceTrustAnchor trustAnchor = getCertificateEntry(s); if (trustAnchor != null) { return trustAnchor.getTrustAnchor().getTrustedCert() .getNotBefore(); } else { CredentialWrapper credential = getKeyEntry(s); if (credential !=...
java
@Override public Date engineGetCreationDate(String s) { try { ResourceTrustAnchor trustAnchor = getCertificateEntry(s); if (trustAnchor != null) { return trustAnchor.getTrustAnchor().getTrustedCert() .getNotBefore(); } else { CredentialWrapper credential = getKeyEntry(s); if (credential !=...
[ "@", "Override", "public", "Date", "engineGetCreationDate", "(", "String", "s", ")", "{", "try", "{", "ResourceTrustAnchor", "trustAnchor", "=", "getCertificateEntry", "(", "s", ")", ";", "if", "(", "trustAnchor", "!=", "null", ")", "{", "return", "trustAnchor...
Get the creation date for the object referenced by the alias. @param s The alias of the security object. @return The creation date of the security object.
[ "Get", "the", "creation", "date", "for", "the", "object", "referenced", "by", "the", "alias", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java#L208-L225
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java
PEMKeyStore.engineGetCertificateChain
@Override public Certificate[] engineGetCertificateChain(String s) { CredentialWrapper credential = getKeyEntry(s); X509Certificate[] chain = new X509Certificate[0]; if (credential != null) { try { chain = credential.getCredential().getCertificateChain(); } catch (ResourceStoreException e) { logger...
java
@Override public Certificate[] engineGetCertificateChain(String s) { CredentialWrapper credential = getKeyEntry(s); X509Certificate[] chain = new X509Certificate[0]; if (credential != null) { try { chain = credential.getCredential().getCertificateChain(); } catch (ResourceStoreException e) { logger...
[ "@", "Override", "public", "Certificate", "[", "]", "engineGetCertificateChain", "(", "String", "s", ")", "{", "CredentialWrapper", "credential", "=", "getKeyEntry", "(", "s", ")", ";", "X509Certificate", "[", "]", "chain", "=", "new", "X509Certificate", "[", ...
Get the certificateChain for the key referenced by the alias. @param s The key alias. @return The key's certificate chain or a 0 length array if the key is not in the keystore.
[ "Get", "the", "certificateChain", "for", "the", "key", "referenced", "by", "the", "alias", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java#L248-L261
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java
PEMKeyStore.engineGetCertificate
@Override public Certificate engineGetCertificate(String s) { ResourceTrustAnchor trustAnchor = getCertificateEntry(s); if (trustAnchor != null) { try { return trustAnchor.getTrustAnchor().getTrustedCert(); } catch (ResourceStoreException e) { return null; } } return null; }
java
@Override public Certificate engineGetCertificate(String s) { ResourceTrustAnchor trustAnchor = getCertificateEntry(s); if (trustAnchor != null) { try { return trustAnchor.getTrustAnchor().getTrustedCert(); } catch (ResourceStoreException e) { return null; } } return null; }
[ "@", "Override", "public", "Certificate", "engineGetCertificate", "(", "String", "s", ")", "{", "ResourceTrustAnchor", "trustAnchor", "=", "getCertificateEntry", "(", "s", ")", ";", "if", "(", "trustAnchor", "!=", "null", ")", "{", "try", "{", "return", "trust...
Get the certificate referenced by the supplied alias. @param s The alias. @return The Certificate or null if the alias does not exist in the keyStore.
[ "Get", "the", "certificate", "referenced", "by", "the", "supplied", "alias", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java#L271-L282
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java
PEMKeyStore.engineLoad
@Override public void engineLoad(KeyStore.LoadStoreParameter loadStoreParameter) throws IOException, NoSuchAlgorithmException, CertificateException { if (!(loadStoreParameter instanceof KeyStoreParametersFactory.FileStoreParameters)) { throw new IllegalArgumentException("Unable to process parameters: " + ...
java
@Override public void engineLoad(KeyStore.LoadStoreParameter loadStoreParameter) throws IOException, NoSuchAlgorithmException, CertificateException { if (!(loadStoreParameter instanceof KeyStoreParametersFactory.FileStoreParameters)) { throw new IllegalArgumentException("Unable to process parameters: " + ...
[ "@", "Override", "public", "void", "engineLoad", "(", "KeyStore", ".", "LoadStoreParameter", "loadStoreParameter", ")", "throws", "IOException", ",", "NoSuchAlgorithmException", ",", "CertificateException", "{", "if", "(", "!", "(", "loadStoreParameter", "instanceof", ...
Load the keystore based on parameters in the LoadStoreParameter. The parameter object must be an instance of FileBasedKeyStoreParameters. @param loadStoreParameter The parameters to load. @throws IOException @throws NoSuchAlgorithmException @throws CertificateException
[ "Load", "the", "keystore", "based", "on", "parameters", "in", "the", "LoadStoreParameter", ".", "The", "parameter", "object", "must", "be", "an", "instance", "of", "FileBasedKeyStoreParameters", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java#L294-L311
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java
PEMKeyStore.initialize
private void initialize(String defaultDirectoryString, String directoryListString, String proxyFilename, String certFilename, String keyFilename) throws IOException, CertificateException { if (defaultDirectoryString != null) { defaultDirectory = new GlobusPathMatchingResourcePatternResolver().getResource...
java
private void initialize(String defaultDirectoryString, String directoryListString, String proxyFilename, String certFilename, String keyFilename) throws IOException, CertificateException { if (defaultDirectoryString != null) { defaultDirectory = new GlobusPathMatchingResourcePatternResolver().getResource...
[ "private", "void", "initialize", "(", "String", "defaultDirectoryString", ",", "String", "directoryListString", ",", "String", "proxyFilename", ",", "String", "certFilename", ",", "String", "keyFilename", ")", "throws", "IOException", ",", "CertificateException", "{", ...
Initialize resources from filename, proxyfile name @param defaultDirectoryString Name of the default directory name as: "file: directory name" @param directoryListString @param proxyFilename @param certFilename @param keyFilename @throws IOException @throws CertificateException
[ "Initialize", "resources", "from", "filename", "proxyfile", "name" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java#L379-L412
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java
PEMKeyStore.engineDeleteEntry
@Override public void engineDeleteEntry(String s) throws KeyStoreException { SecurityObjectWrapper<?> object = this.aliasObjectMap.remove(s); if (object != null) { if (object instanceof ResourceTrustAnchor) { ResourceTrustAnchor descriptor = (ResourceTrustAnchor) object; Certificate cert; try { ...
java
@Override public void engineDeleteEntry(String s) throws KeyStoreException { SecurityObjectWrapper<?> object = this.aliasObjectMap.remove(s); if (object != null) { if (object instanceof ResourceTrustAnchor) { ResourceTrustAnchor descriptor = (ResourceTrustAnchor) object; Certificate cert; try { ...
[ "@", "Override", "public", "void", "engineDeleteEntry", "(", "String", "s", ")", "throws", "KeyStoreException", "{", "SecurityObjectWrapper", "<", "?", ">", "object", "=", "this", ".", "aliasObjectMap", ".", "remove", "(", "s", ")", ";", "if", "(", "object",...
Delete a security object from this keystore. @param s The alias of the object to delete. @throws KeyStoreException
[ "Delete", "a", "security", "object", "from", "this", "keystore", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java#L506-L541
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java
PEMKeyStore.engineSetKeyEntry
@Override public void engineSetKeyEntry(String s, Key key, char[] chars, Certificate[] certificates) throws KeyStoreException { if (!(key instanceof PrivateKey)) { throw new KeyStoreException("PrivateKey expected"); } if (!(certificates instanceof X509Certificate[])) { throw new KeyStoreException( ...
java
@Override public void engineSetKeyEntry(String s, Key key, char[] chars, Certificate[] certificates) throws KeyStoreException { if (!(key instanceof PrivateKey)) { throw new KeyStoreException("PrivateKey expected"); } if (!(certificates instanceof X509Certificate[])) { throw new KeyStoreException( ...
[ "@", "Override", "public", "void", "engineSetKeyEntry", "(", "String", "s", ",", "Key", "key", ",", "char", "[", "]", "chars", ",", "Certificate", "[", "]", "certificates", ")", "throws", "KeyStoreException", "{", "if", "(", "!", "(", "key", "instanceof", ...
Add a new private key to the keystore. @param s The alias for the object. @param key The private key. @param chars The password. @param certificates The key's certificate chain. @throws KeyStoreException
[ "Add", "a", "new", "private", "key", "to", "the", "keystore", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java#L567-L589
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java
PEMKeyStore.engineSetCertificateEntry
@Override public void engineSetCertificateEntry(String alias, Certificate certificate) throws KeyStoreException { if (!(certificate instanceof X509Certificate)) { throw new KeyStoreException( "Certificate must be instance of X509Certificate"); } File file; ResourceTrustAnchor trustAnchor = getCerti...
java
@Override public void engineSetCertificateEntry(String alias, Certificate certificate) throws KeyStoreException { if (!(certificate instanceof X509Certificate)) { throw new KeyStoreException( "Certificate must be instance of X509Certificate"); } File file; ResourceTrustAnchor trustAnchor = getCerti...
[ "@", "Override", "public", "void", "engineSetCertificateEntry", "(", "String", "alias", ",", "Certificate", "certificate", ")", "throws", "KeyStoreException", "{", "if", "(", "!", "(", "certificate", "instanceof", "X509Certificate", ")", ")", "{", "throw", "new", ...
Add a certificate to the keystore. @param alias The certificate alias. @param certificate The certificate to store. @throws KeyStoreException
[ "Add", "a", "certificate", "to", "the", "keystore", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/PEMKeyStore.java#L713-L745
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java
ProxyCertificateUtil.isProxy
public static boolean isProxy(GSIConstants.CertificateType certType) { return isGsi2Proxy(certType) || isGsi3Proxy(certType) || isGsi4Proxy(certType); }
java
public static boolean isProxy(GSIConstants.CertificateType certType) { return isGsi2Proxy(certType) || isGsi3Proxy(certType) || isGsi4Proxy(certType); }
[ "public", "static", "boolean", "isProxy", "(", "GSIConstants", ".", "CertificateType", "certType", ")", "{", "return", "isGsi2Proxy", "(", "certType", ")", "||", "isGsi3Proxy", "(", "certType", ")", "||", "isGsi4Proxy", "(", "certType", ")", ";", "}" ]
Determines if a specified certificate type indicates a GSI-2, GSI-3 or GSI-4proxy certificate. @param certType the certificate type to check. @return true if certType is a GSI-2 or GSI-3 or GSI-4 proxy, false otherwise.
[ "Determines", "if", "a", "specified", "certificate", "type", "indicates", "a", "GSI", "-", "2", "GSI", "-", "3", "or", "GSI", "-", "4proxy", "certificate", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java#L44-L46
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java
ProxyCertificateUtil.isGsi4Proxy
public static boolean isGsi4Proxy(GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_4_IMPERSONATION_PROXY || certType == GSIConstants.CertificateType.GSI_4_INDEPENDENT_PROXY || certType == GSIConstants.CertificateType.GSI_4_RESTRICTED_PR...
java
public static boolean isGsi4Proxy(GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_4_IMPERSONATION_PROXY || certType == GSIConstants.CertificateType.GSI_4_INDEPENDENT_PROXY || certType == GSIConstants.CertificateType.GSI_4_RESTRICTED_PR...
[ "public", "static", "boolean", "isGsi4Proxy", "(", "GSIConstants", ".", "CertificateType", "certType", ")", "{", "return", "certType", "==", "GSIConstants", ".", "CertificateType", ".", "GSI_4_IMPERSONATION_PROXY", "||", "certType", "==", "GSIConstants", ".", "Certifi...
Determines if a specified certificate type indicates a GSI-4 proxy certificate. @param certType the certificate type to check. @return true if certType is a GSI-4 proxy, false otherwise.
[ "Determines", "if", "a", "specified", "certificate", "type", "indicates", "a", "GSI", "-", "4", "proxy", "certificate", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java#L55-L60
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java
ProxyCertificateUtil.isGsi3Proxy
public static boolean isGsi3Proxy(GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_3_IMPERSONATION_PROXY || certType == GSIConstants.CertificateType.GSI_3_INDEPENDENT_PROXY || certType == GSIConstants.CertificateType.GSI_3_RESTRICTED_PR...
java
public static boolean isGsi3Proxy(GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_3_IMPERSONATION_PROXY || certType == GSIConstants.CertificateType.GSI_3_INDEPENDENT_PROXY || certType == GSIConstants.CertificateType.GSI_3_RESTRICTED_PR...
[ "public", "static", "boolean", "isGsi3Proxy", "(", "GSIConstants", ".", "CertificateType", "certType", ")", "{", "return", "certType", "==", "GSIConstants", ".", "CertificateType", ".", "GSI_3_IMPERSONATION_PROXY", "||", "certType", "==", "GSIConstants", ".", "Certifi...
Determines if a specified certificate type indicates a GSI-3 proxy certificate. @param certType the certificate type to check. @return true if certType is a GSI-3 proxy, false otherwise.
[ "Determines", "if", "a", "specified", "certificate", "type", "indicates", "a", "GSI", "-", "3", "proxy", "certificate", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java#L69-L74
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java
ProxyCertificateUtil.isGsi2Proxy
public static boolean isGsi2Proxy(GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_2_PROXY || certType == GSIConstants.CertificateType.GSI_2_LIMITED_PROXY; }
java
public static boolean isGsi2Proxy(GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_2_PROXY || certType == GSIConstants.CertificateType.GSI_2_LIMITED_PROXY; }
[ "public", "static", "boolean", "isGsi2Proxy", "(", "GSIConstants", ".", "CertificateType", "certType", ")", "{", "return", "certType", "==", "GSIConstants", ".", "CertificateType", ".", "GSI_2_PROXY", "||", "certType", "==", "GSIConstants", ".", "CertificateType", "...
Determines if a specified certificate type indicates a GSI-2 proxy certificate. @param certType the certificate type to check. @return true if certType is a GSI-2 proxy, false otherwise.
[ "Determines", "if", "a", "specified", "certificate", "type", "indicates", "a", "GSI", "-", "2", "proxy", "certificate", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java#L83-L86
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java
ProxyCertificateUtil.isLimitedProxy
public static boolean isLimitedProxy(GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_3_LIMITED_PROXY || certType == GSIConstants.CertificateType.GSI_2_LIMITED_PROXY || certType == GSIConstants.CertificateType.GSI_4_LIMITED_PROXY; }
java
public static boolean isLimitedProxy(GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_3_LIMITED_PROXY || certType == GSIConstants.CertificateType.GSI_2_LIMITED_PROXY || certType == GSIConstants.CertificateType.GSI_4_LIMITED_PROXY; }
[ "public", "static", "boolean", "isLimitedProxy", "(", "GSIConstants", ".", "CertificateType", "certType", ")", "{", "return", "certType", "==", "GSIConstants", ".", "CertificateType", ".", "GSI_3_LIMITED_PROXY", "||", "certType", "==", "GSIConstants", ".", "Certificat...
Determines if a specified certificate type indicates a GSI-2 or GSI-3 or GSI=4 limited proxy certificate. @param certType the certificate type to check. @return true if certType is a GSI-2 or GSI-3 or GSI-4 limited proxy, false otherwise.
[ "Determines", "if", "a", "specified", "certificate", "type", "indicates", "a", "GSI", "-", "2", "or", "GSI", "-", "3", "or", "GSI", "=", "4", "limited", "proxy", "certificate", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java#L96-L100
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java
ProxyCertificateUtil.isIndependentProxy
public static boolean isIndependentProxy( GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_3_INDEPENDENT_PROXY || certType == GSIConstants.CertificateType.GSI_4_INDEPENDENT_PROXY; }
java
public static boolean isIndependentProxy( GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_3_INDEPENDENT_PROXY || certType == GSIConstants.CertificateType.GSI_4_INDEPENDENT_PROXY; }
[ "public", "static", "boolean", "isIndependentProxy", "(", "GSIConstants", ".", "CertificateType", "certType", ")", "{", "return", "certType", "==", "GSIConstants", ".", "CertificateType", ".", "GSI_3_INDEPENDENT_PROXY", "||", "certType", "==", "GSIConstants", ".", "Ce...
Determines if a specified certificate type indicates a GSI-3 or GS-4 limited proxy certificate. @param certType the certificate type to check. @return true if certType is a GSI-3 or GSI-4 independent proxy, false otherwise.
[ "Determines", "if", "a", "specified", "certificate", "type", "indicates", "a", "GSI", "-", "3", "or", "GS", "-", "4", "limited", "proxy", "certificate", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java#L110-L114
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java
ProxyCertificateUtil.isImpersonationProxy
public static boolean isImpersonationProxy(GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_3_IMPERSONATION_PROXY || certType == GSIConstants.CertificateType.GSI_3_LIMITED_PROXY || certType == GSIConstants.CertificateType.GSI_4_IMPERSON...
java
public static boolean isImpersonationProxy(GSIConstants.CertificateType certType) { return certType == GSIConstants.CertificateType.GSI_3_IMPERSONATION_PROXY || certType == GSIConstants.CertificateType.GSI_3_LIMITED_PROXY || certType == GSIConstants.CertificateType.GSI_4_IMPERSON...
[ "public", "static", "boolean", "isImpersonationProxy", "(", "GSIConstants", ".", "CertificateType", "certType", ")", "{", "return", "certType", "==", "GSIConstants", ".", "CertificateType", ".", "GSI_3_IMPERSONATION_PROXY", "||", "certType", "==", "GSIConstants", ".", ...
Determines if a specified certificate type indicates a GSI-2 or GSI-3 or GSI-4 impersonation proxy certificate. @param certType the certificate type to check. @return true if certType is a GSI-2 or GSI-3 or GSI-4 impersonation proxy, false otherwise.
[ "Determines", "if", "a", "specified", "certificate", "type", "indicates", "a", "GSI", "-", "2", "or", "GSI", "-", "3", "or", "GSI", "-", "4", "impersonation", "proxy", "certificate", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java#L124-L132
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java
ProxyCertificateUtil.getProxyTypeAsString
public static String getProxyTypeAsString(GSIConstants.CertificateType proxyType) { switch(proxyType) { case GSI_4_IMPERSONATION_PROXY: return "RFC 3820 compliant impersonation proxy"; case GSI_4_INDEPENDENT_PROXY: return "RFC 3820 compliant independent proxy"; ca...
java
public static String getProxyTypeAsString(GSIConstants.CertificateType proxyType) { switch(proxyType) { case GSI_4_IMPERSONATION_PROXY: return "RFC 3820 compliant impersonation proxy"; case GSI_4_INDEPENDENT_PROXY: return "RFC 3820 compliant independent proxy"; ca...
[ "public", "static", "String", "getProxyTypeAsString", "(", "GSIConstants", ".", "CertificateType", "proxyType", ")", "{", "switch", "(", "proxyType", ")", "{", "case", "GSI_4_IMPERSONATION_PROXY", ":", "return", "\"RFC 3820 compliant impersonation proxy\"", ";", "case", ...
Returns a string description of a specified proxy type. @param proxyType the proxy type to get the string description of. @return the string description of the proxy type.
[ "Returns", "a", "string", "description", "of", "a", "specified", "proxy", "type", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/ProxyCertificateUtil.java#L170-L195
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/SigningPolicyParser.java
SigningPolicyParser.parse
public Map<X500Principal, SigningPolicy> parse(String fileName) throws FileNotFoundException, SigningPolicyException { if ((fileName == null) || (fileName.trim().isEmpty())) { throw new IllegalArgumentException(); } logger.debug("Signing policy file name " + fileName); ...
java
public Map<X500Principal, SigningPolicy> parse(String fileName) throws FileNotFoundException, SigningPolicyException { if ((fileName == null) || (fileName.trim().isEmpty())) { throw new IllegalArgumentException(); } logger.debug("Signing policy file name " + fileName); ...
[ "public", "Map", "<", "X500Principal", ",", "SigningPolicy", ">", "parse", "(", "String", "fileName", ")", "throws", "FileNotFoundException", ",", "SigningPolicyException", "{", "if", "(", "(", "fileName", "==", "null", ")", "||", "(", "fileName", ".", "trim",...
Parses the file to extract signing policy defined for CA with the specified DN. If the policy file does not exist, a SigningPolicy object with only CA DN is created. If policy path exists, but no relevant policy exisit, SigningPolicy object with CA DN and file path is created. @param fileName Name of the signing polic...
[ "Parses", "the", "file", "to", "extract", "signing", "policy", "defined", "for", "CA", "with", "the", "specified", "DN", ".", "If", "the", "policy", "file", "does", "not", "exist", "a", "SigningPolicy", "object", "with", "only", "CA", "DN", "is", "created"...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/SigningPolicyParser.java#L122-L149
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/SigningPolicyParser.java
SigningPolicyParser.parse
public Map<X500Principal, SigningPolicy> parse(Reader reader) throws SigningPolicyException { Map<X500Principal, SigningPolicy> policies = new HashMap<X500Principal, SigningPolicy>(); BufferedReader bufferedReader = new BufferedReader(reader); try { String line; ...
java
public Map<X500Principal, SigningPolicy> parse(Reader reader) throws SigningPolicyException { Map<X500Principal, SigningPolicy> policies = new HashMap<X500Principal, SigningPolicy>(); BufferedReader bufferedReader = new BufferedReader(reader); try { String line; ...
[ "public", "Map", "<", "X500Principal", ",", "SigningPolicy", ">", "parse", "(", "Reader", "reader", ")", "throws", "SigningPolicyException", "{", "Map", "<", "X500Principal", ",", "SigningPolicy", ">", "policies", "=", "new", "HashMap", "<", "X500Principal", ","...
Parses input stream to extract signing policy defined for CA with the specified DN. @param reader Reader to any input stream to get the signing policy information. @return signing policy map defined by the signing policy file @throws org.globus.gsi.SigningPolicyException Any errors with parsing the signing policy.
[ "Parses", "input", "stream", "to", "extract", "signing", "policy", "defined", "for", "CA", "with", "the", "specified", "DN", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/SigningPolicyParser.java#L161-L199
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/SigningPolicyParser.java
SigningPolicyParser.findIndex
private int findIndex(String line) { int index = -1; if (line == null) { return index; } String trimmedLine = line.trim(); int spaceIndex = trimmedLine.indexOf(" "); int tabIndex = trimmedLine.indexOf("\t"); if (spaceIndex != -1) { if (...
java
private int findIndex(String line) { int index = -1; if (line == null) { return index; } String trimmedLine = line.trim(); int spaceIndex = trimmedLine.indexOf(" "); int tabIndex = trimmedLine.indexOf("\t"); if (spaceIndex != -1) { if (...
[ "private", "int", "findIndex", "(", "String", "line", ")", "{", "int", "index", "=", "-", "1", ";", "if", "(", "line", "==", "null", ")", "{", "return", "index", ";", "}", "String", "trimmedLine", "=", "line", ".", "trim", "(", ")", ";", "int", "...
find first space or tab as separator.
[ "find", "first", "space", "or", "tab", "as", "separator", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/SigningPolicyParser.java#L571-L597
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/TrustedCertificatesUtil.java
TrustedCertificatesUtil.createCertStore
public static CertStore createCertStore(TrustedCertificates tc) throws Exception { CertStore store = null; if (tc == null) { String caCertPattern = "file:" + CoGProperties.getDefault().getCaCertLocations() + "/*.0"; store = Stores.getCACertStore(caCertPattern); } else { ...
java
public static CertStore createCertStore(TrustedCertificates tc) throws Exception { CertStore store = null; if (tc == null) { String caCertPattern = "file:" + CoGProperties.getDefault().getCaCertLocations() + "/*.0"; store = Stores.getCACertStore(caCertPattern); } else { ...
[ "public", "static", "CertStore", "createCertStore", "(", "TrustedCertificates", "tc", ")", "throws", "Exception", "{", "CertStore", "store", "=", "null", ";", "if", "(", "tc", "==", "null", ")", "{", "String", "caCertPattern", "=", "\"file:\"", "+", "CoGProper...
Create a CertStore object from TrustedCertificates. The store only loads trusted certificates, no signing policies
[ "Create", "a", "CertStore", "object", "from", "TrustedCertificates", ".", "The", "store", "only", "loads", "trusted", "certificates", "no", "signing", "policies" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/TrustedCertificatesUtil.java#L34-L46
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/proxy/ProxyPathValidator.java
ProxyPathValidator.removeProxyPolicyHandler
public ProxyPolicyHandler removeProxyPolicyHandler(String id) { return (id != null && this.proxyPolicyHandlers != null) ? (ProxyPolicyHandler)this.proxyPolicyHandlers.remove(id) : null; }
java
public ProxyPolicyHandler removeProxyPolicyHandler(String id) { return (id != null && this.proxyPolicyHandlers != null) ? (ProxyPolicyHandler)this.proxyPolicyHandlers.remove(id) : null; }
[ "public", "ProxyPolicyHandler", "removeProxyPolicyHandler", "(", "String", "id", ")", "{", "return", "(", "id", "!=", "null", "&&", "this", ".", "proxyPolicyHandlers", "!=", "null", ")", "?", "(", "ProxyPolicyHandler", ")", "this", ".", "proxyPolicyHandlers", "....
Removes a restricted proxy policy handler. @param id the Oid of the policy handler to remove. @return <code>ProxyPolicyHandler</code> the removed handler, or null if there is no handler registered under that id.
[ "Removes", "a", "restricted", "proxy", "policy", "handler", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/proxy/ProxyPathValidator.java#L115-L119
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/proxy/ProxyPathValidator.java
ProxyPathValidator.setProxyPolicyHandler
public ProxyPolicyHandler setProxyPolicyHandler(String id, ProxyPolicyHandler handler) { if (id == null) { throw new IllegalArgumentException(i18n.getMessage("proxyPolicyId")); } if (handler == null) { throw new IllegalArgumentException(i18n. getMe...
java
public ProxyPolicyHandler setProxyPolicyHandler(String id, ProxyPolicyHandler handler) { if (id == null) { throw new IllegalArgumentException(i18n.getMessage("proxyPolicyId")); } if (handler == null) { throw new IllegalArgumentException(i18n. getMe...
[ "public", "ProxyPolicyHandler", "setProxyPolicyHandler", "(", "String", "id", ",", "ProxyPolicyHandler", "handler", ")", "{", "if", "(", "id", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "i18n", ".", "getMessage", "(", "\"proxyPolicyId...
Sets a restricted proxy policy handler. @param id the Oid of the proxy policy to install the handler for. @param handler the proxy policy handler. @return <code>ProxyPolicyHandler</code> the previous handler installed under the specified id. Usually, will be null.
[ "Sets", "a", "restricted", "proxy", "policy", "handler", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/proxy/ProxyPathValidator.java#L129-L142
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/proxy/ProxyPathValidator.java
ProxyPathValidator.getProxyPolicyHandler
public ProxyPolicyHandler getProxyPolicyHandler(String id) { return (id != null && this.proxyPolicyHandlers != null) ? (ProxyPolicyHandler)this.proxyPolicyHandlers.get(id) : null; }
java
public ProxyPolicyHandler getProxyPolicyHandler(String id) { return (id != null && this.proxyPolicyHandlers != null) ? (ProxyPolicyHandler)this.proxyPolicyHandlers.get(id) : null; }
[ "public", "ProxyPolicyHandler", "getProxyPolicyHandler", "(", "String", "id", ")", "{", "return", "(", "id", "!=", "null", "&&", "this", ".", "proxyPolicyHandlers", "!=", "null", ")", "?", "(", "ProxyPolicyHandler", ")", "this", ".", "proxyPolicyHandlers", ".", ...
Retrieves a restricted proxy policy handler for a given policy id. @param id the Oid of the proxy policy to get the handler for. @return <code>ProxyPolicyHandler</code> the policy handler registered for the given id or null if none is registered.
[ "Retrieves", "a", "restricted", "proxy", "policy", "handler", "for", "a", "given", "policy", "id", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/proxy/ProxyPathValidator.java#L152-L156
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java
TransferThreadManager.activeConnect
public void activeConnect(HostPort hp, int connections) { for (int i = 0; i < connections; i++) { SocketBox sbox = new ManagedSocketBox(); logger.debug("adding new empty socketBox to the socket pool"); socketPool.add(sbox); logger.debug( ...
java
public void activeConnect(HostPort hp, int connections) { for (int i = 0; i < connections; i++) { SocketBox sbox = new ManagedSocketBox(); logger.debug("adding new empty socketBox to the socket pool"); socketPool.add(sbox); logger.debug( ...
[ "public", "void", "activeConnect", "(", "HostPort", "hp", ",", "int", "connections", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "connections", ";", "i", "++", ")", "{", "SocketBox", "sbox", "=", "new", "ManagedSocketBox", "(", ")", ";...
Act as the active side. Connect to the server and store the newly connected sockets in the socketPool.
[ "Act", "as", "the", "active", "side", ".", "Connect", "to", "the", "server", "and", "store", "the", "newly", "connected", "sockets", "in", "the", "socketPool", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java#L59-L81
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java
TransferThreadManager.activeClose
public void activeClose(TransferContext context, int connections) { try { //this could be improved; for symmetry and performance, //make it a separate task class and pass to the taskThread for (int i = 0; i < connections; i++) { SocketBox sbox = socketPool.c...
java
public void activeClose(TransferContext context, int connections) { try { //this could be improved; for symmetry and performance, //make it a separate task class and pass to the taskThread for (int i = 0; i < connections; i++) { SocketBox sbox = socketPool.c...
[ "public", "void", "activeClose", "(", "TransferContext", "context", ",", "int", "connections", ")", "{", "try", "{", "//this could be improved; for symmetry and performance,", "//make it a separate task class and pass to the taskThread", "for", "(", "int", "i", "=", "0", ";...
use only in mode E
[ "use", "only", "in", "mode", "E" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java#L84-L111
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java
TransferThreadManager.startTransfer
public synchronized void startTransfer(DataSource source, TransferContext context, int connections, boolean reusable) throws ServerException { // things would get messed up i...
java
public synchronized void startTransfer(DataSource source, TransferContext context, int connections, boolean reusable) throws ServerException { // things would get messed up i...
[ "public", "synchronized", "void", "startTransfer", "(", "DataSource", "source", ",", "TransferContext", "context", ",", "int", "connections", ",", "boolean", "reusable", ")", "throws", "ServerException", "{", "// things would get messed up if more than 1 file was transfered",...
This should be used once the remote active server connected to us. This method starts transfer threads that will read data from the source and send. @param reusable if set to false, the sockets will not be reused after the transfer
[ "This", "should", "be", "used", "once", "the", "remote", "active", "server", "connected", "to", "us", ".", "This", "method", "starts", "transfer", "threads", "that", "will", "read", "data", "from", "the", "source", "and", "send", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java#L121-L160
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java
TransferThreadManager.passiveConnect
public synchronized void passiveConnect(DataSink sink, TransferContext context, int connections, ServerSocket serverSocket) throws ServerException { // things would get me...
java
public synchronized void passiveConnect(DataSink sink, TransferContext context, int connections, ServerSocket serverSocket) throws ServerException { // things would get me...
[ "public", "synchronized", "void", "passiveConnect", "(", "DataSink", "sink", ",", "TransferContext", "context", ",", "int", "connections", ",", "ServerSocket", "serverSocket", ")", "throws", "ServerException", "{", "// things would get messed up if more than 1 file was transf...
Accept connections from the remote server, and start transfer threads that will read incoming data and store in the sink. @param connections the number of expected connections
[ "Accept", "connections", "from", "the", "remote", "server", "and", "start", "transfer", "threads", "that", "will", "read", "incoming", "data", "and", "store", "in", "the", "sink", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java#L221-L246
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java
TransferThreadManager.passiveConnect
public synchronized void passiveConnect(DataSource source, TransferContext context, ServerSocket serverSocket) throws ServerException { // things would get messed up if more than 1 file was transfered // sim...
java
public synchronized void passiveConnect(DataSource source, TransferContext context, ServerSocket serverSocket) throws ServerException { // things would get messed up if more than 1 file was transfered // sim...
[ "public", "synchronized", "void", "passiveConnect", "(", "DataSource", "source", ",", "TransferContext", "context", ",", "ServerSocket", "serverSocket", ")", "throws", "ServerException", "{", "// things would get messed up if more than 1 file was transfered", "// simultaneously w...
Accept connection from the remote server and start transfer thread that will read incoming data and store in the sink. This method, because of direction of transfer, cannot be used with EBlock. Therefore it is fixed to create only 1 connection.
[ "Accept", "connection", "from", "the", "remote", "server", "and", "start", "transfer", "thread", "that", "will", "read", "incoming", "data", "and", "store", "in", "the", "sink", ".", "This", "method", "because", "of", "direction", "of", "transfer", "cannot", ...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java#L254-L277
train
jglobus/JGlobus
jsse/src/main/java/org/globus/gsi/jsse/GlobusSSLHelper.java
GlobusSSLHelper.buildTrustStore
public static KeyStore buildTrustStore(String provider, String trustAnchorStoreType, String trustAnchorStoreLocation, String trustAnchorStorePassword) throws GlobusSSLConfigurationException { try { KeyStore trustAnchorStore; if (provider == null) { trustAnchorStore = KeyStore.getInstance(trustAncho...
java
public static KeyStore buildTrustStore(String provider, String trustAnchorStoreType, String trustAnchorStoreLocation, String trustAnchorStorePassword) throws GlobusSSLConfigurationException { try { KeyStore trustAnchorStore; if (provider == null) { trustAnchorStore = KeyStore.getInstance(trustAncho...
[ "public", "static", "KeyStore", "buildTrustStore", "(", "String", "provider", ",", "String", "trustAnchorStoreType", ",", "String", "trustAnchorStoreLocation", ",", "String", "trustAnchorStorePassword", ")", "throws", "GlobusSSLConfigurationException", "{", "try", "{", "K...
Create a trust store using the supplied details. Java SSL requires the trust store to be supplied as a java.security.KeyStore, so this will create a KeyStore containing all of the Trust Anchors. @param provider The Java security provider to use. @param trustAnchorStoreType The type of key store to be constructed. @par...
[ "Create", "a", "trust", "store", "using", "the", "supplied", "details", ".", "Java", "SSL", "requires", "the", "trust", "store", "to", "be", "supplied", "as", "a", "java", ".", "security", ".", "KeyStore", "so", "this", "will", "create", "a", "KeyStore", ...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/jsse/src/main/java/org/globus/gsi/jsse/GlobusSSLHelper.java#L70-L102
train
jglobus/JGlobus
jsse/src/main/java/org/globus/gsi/jsse/GlobusSSLHelper.java
GlobusSSLHelper.findCredentialStore
public static KeyStore findCredentialStore(String provider, String credentialStoreType, String credentialStoreLocation, String credentialStorePassword) throws GlobusSSLConfigurationException { try { KeyStore credentialStore; if (provider == null) { credentialStore = KeyStore.getInstance(credentialS...
java
public static KeyStore findCredentialStore(String provider, String credentialStoreType, String credentialStoreLocation, String credentialStorePassword) throws GlobusSSLConfigurationException { try { KeyStore credentialStore; if (provider == null) { credentialStore = KeyStore.getInstance(credentialS...
[ "public", "static", "KeyStore", "findCredentialStore", "(", "String", "provider", ",", "String", "credentialStoreType", ",", "String", "credentialStoreLocation", ",", "String", "credentialStorePassword", ")", "throws", "GlobusSSLConfigurationException", "{", "try", "{", "...
Create a configured CredentialStore using the supplied parameters. The credential store is a java.security.KeyStore. @param provider The Java security provider to use. @param credentialStoreType The type of key store to be constructed. @param credentialStoreLocation The location of the credential store file @param cre...
[ "Create", "a", "configured", "CredentialStore", "using", "the", "supplied", "parameters", ".", "The", "credential", "store", "is", "a", "java", ".", "security", ".", "KeyStore", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/jsse/src/main/java/org/globus/gsi/jsse/GlobusSSLHelper.java#L121-L153
train
jglobus/JGlobus
jsse/src/main/java/org/globus/gsi/jsse/GlobusSSLHelper.java
GlobusSSLHelper.findCRLStore
public static CertStore findCRLStore(String crlPattern) throws GlobusSSLConfigurationException { try { return Stores.getCRLStore(crlPattern); } catch (InvalidAlgorithmParameterException e) { throw new GlobusSSLConfigurationException(e); } catch (NoSuchAlgorithmException e) { Log logger = LogFactory.ge...
java
public static CertStore findCRLStore(String crlPattern) throws GlobusSSLConfigurationException { try { return Stores.getCRLStore(crlPattern); } catch (InvalidAlgorithmParameterException e) { throw new GlobusSSLConfigurationException(e); } catch (NoSuchAlgorithmException e) { Log logger = LogFactory.ge...
[ "public", "static", "CertStore", "findCRLStore", "(", "String", "crlPattern", ")", "throws", "GlobusSSLConfigurationException", "{", "try", "{", "return", "Stores", ".", "getCRLStore", "(", "crlPattern", ")", ";", "}", "catch", "(", "InvalidAlgorithmParameterException...
Create a store of Certificate Revocation Lists. Java requires that this be a java.security.certificates.CertStore. As such, the store can hold both CRL's and non-trusted certs. For the purposes of this method, we assume that only crl's will be loaded. This can only be used with the Globus provided Certificate Store. @...
[ "Create", "a", "store", "of", "Certificate", "Revocation", "Lists", ".", "Java", "requires", "that", "this", "be", "a", "java", ".", "security", ".", "certificates", ".", "CertStore", ".", "As", "such", "the", "store", "can", "hold", "both", "CRL", "s", ...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/jsse/src/main/java/org/globus/gsi/jsse/GlobusSSLHelper.java#L192-L207
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/util/http/HTTPChunkedInputStream.java
HTTPChunkedInputStream.readLine
private String readLine(InputStream in) throws IOException { StringBuffer buf = new StringBuffer(); int c, length = 0; while(true) { c = in.read(); if (c == -1 || c == '\n' || length > 512) { break; } else if (c == '\r') { in.read(); return buf.toString(); } else { buf.append((char)c); ...
java
private String readLine(InputStream in) throws IOException { StringBuffer buf = new StringBuffer(); int c, length = 0; while(true) { c = in.read(); if (c == -1 || c == '\n' || length > 512) { break; } else if (c == '\r') { in.read(); return buf.toString(); } else { buf.append((char)c); ...
[ "private", "String", "readLine", "(", "InputStream", "in", ")", "throws", "IOException", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "int", "c", ",", "length", "=", "0", ";", "while", "(", "true", ")", "{", "c", "=", "in", ...
Read a line of text from the given Stream and return it as a String. Assumes lines end in CRLF.
[ "Read", "a", "line", "of", "text", "from", "the", "given", "Stream", "and", "return", "it", "as", "a", "String", ".", "Assumes", "lines", "end", "in", "CRLF", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/util/http/HTTPChunkedInputStream.java#L84-L102
train
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSException.java
GlobusGSSException.getUsefulMessage
private static String getUsefulMessage(Throwable throwable) { while(isBoring(throwable)) { throwable = throwable.getCause(); } String message = throwable.getMessage(); if (message == null) { message = throwable.getClass().getName(); } return messa...
java
private static String getUsefulMessage(Throwable throwable) { while(isBoring(throwable)) { throwable = throwable.getCause(); } String message = throwable.getMessage(); if (message == null) { message = throwable.getClass().getName(); } return messa...
[ "private", "static", "String", "getUsefulMessage", "(", "Throwable", "throwable", ")", "{", "while", "(", "isBoring", "(", "throwable", ")", ")", "{", "throwable", "=", "throwable", ".", "getCause", "(", ")", ";", "}", "String", "message", "=", "throwable", ...
Wrapper around getMessage method that tries to provide a meaningful message. This is needed because many GSSException objects provide no useful information and the actual useful information is in the Throwable that caused the exception.
[ "Wrapper", "around", "getMessage", "method", "that", "tries", "to", "provide", "a", "meaningful", "message", ".", "This", "is", "needed", "because", "many", "GSSException", "objects", "provide", "no", "useful", "information", "and", "the", "actual", "useful", "i...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSException.java#L173-L183
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FeatureList.java
FeatureList.getFeature
public List<Feature> getFeature(String label) { if (label == null) { throw new IllegalArgumentException("feature label is null"); } label = label.toUpperCase(); List<Feature> foundFeatures = new ArrayList(); for( Feature feature:features ) { if(feature.getLabel().equals(label)) { ...
java
public List<Feature> getFeature(String label) { if (label == null) { throw new IllegalArgumentException("feature label is null"); } label = label.toUpperCase(); List<Feature> foundFeatures = new ArrayList(); for( Feature feature:features ) { if(feature.getLabel().equals(label)) { ...
[ "public", "List", "<", "Feature", ">", "getFeature", "(", "String", "label", ")", "{", "if", "(", "label", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"feature label is null\"", ")", ";", "}", "label", "=", "label", ".", "toU...
Get all features that have label equal to the argument Note that RFC 2389 does not require a feature with a given label to appear only once @param label @return List of found features with given label in the same order as they were given to us by the server
[ "Get", "all", "features", "that", "have", "label", "equal", "to", "the", "argument", "Note", "that", "RFC", "2389", "does", "not", "require", "a", "feature", "with", "a", "given", "label", "to", "appear", "only", "once" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FeatureList.java#L208-L224
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/NameOpValue.java
NameOpValue.getOperatorAsString
public static String getOperatorAsString(int op) { switch(op) { case EQ: return "="; case NEQ: return "!="; case GT: return ">"; case GTEQ: return ">="; case LT: return "<"; case LTEQ: return "<="; default: return "??"; } }
java
public static String getOperatorAsString(int op) { switch(op) { case EQ: return "="; case NEQ: return "!="; case GT: return ">"; case GTEQ: return ">="; case LT: return "<"; case LTEQ: return "<="; default: return "??"; } }
[ "public", "static", "String", "getOperatorAsString", "(", "int", "op", ")", "{", "switch", "(", "op", ")", "{", "case", "EQ", ":", "return", "\"=\"", ";", "case", "NEQ", ":", "return", "\"!=\"", ";", "case", "GT", ":", "return", "\">\"", ";", "case", ...
Returns a string representation of the specified relation operator. @param op the relation operator @return the string representaion of the relation operator.
[ "Returns", "a", "string", "representation", "of", "the", "specified", "relation", "operator", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/NameOpValue.java#L92-L108
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/NameOpValue.java
NameOpValue.add
public void add(String [] strValues) { if (strValues == null) return; if (values == null) values = new LinkedList(); for (int i=0;i<strValues.length;i++) { values.add( new Value(strValues[i]) ); } }
java
public void add(String [] strValues) { if (strValues == null) return; if (values == null) values = new LinkedList(); for (int i=0;i<strValues.length;i++) { values.add( new Value(strValues[i]) ); } }
[ "public", "void", "add", "(", "String", "[", "]", "strValues", ")", "{", "if", "(", "strValues", "==", "null", ")", "return", ";", "if", "(", "values", "==", "null", ")", "values", "=", "new", "LinkedList", "(", ")", ";", "for", "(", "int", "i", ...
Adds an array of values to the list of values. Each element in the array is converted into a Value object and inserted as a separate value into the list of values. @param strValues the array of values to add.
[ "Adds", "an", "array", "of", "values", "to", "the", "list", "of", "values", ".", "Each", "element", "in", "the", "array", "is", "converted", "into", "a", "Value", "object", "and", "inserted", "as", "a", "separate", "value", "into", "the", "list", "of", ...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/NameOpValue.java#L139-L145
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/NameOpValue.java
NameOpValue.add
public void add(List list) { if (values == null) values = new LinkedList(); values.add(list); }
java
public void add(List list) { if (values == null) values = new LinkedList(); values.add(list); }
[ "public", "void", "add", "(", "List", "list", ")", "{", "if", "(", "values", "==", "null", ")", "values", "=", "new", "LinkedList", "(", ")", ";", "values", ".", "add", "(", "list", ")", ";", "}" ]
Adds a list to the list of values. It is inserted as a single element. @param list the list to add.
[ "Adds", "a", "list", "to", "the", "list", "of", "values", ".", "It", "is", "inserted", "as", "a", "single", "element", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/NameOpValue.java#L153-L156
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/NameOpValue.java
NameOpValue.evaluate
public NameOpValue evaluate(Map symbolTable) throws RslEvaluationException { List list = evaluateSub(values, symbolTable); NameOpValue newNV = new NameOpValue(getAttribute(), getOperator()); newNV.setValues(list); return newNV; }
java
public NameOpValue evaluate(Map symbolTable) throws RslEvaluationException { List list = evaluateSub(values, symbolTable); NameOpValue newNV = new NameOpValue(getAttribute(), getOperator()); newNV.setValues(list); return newNV; }
[ "public", "NameOpValue", "evaluate", "(", "Map", "symbolTable", ")", "throws", "RslEvaluationException", "{", "List", "list", "=", "evaluateSub", "(", "values", ",", "symbolTable", ")", ";", "NameOpValue", "newNV", "=", "new", "NameOpValue", "(", "getAttribute", ...
Evaluates the relation against the symbol table. @param symbolTable the symbol table to evalute the relation against. @return a new evaluted relation. @exception RslEvaluationException If an error occured during rsl evaluation.
[ "Evaluates", "the", "relation", "against", "the", "symbol", "table", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/NameOpValue.java#L225-L236
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/vanilla/Reply.java
Reply.ignoreLeading0
protected static String ignoreLeading0(String line) { if (line.length() > 0 && line.charAt(0) == 0) { logger.debug("WARNING: The first character of the reply is 0. Ignoring the character."); /* logger.debug( "\n\nWARNING:\n In the reply received from the server, the first character's code is 0! I wi...
java
protected static String ignoreLeading0(String line) { if (line.length() > 0 && line.charAt(0) == 0) { logger.debug("WARNING: The first character of the reply is 0. Ignoring the character."); /* logger.debug( "\n\nWARNING:\n In the reply received from the server, the first character's code is 0! I wi...
[ "protected", "static", "String", "ignoreLeading0", "(", "String", "line", ")", "{", "if", "(", "line", ".", "length", "(", ")", ">", "0", "&&", "line", ".", "charAt", "(", "0", ")", "==", "0", ")", "{", "logger", ".", "debug", "(", "\"WARNING: The fi...
GT2.0 wuftp server incorrectly inserts \0 between lines. We have to deal with that.
[ "GT2", ".", "0", "wuftp", "server", "incorrectly", "inserts", "\\", "0", "between", "lines", ".", "We", "have", "to", "deal", "with", "that", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/vanilla/Reply.java#L234-L249
train
jglobus/JGlobus
io/src/main/java/org/globus/io/streams/HTTPInputStream.java
HTTPInputStream.openSocket
protected Socket openSocket(String host, int port) throws IOException { return SocketFactory.getDefault().createSocket(host, port); }
java
protected Socket openSocket(String host, int port) throws IOException { return SocketFactory.getDefault().createSocket(host, port); }
[ "protected", "Socket", "openSocket", "(", "String", "host", ",", "int", "port", ")", "throws", "IOException", "{", "return", "SocketFactory", ".", "getDefault", "(", ")", ".", "createSocket", "(", "host", ",", "port", ")", ";", "}" ]
subclasses should overwrite this function
[ "subclasses", "should", "overwrite", "this", "function" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/streams/HTTPInputStream.java#L63-L66
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/tools/ProxyInit.java
ProxyInit.verify
public void verify() throws Exception { Map<String, ProxyPolicyHandler> handlers = null; if (proxyCertInfo != null) { String oid = proxyCertInfo.getProxyPolicy().getPolicyLanguage().getId(); handlers = new HashMap<String,ProxyPolicyHandler>(); handlers.put(oid, new P...
java
public void verify() throws Exception { Map<String, ProxyPolicyHandler> handlers = null; if (proxyCertInfo != null) { String oid = proxyCertInfo.getProxyPolicy().getPolicyLanguage().getId(); handlers = new HashMap<String,ProxyPolicyHandler>(); handlers.put(oid, new P...
[ "public", "void", "verify", "(", ")", "throws", "Exception", "{", "Map", "<", "String", ",", "ProxyPolicyHandler", ">", "handlers", "=", "null", ";", "if", "(", "proxyCertInfo", "!=", "null", ")", "{", "String", "oid", "=", "proxyCertInfo", ".", "getProxyP...
verifies the proxy credential
[ "verifies", "the", "proxy", "credential" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/tools/ProxyInit.java#L145-L174
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/trustmanager/X509ProxyCertPathValidator.java
X509ProxyCertPathValidator.getCertificateCheckers
protected List<CertificateChecker> getCertificateCheckers() { List<CertificateChecker> checkers = new ArrayList<CertificateChecker>(); checkers.add(new DateValidityChecker()); checkers.add(new UnsupportedCriticalExtensionChecker()); checkers.add(new IdentityChecker(this)); // NOT...
java
protected List<CertificateChecker> getCertificateCheckers() { List<CertificateChecker> checkers = new ArrayList<CertificateChecker>(); checkers.add(new DateValidityChecker()); checkers.add(new UnsupportedCriticalExtensionChecker()); checkers.add(new IdentityChecker(this)); // NOT...
[ "protected", "List", "<", "CertificateChecker", ">", "getCertificateCheckers", "(", ")", "{", "List", "<", "CertificateChecker", ">", "checkers", "=", "new", "ArrayList", "<", "CertificateChecker", ">", "(", ")", ";", "checkers", ".", "add", "(", "new", "DateV...
COMMENT enable the checkers again when ProxyPathValidator starts working!
[ "COMMENT", "enable", "the", "checkers", "again", "when", "ProxyPathValidator", "starts", "working!" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/trustmanager/X509ProxyCertPathValidator.java#L451-L466
train
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSManagerImpl.java
GlobusGSSManagerImpl.createCredential
public GSSCredential createCredential (byte[] buff, int option, int lifetime, Oid mech, int usage) throws GSSException { checkMechanism(mech); if (buff == null || buff.length < 1) { throw new GlobusGSSException(GSSException.FAILURE, GlobusGSSException.BAD_ARGUMENT, "...
java
public GSSCredential createCredential (byte[] buff, int option, int lifetime, Oid mech, int usage) throws GSSException { checkMechanism(mech); if (buff == null || buff.length < 1) { throw new GlobusGSSException(GSSException.FAILURE, GlobusGSSException.BAD_ARGUMENT, "...
[ "public", "GSSCredential", "createCredential", "(", "byte", "[", "]", "buff", ",", "int", "option", ",", "int", "lifetime", ",", "Oid", "mech", ",", "int", "usage", ")", "throws", "GSSException", "{", "checkMechanism", "(", "mech", ")", ";", "if", "(", "...
Imports a credential. @param lifetime Only lifetime set to {@link GSSCredential#DEFAULT_LIFETIME GSSCredential.DEFAULT_LIFETIME} is allowed.
[ "Imports", "a", "credential", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSManagerImpl.java#L189-L247
train
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSManagerImpl.java
GlobusGSSManagerImpl.checkMechanism
public static void checkMechanism(Oid mech) throws GSSException { if (mech != null && !mech.equals(GSSConstants.MECH_OID)) { throw new GSSException(GSSException.BAD_MECH); } }
java
public static void checkMechanism(Oid mech) throws GSSException { if (mech != null && !mech.equals(GSSConstants.MECH_OID)) { throw new GSSException(GSSException.BAD_MECH); } }
[ "public", "static", "void", "checkMechanism", "(", "Oid", "mech", ")", "throws", "GSSException", "{", "if", "(", "mech", "!=", "null", "&&", "!", "mech", ".", "equals", "(", "GSSConstants", ".", "MECH_OID", ")", ")", "{", "throw", "new", "GSSException", ...
Checks if the specified mechanism matches the mechanism supported by this implementation. @param mech mechanism to check @exception GSSException if mechanism not supported.
[ "Checks", "if", "the", "specified", "mechanism", "matches", "the", "mechanism", "supported", "by", "this", "implementation", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSManagerImpl.java#L306-L311
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/AbstractRslNode.java
AbstractRslNode.add
public boolean add(AbstractRslNode node) { if (_specifications == null) _specifications = new LinkedList(); return _specifications.add(node); }
java
public boolean add(AbstractRslNode node) { if (_specifications == null) _specifications = new LinkedList(); return _specifications.add(node); }
[ "public", "boolean", "add", "(", "AbstractRslNode", "node", ")", "{", "if", "(", "_specifications", "==", "null", ")", "_specifications", "=", "new", "LinkedList", "(", ")", ";", "return", "_specifications", ".", "add", "(", "node", ")", ";", "}" ]
Adds a rsl parse tree to this node. @param node the rsl parse tree to add.
[ "Adds", "a", "rsl", "parse", "tree", "to", "this", "node", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/AbstractRslNode.java#L50-L53
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/AbstractRslNode.java
AbstractRslNode.removeSpecification
public boolean removeSpecification(AbstractRslNode node) { if (_specifications == null || node == null) return false; return _specifications.remove(node); }
java
public boolean removeSpecification(AbstractRslNode node) { if (_specifications == null || node == null) return false; return _specifications.remove(node); }
[ "public", "boolean", "removeSpecification", "(", "AbstractRslNode", "node", ")", "{", "if", "(", "_specifications", "==", "null", "||", "node", "==", "null", ")", "return", "false", ";", "return", "_specifications", ".", "remove", "(", "node", ")", ";", "}" ...
Removes a specific sub-specification tree from the sub-specification list. @param node node to remove. @return true if the tree was removed successfuly. False, otherwise.
[ "Removes", "a", "specific", "sub", "-", "specification", "tree", "from", "the", "sub", "-", "specification", "list", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/AbstractRslNode.java#L81-L84
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/AbstractRslNode.java
AbstractRslNode.canonicalize
public static String canonicalize(String str) { if (str == null) return null; int length = str.length(); char ch; StringBuffer buf = new StringBuffer(length); for (int i=0;i<length;i++) { ch = str.charAt(i); if (ch == '_') continue; buf.append( Character.toLowerCase(ch) ); } return buf.toString();...
java
public static String canonicalize(String str) { if (str == null) return null; int length = str.length(); char ch; StringBuffer buf = new StringBuffer(length); for (int i=0;i<length;i++) { ch = str.charAt(i); if (ch == '_') continue; buf.append( Character.toLowerCase(ch) ); } return buf.toString();...
[ "public", "static", "String", "canonicalize", "(", "String", "str", ")", "{", "if", "(", "str", "==", "null", ")", "return", "null", ";", "int", "length", "=", "str", ".", "length", "(", ")", ";", "char", "ch", ";", "StringBuffer", "buf", "=", "new",...
Canonicalizes a string by removing any underscores and moving all characters to lowercase. @param str string to canonicalize @return canonicalized string
[ "Canonicalizes", "a", "string", "by", "removing", "any", "underscores", "and", "moving", "all", "characters", "to", "lowercase", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/AbstractRslNode.java#L246-L257
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/vanilla/BasicClientControlChannel.java
BasicClientControlChannel.waitFor
public void waitFor(Flag flag, int waitDelay) throws ServerException, IOException, InterruptedException { waitFor(flag, waitDelay, WAIT_FOREVER); }
java
public void waitFor(Flag flag, int waitDelay) throws ServerException, IOException, InterruptedException { waitFor(flag, waitDelay, WAIT_FOREVER); }
[ "public", "void", "waitFor", "(", "Flag", "flag", ",", "int", "waitDelay", ")", "throws", "ServerException", ",", "IOException", ",", "InterruptedException", "{", "waitFor", "(", "flag", ",", "waitDelay", ",", "WAIT_FOREVER", ")", ";", "}" ]
Return when reply is waiting
[ "Return", "when", "reply", "is", "waiting" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/vanilla/BasicClientControlChannel.java#L39-L45
train
jglobus/JGlobus
axis/src/main/java/org/globus/axis/transport/GSIHTTPTransport.java
GSIHTTPTransport.setupMessageContextImpl
public void setupMessageContextImpl(MessageContext mc, Call call, AxisEngine engine) throws AxisFault { if (action != null) { mc.setUseSOAPAction(true); mc.setSOAPActionURI(action); } ...
java
public void setupMessageContextImpl(MessageContext mc, Call call, AxisEngine engine) throws AxisFault { if (action != null) { mc.setUseSOAPAction(true); mc.setSOAPActionURI(action); } ...
[ "public", "void", "setupMessageContextImpl", "(", "MessageContext", "mc", ",", "Call", "call", ",", "AxisEngine", "engine", ")", "throws", "AxisFault", "{", "if", "(", "action", "!=", "null", ")", "{", "mc", ".", "setUseSOAPAction", "(", "true", ")", ";", ...
Set up any transport-specific derived properties in the message context. @param mc the context to set up @param call the client service instance @param engine the engine containing the registries @throws AxisFault if service cannot be found
[ "Set", "up", "any", "transport", "-", "specific", "derived", "properties", "in", "the", "message", "context", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/axis/src/main/java/org/globus/axis/transport/GSIHTTPTransport.java#L69-L91
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/proxy/ext/ProxyPolicy.java
ProxyPolicy.toASN1Primitive
public ASN1Primitive toASN1Primitive() { ASN1EncodableVector vec = new ASN1EncodableVector(); vec.add(this.policyLanguage); if (this.policy != null) { vec.add(this.policy); } return new DERSequence(vec); }
java
public ASN1Primitive toASN1Primitive() { ASN1EncodableVector vec = new ASN1EncodableVector(); vec.add(this.policyLanguage); if (this.policy != null) { vec.add(this.policy); } return new DERSequence(vec); }
[ "public", "ASN1Primitive", "toASN1Primitive", "(", ")", "{", "ASN1EncodableVector", "vec", "=", "new", "ASN1EncodableVector", "(", ")", ";", "vec", ".", "add", "(", "this", ".", "policyLanguage", ")", ";", "if", "(", "this", ".", "policy", "!=", "null", ")...
Returns the DER-encoded ASN.1 representation of proxy policy. @return <code>DERObject</code> the encoded representation of the proxy policy.
[ "Returns", "the", "DER", "-", "encoded", "ASN", ".", "1", "representation", "of", "proxy", "policy", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/proxy/ext/ProxyPolicy.java#L136-L147
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/HostPort6.java
HostPort6.toFtpCmdArgument
public String toFtpCmdArgument() { StringBuffer msg = new StringBuffer(); msg.append("|"); if (this.version != null) { msg.append(this.version); } msg.append("|"); if (this.host != null) { msg.append(this.host); } msg.append("|"); ...
java
public String toFtpCmdArgument() { StringBuffer msg = new StringBuffer(); msg.append("|"); if (this.version != null) { msg.append(this.version); } msg.append("|"); if (this.host != null) { msg.append(this.host); } msg.append("|"); ...
[ "public", "String", "toFtpCmdArgument", "(", ")", "{", "StringBuffer", "msg", "=", "new", "StringBuffer", "(", ")", ";", "msg", ".", "append", "(", "\"|\"", ")", ";", "if", "(", "this", ".", "version", "!=", "null", ")", "{", "msg", ".", "append", "(...
Returns the host-port information in the format used by EPRT command. &lt;d&gt;&lt;net-prt&gt;&lt;d&gt;&lt;net-addr&gt;&lt;d&gt;&lt;tcp-port&gt;&lt;d&gt; @return host-port information in EPRT command representation.
[ "Returns", "the", "host", "-", "port", "information", "in", "the", "format", "used", "by", "EPRT", "command", ".", "&lt", ";", "d&gt", ";", "&lt", ";", "net", "-", "prt&gt", ";", "&lt", ";", "d&gt", ";", "&lt", ";", "net", "-", "addr&gt", ";", "&lt...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/HostPort6.java#L151-L165
train
jglobus/JGlobus
io/src/main/java/org/globus/io/gass/server/GassServer.java
GassServer.shutdown
public static void shutdown(GSSCredential cred, GlobusURL gassURL) throws IOException, GSSException { OutputStream output = null; InputStream input = null; Socket socket = null; try { if (gassURL.getProtocol().equalsIgnoreCase("https")) { GSSManager manager = ExtendedGSSManager.getIn...
java
public static void shutdown(GSSCredential cred, GlobusURL gassURL) throws IOException, GSSException { OutputStream output = null; InputStream input = null; Socket socket = null; try { if (gassURL.getProtocol().equalsIgnoreCase("https")) { GSSManager manager = ExtendedGSSManager.getIn...
[ "public", "static", "void", "shutdown", "(", "GSSCredential", "cred", ",", "GlobusURL", "gassURL", ")", "throws", "IOException", ",", "GSSException", "{", "OutputStream", "output", "=", "null", ";", "InputStream", "input", "=", "null", ";", "Socket", "socket", ...
Shutdowns a remote gass server. The server must have the CLIENT_SHUTDOWN option enabled for this to work. @param cred credentials to use. @param gassURL the url of the remote gass server.
[ "Shutdowns", "a", "remote", "gass", "server", ".", "The", "server", "must", "have", "the", "CLIENT_SHUTDOWN", "option", "enabled", "for", "this", "to", "work", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/gass/server/GassServer.java#L220-L285
train
jglobus/JGlobus
io/src/main/java/org/globus/io/gass/server/GassServer.java
GassClientHandler.transfer
private void transfer(OutputStream os, String path) throws IOException { path = decodeUrlPath(path); File f = new File(path); FileInputStream file = new FileInputStream(f); long length = f.length(); StringBuffer buf = new StringBuffer(OKHEADER) .append(CONNECTION_CLOSE)...
java
private void transfer(OutputStream os, String path) throws IOException { path = decodeUrlPath(path); File f = new File(path); FileInputStream file = new FileInputStream(f); long length = f.length(); StringBuffer buf = new StringBuffer(OKHEADER) .append(CONNECTION_CLOSE)...
[ "private", "void", "transfer", "(", "OutputStream", "os", ",", "String", "path", ")", "throws", "IOException", "{", "path", "=", "decodeUrlPath", "(", "path", ")", ";", "File", "f", "=", "new", "File", "(", "path", ")", ";", "FileInputStream", "file", "=...
Transfer from a file, given its path, to the given OutputStream. The BufferedWriter points to the same stream but is used to write HTTP header information.
[ "Transfer", "from", "a", "file", "given", "its", "path", "to", "the", "given", "OutputStream", ".", "The", "BufferedWriter", "points", "to", "the", "same", "stream", "but", "is", "used", "to", "write", "HTTP", "header", "information", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/gass/server/GassServer.java#L454-L487
train
jglobus/JGlobus
io/src/main/java/org/globus/io/gass/server/GassServer.java
GassClientHandler.fromHex
private long fromHex(String s) { long result = 0; int size = s.length(); for (int i = 0; i < size; i++) { char c = s.charAt(i); result *= 16; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': c...
java
private long fromHex(String s) { long result = 0; int size = s.length(); for (int i = 0; i < size; i++) { char c = s.charAt(i); result *= 16; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': c...
[ "private", "long", "fromHex", "(", "String", "s", ")", "{", "long", "result", "=", "0", ";", "int", "size", "=", "s", ".", "length", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "{", "char", "...
Convert a String representing a hex number to a long.
[ "Convert", "a", "String", "representing", "a", "hex", "number", "to", "a", "long", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/gass/server/GassServer.java#L666-L706
train
jglobus/JGlobus
myproxy/src/main/java/org/globus/myproxy/Params.java
Params.makeRequest
protected String makeRequest(boolean includePassword) { StringBuffer buf = new StringBuffer(); buf.append(VERSION).append(CRLF); buf.append(COMMAND).append(String.valueOf(command)).append(CRLF); buf.append(USERNAME).append(this.username).append(CRLF); String pwd = getPassphrase(); ...
java
protected String makeRequest(boolean includePassword) { StringBuffer buf = new StringBuffer(); buf.append(VERSION).append(CRLF); buf.append(COMMAND).append(String.valueOf(command)).append(CRLF); buf.append(USERNAME).append(this.username).append(CRLF); String pwd = getPassphrase(); ...
[ "protected", "String", "makeRequest", "(", "boolean", "includePassword", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "buf", ".", "append", "(", "VERSION", ")", ".", "append", "(", "CRLF", ")", ";", "buf", ".", "append", "(...
Serializes the parameters into a MyProxy request. Subclasses should overwrite this function and append the custom parameters to the output of this function.
[ "Serializes", "the", "parameters", "into", "a", "MyProxy", "request", ".", "Subclasses", "should", "overwrite", "this", "function", "and", "append", "the", "custom", "parameters", "to", "the", "output", "of", "this", "function", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/myproxy/src/main/java/org/globus/myproxy/Params.java#L94-L115
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/trustmanager/PKITrustManagerFactory.java
PKITrustManagerFactory.engineInit
@Override protected void engineInit(KeyStore keyStore) throws KeyStoreException { try { this .engineInit(new CertPathTrustManagerParameters( new X509ProxyCertPathParameters(keyStore, null, null, false))); } catch (InvalidAlgorithmParameterException e) { throw new KeyStoreException(e); ...
java
@Override protected void engineInit(KeyStore keyStore) throws KeyStoreException { try { this .engineInit(new CertPathTrustManagerParameters( new X509ProxyCertPathParameters(keyStore, null, null, false))); } catch (InvalidAlgorithmParameterException e) { throw new KeyStoreException(e); ...
[ "@", "Override", "protected", "void", "engineInit", "(", "KeyStore", "keyStore", ")", "throws", "KeyStoreException", "{", "try", "{", "this", ".", "engineInit", "(", "new", "CertPathTrustManagerParameters", "(", "new", "X509ProxyCertPathParameters", "(", "keyStore", ...
Initializes this factory with a source of certificate authorities and related trust material. @param keyStore The key store or null @throws KeyStoreException if the initialization fails.
[ "Initializes", "this", "factory", "with", "a", "source", "of", "certificate", "authorities", "and", "related", "trust", "material", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/trustmanager/PKITrustManagerFactory.java#L53-L63
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/extended/GridFTPControlChannel.java
GridFTPControlChannel.setProtection
public void setProtection(int protection) { switch(protection) { case GridFTPSession.PROTECTION_CLEAR: throw new IllegalArgumentException("Unsupported protection: " + protection); case GridFTPSession.PROTECTION_SAFE: case GridFT...
java
public void setProtection(int protection) { switch(protection) { case GridFTPSession.PROTECTION_CLEAR: throw new IllegalArgumentException("Unsupported protection: " + protection); case GridFTPSession.PROTECTION_SAFE: case GridFT...
[ "public", "void", "setProtection", "(", "int", "protection", ")", "{", "switch", "(", "protection", ")", "{", "case", "GridFTPSession", ".", "PROTECTION_CLEAR", ":", "throw", "new", "IllegalArgumentException", "(", "\"Unsupported protection: \"", "+", "protection", ...
Sets data channel protection level. @param protection should be {@link GridFTPSession#PROTECTION_CLEAR CLEAR}, {@link GridFTPSession#PROTECTION_SAFE SAFE}, or {@link GridFTPSession#PROTECTION_PRIVATE PRIVATE}, or {@link GridFTPSession#PROTECTION_CONFIDENTIAL CONFIDENTIAL}.
[ "Sets", "data", "channel", "protection", "level", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/extended/GridFTPControlChannel.java#L82-L98
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/SigningPolicy.java
SigningPolicy.isValidSubject
public boolean isValidSubject(X500Principal subject) { if (subject == null) { throw new IllegalArgumentException(); } String subjectDN = CertificateUtil.toGlobusID(subject); if ((this.allowedDNs == null) || (this.allowedDNs.size() < 1)) { return false; ...
java
public boolean isValidSubject(X500Principal subject) { if (subject == null) { throw new IllegalArgumentException(); } String subjectDN = CertificateUtil.toGlobusID(subject); if ((this.allowedDNs == null) || (this.allowedDNs.size() < 1)) { return false; ...
[ "public", "boolean", "isValidSubject", "(", "X500Principal", "subject", ")", "{", "if", "(", "subject", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "String", "subjectDN", "=", "CertificateUtil", ".", "toGlobusID", "(...
Ascertains if the subjectDN is valid against this policy. @param subject Subject DN to be validated @return true if the DN is valid under this policy and false if it is not
[ "Ascertains", "if", "the", "subjectDN", "is", "valid", "against", "this", "policy", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/SigningPolicy.java#L94-L117
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java
BouncyCastleUtil.getIdentity
public static String getIdentity(X509Certificate cert) { if (cert == null) { return null; } String subjectDN = cert.getSubjectX500Principal().getName(X500Principal.RFC2253); X509Name name = new X509Name(true, subjectDN); return X509NameHelper.toString(name); }
java
public static String getIdentity(X509Certificate cert) { if (cert == null) { return null; } String subjectDN = cert.getSubjectX500Principal().getName(X500Principal.RFC2253); X509Name name = new X509Name(true, subjectDN); return X509NameHelper.toString(name); }
[ "public", "static", "String", "getIdentity", "(", "X509Certificate", "cert", ")", "{", "if", "(", "cert", "==", "null", ")", "{", "return", "null", ";", "}", "String", "subjectDN", "=", "cert", ".", "getSubjectX500Principal", "(", ")", ".", "getName", "(",...
Returns the subject DN of the given certificate in the Globus format. @param cert the certificate to get the subject of. The certificate must be of <code>X509CertificateObject</code> type. @return the subject DN of the certificate in the Globus format.
[ "Returns", "the", "subject", "DN", "of", "the", "given", "certificate", "in", "the", "Globus", "format", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java#L425-L433
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java
BouncyCastleUtil.getExtensionValue
public static byte[] getExtensionValue(byte [] certExtValue) throws IOException { ByteArrayInputStream inStream = new ByteArrayInputStream(certExtValue); ASN1InputStream derInputStream = new ASN1InputStream(inStream); ASN1Primitive object = derInputStream.readObject(); if (object instanceof ASN1OctetString)...
java
public static byte[] getExtensionValue(byte [] certExtValue) throws IOException { ByteArrayInputStream inStream = new ByteArrayInputStream(certExtValue); ASN1InputStream derInputStream = new ASN1InputStream(inStream); ASN1Primitive object = derInputStream.readObject(); if (object instanceof ASN1OctetString)...
[ "public", "static", "byte", "[", "]", "getExtensionValue", "(", "byte", "[", "]", "certExtValue", ")", "throws", "IOException", "{", "ByteArrayInputStream", "inStream", "=", "new", "ByteArrayInputStream", "(", "certExtValue", ")", ";", "ASN1InputStream", "derInputSt...
Retrieves the actual value of the X.509 extension. @param certExtValue the DER-encoded OCTET string value of the extension. @return the decoded/actual value of the extension (the octets).
[ "Retrieves", "the", "actual", "value", "of", "the", "X", ".", "509", "extension", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java#L499-L509
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java
BouncyCastleUtil.getExtensionValue
public static byte[] getExtensionValue(X509Certificate cert, String oid) throws IOException { if (cert == null) { throw new IllegalArgumentException(i18n.getMessage("certNull")); } if (oid == null) { throw new IllegalArgumentException(i18n.getMessage("oidNull")); } byte [] value...
java
public static byte[] getExtensionValue(X509Certificate cert, String oid) throws IOException { if (cert == null) { throw new IllegalArgumentException(i18n.getMessage("certNull")); } if (oid == null) { throw new IllegalArgumentException(i18n.getMessage("oidNull")); } byte [] value...
[ "public", "static", "byte", "[", "]", "getExtensionValue", "(", "X509Certificate", "cert", ",", "String", "oid", ")", "throws", "IOException", "{", "if", "(", "cert", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "i18n", ".", "getM...
Returns the actual value of the extension. @param cert the certificate that contains the extensions to retrieve. @param oid the oid of the extension to retrieve. @return the actual value of the extension (not octet string encoded) @exception IOException if decoding the extension fails.
[ "Returns", "the", "actual", "value", "of", "the", "extension", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java#L519-L534
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/util/http/HTTPParser.java
HTTPParser.parse
protected void parse() throws IOException { String line; line = _reader.readLine(); if (logger.isTraceEnabled()) { logger.trace(line); } parseHead(line); while ( (line = _reader.readLine()).length() != 0 ) { if (logger.isTraceEnabled()) { logger.trace(line); } if (line.startsWith(HTTPPro...
java
protected void parse() throws IOException { String line; line = _reader.readLine(); if (logger.isTraceEnabled()) { logger.trace(line); } parseHead(line); while ( (line = _reader.readLine()).length() != 0 ) { if (logger.isTraceEnabled()) { logger.trace(line); } if (line.startsWith(HTTPPro...
[ "protected", "void", "parse", "(", ")", "throws", "IOException", "{", "String", "line", ";", "line", "=", "_reader", ".", "readLine", "(", ")", ";", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", "(", "line", ...
Parses the typical HTTP header. @exception IOException if a connection fails or bad/incomplete request
[ "Parses", "the", "typical", "HTTP", "header", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/util/http/HTTPParser.java#L71-L102
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.getSize
public long getSize(String filename) throws IOException, ServerException { if (filename == null) { throw new IllegalArgumentException("Required argument missing"); } Command cmd = new Command("SIZE", filename); Reply reply = null; try { reply = con...
java
public long getSize(String filename) throws IOException, ServerException { if (filename == null) { throw new IllegalArgumentException("Required argument missing"); } Command cmd = new Command("SIZE", filename); Reply reply = null; try { reply = con...
[ "public", "long", "getSize", "(", "String", "filename", ")", "throws", "IOException", ",", "ServerException", "{", "if", "(", "filename", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Required argument missing\"", ")", ";", "}", "Co...
Returns the remote file size. @param filename filename get the size for. @return size of the file. @exception ServerException if the file does not exist or an error occured.
[ "Returns", "the", "remote", "file", "size", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L141-L161
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.getLastModified
public Date getLastModified(String filename) throws IOException, ServerException { if (filename == null) { throw new IllegalArgumentException("Required argument missing"); } Command cmd = new Command("MDTM", filename); Reply reply = null; try { rep...
java
public Date getLastModified(String filename) throws IOException, ServerException { if (filename == null) { throw new IllegalArgumentException("Required argument missing"); } Command cmd = new Command("MDTM", filename); Reply reply = null; try { rep...
[ "public", "Date", "getLastModified", "(", "String", "filename", ")", "throws", "IOException", ",", "ServerException", "{", "if", "(", "filename", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Required argument missing\"", ")", ";", "}...
Returns last modification time of the specifed file. @param filename filename get the last modification time for. @return the time and date of the last modification. @exception ServerException if the file does not exist or an error occured.
[ "Returns", "last", "modification", "time", "of", "the", "specifed", "file", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L171-L201
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.changeDir
public void changeDir(String dir) throws IOException, ServerException { if (dir == null) { throw new IllegalArgumentException("Required argument missing"); } Command cmd = new Command("CWD", dir); try { controlChannel.execute(cmd); } catch (FTPRepl...
java
public void changeDir(String dir) throws IOException, ServerException { if (dir == null) { throw new IllegalArgumentException("Required argument missing"); } Command cmd = new Command("CWD", dir); try { controlChannel.execute(cmd); } catch (FTPRepl...
[ "public", "void", "changeDir", "(", "String", "dir", ")", "throws", "IOException", ",", "ServerException", "{", "if", "(", "dir", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Required argument missing\"", ")", ";", "}", "Command", ...
Changes the remote current working directory.
[ "Changes", "the", "remote", "current", "working", "directory", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L236-L251
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.deleteFile
public void deleteFile(String filename) throws IOException, ServerException { if (filename == null) { throw new IllegalArgumentException("Required argument missing"); } Command cmd = new Command("DELE", filename); try { controlChannel.execute(cmd); ...
java
public void deleteFile(String filename) throws IOException, ServerException { if (filename == null) { throw new IllegalArgumentException("Required argument missing"); } Command cmd = new Command("DELE", filename); try { controlChannel.execute(cmd); ...
[ "public", "void", "deleteFile", "(", "String", "filename", ")", "throws", "IOException", ",", "ServerException", "{", "if", "(", "filename", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Required argument missing\"", ")", ";", "}", ...
Deletes the remote file.
[ "Deletes", "the", "remote", "file", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L276-L291
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.rename
public void rename(String oldName, String newName) throws IOException, ServerException { if (oldName == null || newName == null) { throw new IllegalArgumentException("Required argument missing"); } Command cmd = new Command("RNFR", oldName); try { Reply re...
java
public void rename(String oldName, String newName) throws IOException, ServerException { if (oldName == null || newName == null) { throw new IllegalArgumentException("Required argument missing"); } Command cmd = new Command("RNFR", oldName); try { Reply re...
[ "public", "void", "rename", "(", "String", "oldName", ",", "String", "newName", ")", "throws", "IOException", ",", "ServerException", "{", "if", "(", "oldName", "==", "null", "||", "newName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", ...
Renames remote directory.
[ "Renames", "remote", "directory", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L316-L335
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.getCurrentDir
public String getCurrentDir() throws IOException, ServerException { Reply reply = null; try { reply = controlChannel.execute(Command.PWD); } catch (FTPReplyParseException rpe) { throw ServerException.embedFTPReplyParseException(rpe); } catch (UnexpectedReplyCodeEx...
java
public String getCurrentDir() throws IOException, ServerException { Reply reply = null; try { reply = controlChannel.execute(Command.PWD); } catch (FTPReplyParseException rpe) { throw ServerException.embedFTPReplyParseException(rpe); } catch (UnexpectedReplyCodeEx...
[ "public", "String", "getCurrentDir", "(", ")", "throws", "IOException", ",", "ServerException", "{", "Reply", "reply", "=", "null", ";", "try", "{", "reply", "=", "controlChannel", ".", "execute", "(", "Command", ".", "PWD", ")", ";", "}", "catch", "(", ...
Returns remote current working directory. @return remote current working directory.
[ "Returns", "remote", "current", "working", "directory", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L341-L361
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.goUpDir
public void goUpDir() throws IOException, ServerException { try { controlChannel.execute(Command.CDUP); // alternative: changeDir(".."); } catch (FTPReplyParseException rpe) { throw ServerException.embedFTPReplyParseException(rpe); } catch (UnexpectedReplyCode...
java
public void goUpDir() throws IOException, ServerException { try { controlChannel.execute(Command.CDUP); // alternative: changeDir(".."); } catch (FTPReplyParseException rpe) { throw ServerException.embedFTPReplyParseException(rpe); } catch (UnexpectedReplyCode...
[ "public", "void", "goUpDir", "(", ")", "throws", "IOException", ",", "ServerException", "{", "try", "{", "controlChannel", ".", "execute", "(", "Command", ".", "CDUP", ")", ";", "// alternative: changeDir(\"..\");", "}", "catch", "(", "FTPReplyParseException", "rp...
Changes remote current working directory to the higher level.
[ "Changes", "remote", "current", "working", "directory", "to", "the", "higher", "level", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L366-L377
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.list
public Vector list(String filter, String modifier) throws ServerException, ClientException, IOException { ByteArrayDataSink sink = new ByteArrayDataSink(); list(filter, modifier, sink); ByteArrayOutputStream received = sink.getData(); // transfer done. Data is in received str...
java
public Vector list(String filter, String modifier) throws ServerException, ClientException, IOException { ByteArrayDataSink sink = new ByteArrayDataSink(); list(filter, modifier, sink); ByteArrayOutputStream received = sink.getData(); // transfer done. Data is in received str...
[ "public", "Vector", "list", "(", "String", "filter", ",", "String", "modifier", ")", "throws", "ServerException", ",", "ClientException", ",", "IOException", "{", "ByteArrayDataSink", "sink", "=", "new", "ByteArrayDataSink", "(", ")", ";", "list", "(", "filter",...
Performs remote directory listing with the specified filter and modifier. Sends 'LIST &lt;modifier&gt; &lt;filter&gt;' command. <br><b>Note</b>: <i> This function can only parse Unix ls -d like output. Please note that the LIST output is unspecified in the FTP standard and each server might return slightly different o...
[ "Performs", "remote", "directory", "listing", "with", "the", "specified", "filter", "and", "modifier", ".", "Sends", "LIST", "&lt", ";", "modifier&gt", ";", "&lt", ";", "filter&gt", ";", "command", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L475-L518
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.list
public void list(String filter, String modifier, DataSink sink) throws ServerException, ClientException, IOException { String arg = null; if (modifier != null) { arg = modifier; } if (filter != null) { arg = (arg == null) ? filter : arg + " " + filter; ...
java
public void list(String filter, String modifier, DataSink sink) throws ServerException, ClientException, IOException { String arg = null; if (modifier != null) { arg = modifier; } if (filter != null) { arg = (arg == null) ? filter : arg + " " + filter; ...
[ "public", "void", "list", "(", "String", "filter", ",", "String", "modifier", ",", "DataSink", "sink", ")", "throws", "ServerException", ",", "ClientException", ",", "IOException", "{", "String", "arg", "=", "null", ";", "if", "(", "modifier", "!=", "null", ...
Performs directory listing and writes the result to the supplied data sink. This method is allowed in ASCII mode only. <br><b>Note</b>: <i> Please keep in mind that the ftp server might not recognize or support all the different modifiers or filters. In fact, some servers such as GridFTP server distributed with GT 4.0...
[ "Performs", "directory", "listing", "and", "writes", "the", "result", "to", "the", "supplied", "data", "sink", ".", "This", "method", "is", "allowed", "in", "ASCII", "mode", "only", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L538-L552
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.nlist
public Vector nlist(String path) throws ServerException, ClientException, IOException { ByteArrayDataSink sink = new ByteArrayDataSink(); nlist(path, sink); ByteArrayOutputStream received = sink.getData(); // transfer done. Data is in received stream. // convert it to...
java
public Vector nlist(String path) throws ServerException, ClientException, IOException { ByteArrayDataSink sink = new ByteArrayDataSink(); nlist(path, sink); ByteArrayOutputStream received = sink.getData(); // transfer done. Data is in received stream. // convert it to...
[ "public", "Vector", "nlist", "(", "String", "path", ")", "throws", "ServerException", ",", "ClientException", ",", "IOException", "{", "ByteArrayDataSink", "sink", "=", "new", "ByteArrayDataSink", "(", ")", ";", "nlist", "(", "path", ",", "sink", ")", ";", "...
Performs remote directory listing on the given path. Sends 'NLST &lt;path&gt;' command. @param path directory to perform listing of. If null, listing of current directory will be performed. @return Vector list of {@link FileInfo FileInfo} objects, representing remote files
[ "Performs", "remote", "directory", "listing", "on", "the", "given", "path", ".", "Sends", "NLST", "&lt", ";", "path&gt", ";", "command", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L575-L607
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.mlst
public MlsxEntry mlst(String fileName) throws IOException, ServerException { try { Reply reply = controlChannel.execute(new Command("MLST", fileName)); String replyMessage = reply.getMessage(); StringTokenizer replyLines = new StringTokenizer( ...
java
public MlsxEntry mlst(String fileName) throws IOException, ServerException { try { Reply reply = controlChannel.execute(new Command("MLST", fileName)); String replyMessage = reply.getMessage(); StringTokenizer replyLines = new StringTokenizer( ...
[ "public", "MlsxEntry", "mlst", "(", "String", "fileName", ")", "throws", "IOException", ",", "ServerException", "{", "try", "{", "Reply", "reply", "=", "controlChannel", ".", "execute", "(", "new", "Command", "(", "\"MLST\"", ",", "fileName", ")", ")", ";", ...
Get info of a certain remote file in Mlsx format.
[ "Get", "info", "of", "a", "certain", "remote", "file", "in", "Mlsx", "format", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L629-L665
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.setType
public void setType(int type) throws IOException, ServerException { localServer.setTransferType(type); String typeStr = null; switch (type) { case Session.TYPE_IMAGE : typeStr = "I"; break; case Session.TYPE_ASCII : typeStr = "A"; ...
java
public void setType(int type) throws IOException, ServerException { localServer.setTransferType(type); String typeStr = null; switch (type) { case Session.TYPE_IMAGE : typeStr = "I"; break; case Session.TYPE_ASCII : typeStr = "A"; ...
[ "public", "void", "setType", "(", "int", "type", ")", "throws", "IOException", ",", "ServerException", "{", "localServer", ".", "setTransferType", "(", "type", ")", ";", "String", "typeStr", "=", "null", ";", "switch", "(", "type", ")", "{", "case", "Sessi...
Sets transfer type. @param type should be {@link Session#TYPE_IMAGE TYPE_IMAGE}, {@link Session#TYPE_ASCII TYPE_ASCII}, {@link Session#TYPE_LOCAL TYPE_LOCAL}, {@link Session#TYPE_EBCDIC TYPE_EBCDIC}
[ "Sets", "transfer", "type", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L800-L834
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.close
public void close(boolean ignoreQuitReply) throws IOException, ServerException { try { if (ignoreQuitReply) { controlChannel.write(Command.QUIT); } else { controlChannel.execute(Command.QUIT); } } catch (FTPReplyParseException r...
java
public void close(boolean ignoreQuitReply) throws IOException, ServerException { try { if (ignoreQuitReply) { controlChannel.write(Command.QUIT); } else { controlChannel.execute(Command.QUIT); } } catch (FTPReplyParseException r...
[ "public", "void", "close", "(", "boolean", "ignoreQuitReply", ")", "throws", "IOException", ",", "ServerException", "{", "try", "{", "if", "(", "ignoreQuitReply", ")", "{", "controlChannel", ".", "write", "(", "Command", ".", "QUIT", ")", ";", "}", "else", ...
Closes connection. Sends QUIT and closes connection even if the server reply was not positive. Also, closes the local server. @param ignoreQuitReply if true the <code>QUIT</code> command will be sent but the client will not wait for the server's reply. If false, the client will block for the server's reply.
[ "Closes", "connection", ".", "Sends", "QUIT", "and", "closes", "connection", "even", "if", "the", "server", "reply", "was", "not", "positive", ".", "Also", "closes", "the", "local", "server", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L942-L963
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.getFeatureList
public FeatureList getFeatureList() throws IOException, ServerException { if (this.session.featureList != null) { return this.session.featureList; } // TODO: this can also be optimized. Instead of parsing the // reply after it is reveiced, we can parse it as it is /...
java
public FeatureList getFeatureList() throws IOException, ServerException { if (this.session.featureList != null) { return this.session.featureList; } // TODO: this can also be optimized. Instead of parsing the // reply after it is reveiced, we can parse it as it is /...
[ "public", "FeatureList", "getFeatureList", "(", ")", "throws", "IOException", ",", "ServerException", "{", "if", "(", "this", ".", "session", ".", "featureList", "!=", "null", ")", "{", "return", "this", ".", "session", ".", "featureList", ";", "}", "// TODO...
Returns list of features supported by remote server. @return list of features supported by remote server.
[ "Returns", "list", "of", "features", "supported", "by", "remote", "server", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L981-L1010
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.setPassive
public HostPort setPassive() throws IOException, ServerException { Reply reply = null; try { reply = controlChannel.execute( (controlChannel.isIPv6()) ? Command.EPSV : Command.PASV); } catch (UnexpectedReplyCodeException urce) { throw ServerException.e...
java
public HostPort setPassive() throws IOException, ServerException { Reply reply = null; try { reply = controlChannel.execute( (controlChannel.isIPv6()) ? Command.EPSV : Command.PASV); } catch (UnexpectedReplyCodeException urce) { throw ServerException.e...
[ "public", "HostPort", "setPassive", "(", ")", "throws", "IOException", ",", "ServerException", "{", "Reply", "reply", "=", "null", ";", "try", "{", "reply", "=", "controlChannel", ".", "execute", "(", "(", "controlChannel", ".", "isIPv6", "(", ")", ")", "?...
Sets remote server to passive server mode. @return the address at which the server is listening.
[ "Sets", "remote", "server", "to", "passive", "server", "mode", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1016-L1052
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.setActive
public void setActive(HostPort hostPort) throws IOException, ServerException { Command cmd = new Command((controlChannel.isIPv6()) ? "EPRT" : "PORT", hostPort.toFtpCmdArgument()); try { controlChannel.execute(cmd); } catch (UnexpectedReplyCod...
java
public void setActive(HostPort hostPort) throws IOException, ServerException { Command cmd = new Command((controlChannel.isIPv6()) ? "EPRT" : "PORT", hostPort.toFtpCmdArgument()); try { controlChannel.execute(cmd); } catch (UnexpectedReplyCod...
[ "public", "void", "setActive", "(", "HostPort", "hostPort", ")", "throws", "IOException", ",", "ServerException", "{", "Command", "cmd", "=", "new", "Command", "(", "(", "controlChannel", ".", "isIPv6", "(", ")", ")", "?", "\"EPRT\"", ":", "\"PORT\"", ",", ...
Sets remote server active, telling it to connect to the given address. @param hostPort the address to which the server should connect
[ "Sets", "remote", "server", "active", "telling", "it", "to", "connect", "to", "the", "given", "address", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1059-L1072
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.setLocalActive
public void setLocalActive() throws ClientException, IOException { if (session.serverAddress == null) { throw new ClientException(ClientException.CALL_PASSIVE_FIRST); } try { localServer.setActive(session.serverAddress); } catch (java.net.UnknownHostException e) {...
java
public void setLocalActive() throws ClientException, IOException { if (session.serverAddress == null) { throw new ClientException(ClientException.CALL_PASSIVE_FIRST); } try { localServer.setActive(session.serverAddress); } catch (java.net.UnknownHostException e) {...
[ "public", "void", "setLocalActive", "(", ")", "throws", "ClientException", ",", "IOException", "{", "if", "(", "session", ".", "serverAddress", "==", "null", ")", "{", "throw", "new", "ClientException", "(", "ClientException", ".", "CALL_PASSIVE_FIRST", ")", ";"...
Starts local server in active server mode.
[ "Starts", "local", "server", "in", "active", "server", "mode", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1089-L1098
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.setOptions
public void setOptions(Options opts) throws IOException, ServerException { Command cmd = new Command("OPTS", opts.toFtpCmdArgument()); try { controlChannel.execute(cmd); } catch (FTPReplyParseException rpe) { throw ServerException.embedFTPReplyParseException(rpe); ...
java
public void setOptions(Options opts) throws IOException, ServerException { Command cmd = new Command("OPTS", opts.toFtpCmdArgument()); try { controlChannel.execute(cmd); } catch (FTPReplyParseException rpe) { throw ServerException.embedFTPReplyParseException(rpe); ...
[ "public", "void", "setOptions", "(", "Options", "opts", ")", "throws", "IOException", ",", "ServerException", "{", "Command", "cmd", "=", "new", "Command", "(", "\"OPTS\"", ",", "opts", ".", "toFtpCmdArgument", "(", ")", ")", ";", "try", "{", "controlChannel...
Sets the supplied options to the server.
[ "Sets", "the", "supplied", "options", "to", "the", "server", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1146-L1160
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.setRestartMarker
public void setRestartMarker(RestartData restartData) throws IOException, ServerException { Command cmd = new Command("REST", restartData.toFtpCmdArgument()); Reply reply = null; try { reply = controlChannel.exchange(cmd); } catch (FTPReplyParseException e) { ...
java
public void setRestartMarker(RestartData restartData) throws IOException, ServerException { Command cmd = new Command("REST", restartData.toFtpCmdArgument()); Reply reply = null; try { reply = controlChannel.exchange(cmd); } catch (FTPReplyParseException e) { ...
[ "public", "void", "setRestartMarker", "(", "RestartData", "restartData", ")", "throws", "IOException", ",", "ServerException", "{", "Command", "cmd", "=", "new", "Command", "(", "\"REST\"", ",", "restartData", ".", "toFtpCmdArgument", "(", ")", ")", ";", "Reply"...
Sets restart parameter of the next transfer. @param restartData marker to use @exception ServerException if the file does not exist or an error occured.
[ "Sets", "restart", "parameter", "of", "the", "next", "transfer", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1169-L1183
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.authorize
public void authorize(String user, String password) throws IOException, ServerException { Reply userReply = null; try { userReply = controlChannel.exchange(new Command("USER", user)); } catch (FTPReplyParseException rpe) { throw ServerException.embedFTPReplyParse...
java
public void authorize(String user, String password) throws IOException, ServerException { Reply userReply = null; try { userReply = controlChannel.exchange(new Command("USER", user)); } catch (FTPReplyParseException rpe) { throw ServerException.embedFTPReplyParse...
[ "public", "void", "authorize", "(", "String", "user", ",", "String", "password", ")", "throws", "IOException", ",", "ServerException", "{", "Reply", "userReply", "=", "null", ";", "try", "{", "userReply", "=", "controlChannel", ".", "exchange", "(", "new", "...
Performs user authorization with specified user and password. @param user username @param password user password @exception ServerException on server refusal
[ "Performs", "user", "authorization", "with", "specified", "user", "and", "password", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1193-L1232
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.transfer
public void transfer(String remoteSrcFile, FTPClient destination, String remoteDstFile, boolean append, MarkerListener mListener) throws IOException, ServerException, ClientException { session.matches(de...
java
public void transfer(String remoteSrcFile, FTPClient destination, String remoteDstFile, boolean append, MarkerListener mListener) throws IOException, ServerException, ClientException { session.matches(de...
[ "public", "void", "transfer", "(", "String", "remoteSrcFile", ",", "FTPClient", "destination", ",", "String", "remoteDstFile", ",", "boolean", "append", ",", "MarkerListener", "mListener", ")", "throws", "IOException", ",", "ServerException", ",", "ClientException", ...
Performs third-party transfer between two servers. @param remoteSrcFile source filename @param destination another client connected to destination server @param remoteDstFile destination filename @param append enables append mode; if true, data will be appened to the remote file, otherwise file will be overwr...
[ "Performs", "third", "-", "party", "transfer", "between", "two", "servers", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1364-L1388
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.transferRun
protected void transferRun(BasicClientControlChannel other, MarkerListener mListener) throws IOException, ServerException, ClientException { TransferState transferState = transferBegin(other, mListener); transferWait(transferState); }
java
protected void transferRun(BasicClientControlChannel other, MarkerListener mListener) throws IOException, ServerException, ClientException { TransferState transferState = transferBegin(other, mListener); transferWait(transferState); }
[ "protected", "void", "transferRun", "(", "BasicClientControlChannel", "other", ",", "MarkerListener", "mListener", ")", "throws", "IOException", ",", "ServerException", ",", "ClientException", "{", "TransferState", "transferState", "=", "transferBegin", "(", "other", ",...
Actual transfer management. Transfer is controlled by two new threads listening to the two servers.
[ "Actual", "transfer", "management", ".", "Transfer", "is", "controlled", "by", "two", "new", "threads", "listening", "to", "the", "two", "servers", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1395-L1400
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.quote
public Reply quote(String command) throws IOException, ServerException { Command cmd = new Command(command); return doCommand(cmd); }
java
public Reply quote(String command) throws IOException, ServerException { Command cmd = new Command(command); return doCommand(cmd); }
[ "public", "Reply", "quote", "(", "String", "command", ")", "throws", "IOException", ",", "ServerException", "{", "Command", "cmd", "=", "new", "Command", "(", "command", ")", ";", "return", "doCommand", "(", "cmd", ")", ";", "}" ]
Executes arbitrary operation on the server. <br><b>Note</b>: <i>This is potentially dangerous operation. Depending on the command executed it might put the server in a different state from the state the client is expecting.</i> @param command command to execute @exception IOException in case of I/O error. @exception ...
[ "Executes", "arbitrary", "operation", "on", "the", "server", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1505-L1508
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.allocate
public void allocate(long size) throws IOException, ServerException { Command cmd = new Command("ALLO", String.valueOf(size)); Reply reply = null; try { reply = controlChannel.execute(cmd); } catch (UnexpectedReplyCodeException urce) { throw ServerException.embedU...
java
public void allocate(long size) throws IOException, ServerException { Command cmd = new Command("ALLO", String.valueOf(size)); Reply reply = null; try { reply = controlChannel.execute(cmd); } catch (UnexpectedReplyCodeException urce) { throw ServerException.embedU...
[ "public", "void", "allocate", "(", "long", "size", ")", "throws", "IOException", ",", "ServerException", "{", "Command", "cmd", "=", "new", "Command", "(", "\"ALLO\"", ",", "String", ".", "valueOf", "(", "size", ")", ")", ";", "Reply", "reply", "=", "nul...
Reserve sufficient storage to accommodate the new file to be transferred. @param size the amount of space to reserve @exception ServerException if an error occured.
[ "Reserve", "sufficient", "storage", "to", "accommodate", "the", "new", "file", "to", "be", "transferred", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1544-L1554
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.checkGETPUTSupport
protected void checkGETPUTSupport() throws ServerException, IOException { if (!isFeatureSupported(FeatureList.GETPUT)) { throw new ServerException(ServerException.UNSUPPORTED_FEATURE); } if (controlChannel.isIPv6()) { throw new ServerException(ServerException...
java
protected void checkGETPUTSupport() throws ServerException, IOException { if (!isFeatureSupported(FeatureList.GETPUT)) { throw new ServerException(ServerException.UNSUPPORTED_FEATURE); } if (controlChannel.isIPv6()) { throw new ServerException(ServerException...
[ "protected", "void", "checkGETPUTSupport", "(", ")", "throws", "ServerException", ",", "IOException", "{", "if", "(", "!", "isFeatureSupported", "(", "FeatureList", ".", "GETPUT", ")", ")", "{", "throw", "new", "ServerException", "(", "ServerException", ".", "UN...
Throws ServerException if GFD.47 GETPUT is not supported or cannot be used.
[ "Throws", "ServerException", "if", "GFD", ".", "47", "GETPUT", "is", "not", "supported", "or", "cannot", "be", "used", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1613-L1624
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.get127Reply
protected HostPort get127Reply() throws ServerException, IOException, FTPReplyParseException { Reply reply = controlChannel.read(); if (Reply.isTransientNegativeCompletion(reply) || Reply.isPermanentNegativeCompletion(reply)) { throw ServerException.embedUnexpectedRe...
java
protected HostPort get127Reply() throws ServerException, IOException, FTPReplyParseException { Reply reply = controlChannel.read(); if (Reply.isTransientNegativeCompletion(reply) || Reply.isPermanentNegativeCompletion(reply)) { throw ServerException.embedUnexpectedRe...
[ "protected", "HostPort", "get127Reply", "(", ")", "throws", "ServerException", ",", "IOException", ",", "FTPReplyParseException", "{", "Reply", "reply", "=", "controlChannel", ".", "read", "(", ")", ";", "if", "(", "Reply", ".", "isTransientNegativeCompletion", "(...
Reads a GFD.47 compliant 127 reply and extracts the port information from it.
[ "Reads", "a", "GFD", ".", "47", "compliant", "127", "reply", "and", "extracts", "the", "port", "information", "from", "it", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1637-L1661
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.issueGETPUT
private void issueGETPUT(String command, boolean passive, HostPort port, int mode, String path) throws IOException { Command cmd = new Command(command, ...
java
private void issueGETPUT(String command, boolean passive, HostPort port, int mode, String path) throws IOException { Command cmd = new Command(command, ...
[ "private", "void", "issueGETPUT", "(", "String", "command", ",", "boolean", "passive", ",", "HostPort", "port", ",", "int", "mode", ",", "String", "path", ")", "throws", "IOException", "{", "Command", "cmd", "=", "new", "Command", "(", "command", ",", "(",...
Writes a GFD.47 compliant GET or PUT command to the control channel. @param command Either "GET" or "PUT", depending on the command to issue @param passive True if the "pasv" parameter should be used @param port If passive is false, this is the port for the "port" parameter @param mode The value for the "mode" paramet...
[ "Writes", "a", "GFD", ".", "47", "compliant", "GET", "or", "PUT", "command", "to", "the", "control", "channel", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L1675-L1693
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.getChecksum
public String getChecksum(String algorithm, String path) throws ClientException, ServerException, IOException { return getChecksum(algorithm,0,-1,path); }
java
public String getChecksum(String algorithm, String path) throws ClientException, ServerException, IOException { return getChecksum(algorithm,0,-1,path); }
[ "public", "String", "getChecksum", "(", "String", "algorithm", ",", "String", "path", ")", "throws", "ClientException", ",", "ServerException", ",", "IOException", "{", "return", "getChecksum", "(", "algorithm", ",", "0", ",", "-", "1", ",", "path", ")", ";"...
GridFTP v2 CKSM command for the whole file @param algorithm ckeckum alorithm @param path @return ckecksum value returned by the server @throws org.globus.ftp.exception.ClientException @throws org.globus.ftp.exception.ServerException @throws java.io.IOException
[ "GridFTP", "v2", "CKSM", "command", "for", "the", "whole", "file" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L2186-L2190
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/common/CoGProperties.java
CoGProperties.getDelegationKeyCacheLifetime
public int getDelegationKeyCacheLifetime() { int valueInt = 0; String valueStr = System.getProperty(DELEGATION_KEY_CACHE_LIFETIME); if (valueStr != null && valueStr.length() > 0) { int parsedvalueInt = Integer.parseInt(valueStr); if (parsedvalueInt > 0) { ...
java
public int getDelegationKeyCacheLifetime() { int valueInt = 0; String valueStr = System.getProperty(DELEGATION_KEY_CACHE_LIFETIME); if (valueStr != null && valueStr.length() > 0) { int parsedvalueInt = Integer.parseInt(valueStr); if (parsedvalueInt > 0) { ...
[ "public", "int", "getDelegationKeyCacheLifetime", "(", ")", "{", "int", "valueInt", "=", "0", ";", "String", "valueStr", "=", "System", ".", "getProperty", "(", "DELEGATION_KEY_CACHE_LIFETIME", ")", ";", "if", "(", "valueStr", "!=", "null", "&&", "valueStr", "...
Returns the delegation key cache lifetime for all delegations from this JVM. If this property is not set or set to zero or less, no caching is done. @return the number of milliseconds the key/pair is cached
[ "Returns", "the", "delegation", "key", "cache", "lifetime", "for", "all", "delegations", "from", "this", "JVM", ".", "If", "this", "property", "is", "not", "set", "or", "set", "to", "zero", "or", "less", "no", "caching", "is", "done", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/common/CoGProperties.java#L504-L527
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/common/CoGProperties.java
CoGProperties.getCRLCacheLifetime
@Deprecated public long getCRLCacheLifetime() { long value = getCertCacheLifetime(); String property = getProperty(CRL_CACHE_LIFETIME); if (property != null && property.length() > 0) { long parsedValue = Long.parseLong(property); if (parsedValue > 0) { ...
java
@Deprecated public long getCRLCacheLifetime() { long value = getCertCacheLifetime(); String property = getProperty(CRL_CACHE_LIFETIME); if (property != null && property.length() > 0) { long parsedValue = Long.parseLong(property); if (parsedValue > 0) { ...
[ "@", "Deprecated", "public", "long", "getCRLCacheLifetime", "(", ")", "{", "long", "value", "=", "getCertCacheLifetime", "(", ")", ";", "String", "property", "=", "getProperty", "(", "CRL_CACHE_LIFETIME", ")", ";", "if", "(", "property", "!=", "null", "&&", ...
Returns the CRL cache lifetime. If this property is set to zero or less, no caching is done. The value is the number of milliseconds the CRLs are cached without checking for modifications on disk. Defaults to 60s. @throws NumberFormatException if the cache lifetime property could not be parsed @return the CRL cache l...
[ "Returns", "the", "CRL", "cache", "lifetime", ".", "If", "this", "property", "is", "set", "to", "zero", "or", "less", "no", "caching", "is", "done", ".", "The", "value", "is", "the", "number", "of", "milliseconds", "the", "CRLs", "are", "cached", "withou...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/common/CoGProperties.java#L543-L566
train