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
gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSContextImpl.java
GlobusGSSContextImpl.initDelegation
public byte[] initDelegation(GSSCredential credential, Oid mechanism, int lifetime, byte[] buf, int off, int len) throws GSSException { logger.debug("Enter initDelegation: " + delegationState); i...
java
public byte[] initDelegation(GSSCredential credential, Oid mechanism, int lifetime, byte[] buf, int off, int len) throws GSSException { logger.debug("Enter initDelegation: " + delegationState); i...
[ "public", "byte", "[", "]", "initDelegation", "(", "GSSCredential", "credential", ",", "Oid", "mechanism", ",", "int", "lifetime", ",", "byte", "[", "]", "buf", ",", "int", "off", ",", "int", "len", ")", "throws", "GSSException", "{", "logger", ".", "deb...
Initiate the delegation of a credential. This function drives the initiating side of the credential delegation process. It is expected to be called in tandem with the {@link #acceptDelegation(int, byte[], int, int) acceptDelegation} function. <BR> The behavior of this function can be modified by {@link GSSConstants#DE...
[ "Initiate", "the", "delegation", "of", "a", "credential", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSContextImpl.java#L2404-L2511
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java
CertificateUtil.installSecureRandomProvider
public static void installSecureRandomProvider() { CoGProperties props = CoGProperties.getDefault(); String providerName = props.getSecureRandomProvider(); try { Class providerClass = Class.forName(providerName); Security.insertProviderAt( (Provider)providerClass.newInsta...
java
public static void installSecureRandomProvider() { CoGProperties props = CoGProperties.getDefault(); String providerName = props.getSecureRandomProvider(); try { Class providerClass = Class.forName(providerName); Security.insertProviderAt( (Provider)providerClass.newInsta...
[ "public", "static", "void", "installSecureRandomProvider", "(", ")", "{", "CoGProperties", "props", "=", "CoGProperties", ".", "getDefault", "(", ")", ";", "String", "providerName", "=", "props", ".", "getSecureRandomProvider", "(", ")", ";", "try", "{", "Class"...
Installs SecureRandom provider. This function is automatically called when this class is loaded.
[ "Installs", "SecureRandom", "provider", ".", "This", "function", "is", "automatically", "called", "when", "this", "class", "is", "loaded", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java#L166-L176
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java
CertificateUtil.getCAPathConstraint
public static int getCAPathConstraint(TBSCertificateStructure crt) throws IOException { X509Extensions extensions = crt.getExtensions(); if (extensions == null) { return -1; } X509Extension proxyExtension = extensions.getExtension(X509Extension.ba...
java
public static int getCAPathConstraint(TBSCertificateStructure crt) throws IOException { X509Extensions extensions = crt.getExtensions(); if (extensions == null) { return -1; } X509Extension proxyExtension = extensions.getExtension(X509Extension.ba...
[ "public", "static", "int", "getCAPathConstraint", "(", "TBSCertificateStructure", "crt", ")", "throws", "IOException", "{", "X509Extensions", "extensions", "=", "crt", ".", "getExtensions", "(", ")", ";", "if", "(", "extensions", "==", "null", ")", "{", "return"...
Return CA Path constraint @param crt @return the CA path constraint @throws IOException
[ "Return", "CA", "Path", "constraint" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java#L185-L205
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java
CertificateUtil.generateKeyPair
public static KeyPair generateKeyPair(String algorithm, int bits) throws GeneralSecurityException { KeyPairGenerator generator = null; if (provider == null) { generator = KeyPairGenerator.getInstance(algorithm); } else { generator = KeyPairGenerator.getInstance(al...
java
public static KeyPair generateKeyPair(String algorithm, int bits) throws GeneralSecurityException { KeyPairGenerator generator = null; if (provider == null) { generator = KeyPairGenerator.getInstance(algorithm); } else { generator = KeyPairGenerator.getInstance(al...
[ "public", "static", "KeyPair", "generateKeyPair", "(", "String", "algorithm", ",", "int", "bits", ")", "throws", "GeneralSecurityException", "{", "KeyPairGenerator", "generator", "=", "null", ";", "if", "(", "provider", "==", "null", ")", "{", "generator", "=", ...
Generates a key pair of given algorithm and strength. @param algorithm the algorithm of the key pair. @param bits the strength @return <code>KeyPair</code> the generated key pair. @exception GeneralSecurityException if something goes wrong.
[ "Generates", "a", "key", "pair", "of", "given", "algorithm", "and", "strength", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java#L215-L225
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java
CertificateUtil.getTBSCertificateStructure
public static TBSCertificateStructure getTBSCertificateStructure( X509Certificate cert) throws CertificateEncodingException, IOException { ASN1Primitive obj = toASN1Primitive(cert.getTBSCertificate()); return TBSCertificateStructure.getInstance(obj); }
java
public static TBSCertificateStructure getTBSCertificateStructure( X509Certificate cert) throws CertificateEncodingException, IOException { ASN1Primitive obj = toASN1Primitive(cert.getTBSCertificate()); return TBSCertificateStructure.getInstance(obj); }
[ "public", "static", "TBSCertificateStructure", "getTBSCertificateStructure", "(", "X509Certificate", "cert", ")", "throws", "CertificateEncodingException", ",", "IOException", "{", "ASN1Primitive", "obj", "=", "toASN1Primitive", "(", "cert", ".", "getTBSCertificate", "(", ...
Extracts the TBS certificate from the given certificate. @param cert the X.509 certificate to extract the TBS certificate from. @return the TBS certificate @throws IOException if extraction fails. @throws CertificateEncodingException if extraction fails.
[ "Extracts", "the", "TBS", "certificate", "from", "the", "given", "certificate", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java#L424-L429
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java
CertificateUtil.getCertPath
public static CertPath getCertPath(X509Certificate[] certs) throws CertificateException { CertificateFactory factory = CertificateFactory.getInstance("X.509"); return factory.generateCertPath(Arrays.asList(certs)); }
java
public static CertPath getCertPath(X509Certificate[] certs) throws CertificateException { CertificateFactory factory = CertificateFactory.getInstance("X.509"); return factory.generateCertPath(Arrays.asList(certs)); }
[ "public", "static", "CertPath", "getCertPath", "(", "X509Certificate", "[", "]", "certs", ")", "throws", "CertificateException", "{", "CertificateFactory", "factory", "=", "CertificateFactory", ".", "getInstance", "(", "\"X.509\"", ")", ";", "return", "factory", "."...
JGLOBUS-91
[ "JGLOBUS", "-", "91" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java#L683-L687
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/stores/CertKeyCredential.java
CertKeyCredential.createObject
protected X509Credential createObject(GlobusResource certSource, GlobusResource keySource) throws ResourceStoreException { InputStream certIns; InputStream keyIns; try { certIns = certSource.getInputStream(); keyIns = keySource.getInputStream(); re...
java
protected X509Credential createObject(GlobusResource certSource, GlobusResource keySource) throws ResourceStoreException { InputStream certIns; InputStream keyIns; try { certIns = certSource.getInputStream(); keyIns = keySource.getInputStream(); re...
[ "protected", "X509Credential", "createObject", "(", "GlobusResource", "certSource", ",", "GlobusResource", "keySource", ")", "throws", "ResourceStoreException", "{", "InputStream", "certIns", ";", "InputStream", "keyIns", ";", "try", "{", "certIns", "=", "certSource", ...
for creation of credential from a file
[ "for", "creation", "of", "credential", "from", "a", "file" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/stores/CertKeyCredential.java#L122-L137
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java
FTPServerFacade.setPassive
public HostPort setPassive(int port, int queue) throws IOException{ if (serverSocket == null) { ServerSocketFactory factory = ServerSocketFactory.getDefault(); serverSocket = factory.createServerSocket(port, queue); } session.serverMode = Session...
java
public HostPort setPassive(int port, int queue) throws IOException{ if (serverSocket == null) { ServerSocketFactory factory = ServerSocketFactory.getDefault(); serverSocket = factory.createServerSocket(port, queue); } session.serverMode = Session...
[ "public", "HostPort", "setPassive", "(", "int", "port", ",", "int", "queue", ")", "throws", "IOException", "{", "if", "(", "serverSocket", "==", "null", ")", "{", "ServerSocketFactory", "factory", "=", "ServerSocketFactory", ".", "getDefault", "(", ")", ";", ...
Start the local server @param port required server port; can be set to ANY_PORT @param queue max size of queue of awaiting new connection requests @return the server address
[ "Start", "the", "local", "server" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java#L183-L210
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java
FTPServerFacade.setActive
public void setActive(HostPort hp) throws UnknownHostException, ClientException, IOException { if (logger.isDebugEnabled()) { logger.debug("hostport: " + hp.getHost() + " " + hp.getPort()); } session.serverMode = Session.SERVER_ACTIVE; th...
java
public void setActive(HostPort hp) throws UnknownHostException, ClientException, IOException { if (logger.isDebugEnabled()) { logger.debug("hostport: " + hp.getHost() + " " + hp.getPort()); } session.serverMode = Session.SERVER_ACTIVE; th...
[ "public", "void", "setActive", "(", "HostPort", "hp", ")", "throws", "UnknownHostException", ",", "ClientException", ",", "IOException", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"hostport: \"", "+", ...
Asynchronous; return before completion. Connect to the remote server. Any exception that would occure will not be thrown but returned through the local control channel.
[ "Asynchronous", ";", "return", "before", "completion", ".", "Connect", "to", "the", "remote", "server", ".", "Any", "exception", "that", "would", "occure", "will", "not", "be", "thrown", "but", "returned", "through", "the", "local", "control", "channel", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java#L218-L227
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java
FTPServerFacade.exceptionToControlChannel
public static void exceptionToControlChannel( Throwable e, String msg, BasicServerControlChannel control) { // how to convert exception stack trace to string? // i am sure it can be done easier. java....
java
public static void exceptionToControlChannel( Throwable e, String msg, BasicServerControlChannel control) { // how to convert exception stack trace to string? // i am sure it can be done easier. java....
[ "public", "static", "void", "exceptionToControlChannel", "(", "Throwable", "e", ",", "String", "msg", ",", "BasicServerControlChannel", "control", ")", "{", "// how to convert exception stack trace to string?", "// i am sure it can be done easier.", "java", ".", "io", ".", ...
Convert the exception to a negative 451 reply, and pipe it to the provided control channel.
[ "Convert", "the", "exception", "to", "a", "negative", "451", "reply", "and", "pipe", "it", "to", "the", "provided", "control", "channel", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java#L246-L262
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java
FTPServerFacade.store
public void store(DataSink sink) { try { localControlChannel.resetReplyCount(); TransferContext context= createTransferContext(); if (session.serverMode == Session.SERVER_PASSIVE) { runTask(createPassiveConnectTask(sink, context)); } else { ...
java
public void store(DataSink sink) { try { localControlChannel.resetReplyCount(); TransferContext context= createTransferContext(); if (session.serverMode == Session.SERVER_PASSIVE) { runTask(createPassiveConnectTask(sink, context)); } else { ...
[ "public", "void", "store", "(", "DataSink", "sink", ")", "{", "try", "{", "localControlChannel", ".", "resetReplyCount", "(", ")", ";", "TransferContext", "context", "=", "createTransferContext", "(", ")", ";", "if", "(", "session", ".", "serverMode", "==", ...
Asynchronous; return before completion. Start the incoming transfer and store the file to the supplied data sink. Any exception that would occure will not be thrown but returned through the local control channel.
[ "Asynchronous", ";", "return", "before", "completion", ".", "Start", "the", "incoming", "transfer", "and", "store", "the", "file", "to", "the", "supplied", "data", "sink", ".", "Any", "exception", "that", "would", "occure", "will", "not", "be", "thrown", "bu...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java#L271-L284
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java
FTPServerFacade.retrieve
public void retrieve(DataSource source) { try { localControlChannel.resetReplyCount(); TransferContext context= createTransferContext(); if (session.serverMode == Session.SERVER_PASSIVE) { runTask(createPassiveConnectTask(source, context)); } else...
java
public void retrieve(DataSource source) { try { localControlChannel.resetReplyCount(); TransferContext context= createTransferContext(); if (session.serverMode == Session.SERVER_PASSIVE) { runTask(createPassiveConnectTask(source, context)); } else...
[ "public", "void", "retrieve", "(", "DataSource", "source", ")", "{", "try", "{", "localControlChannel", ".", "resetReplyCount", "(", ")", ";", "TransferContext", "context", "=", "createTransferContext", "(", ")", ";", "if", "(", "session", ".", "serverMode", "...
Asynchronous; return before completion. Start the outgoing transfer reading the data from the supplied data source. Any exception that would occure will not be thrown but returned through the local control channel.
[ "Asynchronous", ";", "return", "before", "completion", ".", "Start", "the", "outgoing", "transfer", "reading", "the", "data", "from", "the", "supplied", "data", "source", ".", "Any", "exception", "that", "would", "occure", "will", "not", "be", "thrown", "but",...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java#L293-L306
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java
FTPServerFacade.runTask
private synchronized void runTask(Task task) { if (taskThread == null) { taskThread = new TaskThread(); } taskThread.runTask(task); }
java
private synchronized void runTask(Task task) { if (taskThread == null) { taskThread = new TaskThread(); } taskThread.runTask(task); }
[ "private", "synchronized", "void", "runTask", "(", "Task", "task", ")", "{", "if", "(", "taskThread", "==", "null", ")", "{", "taskThread", "=", "new", "TaskThread", "(", ")", ";", "}", "taskThread", ".", "runTask", "(", "task", ")", ";", "}" ]
Use this as an interface to the local manager thread. This submits the task to the thread queue. The thread will perform it when it's ready with other waiting tasks.
[ "Use", "this", "as", "an", "interface", "to", "the", "local", "manager", "thread", ".", "This", "submits", "the", "task", "to", "the", "thread", "queue", ".", "The", "thread", "will", "perform", "it", "when", "it", "s", "ready", "with", "other", "waiting...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java#L366-L371
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java
FTPServerFacade.createPassiveConnectTask
private PassiveConnectTask createPassiveConnectTask(DataSource source, TransferContext context) { return new PassiveConnectTask(serverSocket, source, localControlChannel, ...
java
private PassiveConnectTask createPassiveConnectTask(DataSource source, TransferContext context) { return new PassiveConnectTask(serverSocket, source, localControlChannel, ...
[ "private", "PassiveConnectTask", "createPassiveConnectTask", "(", "DataSource", "source", ",", "TransferContext", "context", ")", "{", "return", "new", "PassiveConnectTask", "(", "serverSocket", ",", "source", ",", "localControlChannel", ",", "session", ",", "dataChanne...
use these methods to create tasks
[ "use", "these", "methods", "to", "create", "tasks" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/vanilla/FTPServerFacade.java#L385-L393
train
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/net/GssSocket.java
GssSocket.close
public void close() throws IOException { try { this.context.dispose(); } catch (GSSException e) { throw new ChainedIOException("dispose failed.", e); } finally { this.socket.close(); } }
java
public void close() throws IOException { try { this.context.dispose(); } catch (GSSException e) { throw new ChainedIOException("dispose failed.", e); } finally { this.socket.close(); } }
[ "public", "void", "close", "(", ")", "throws", "IOException", "{", "try", "{", "this", ".", "context", ".", "dispose", "(", ")", ";", "}", "catch", "(", "GSSException", "e", ")", "{", "throw", "new", "ChainedIOException", "(", "\"dispose failed.\"", ",", ...
Disposes of the context and closes the connection
[ "Disposes", "of", "the", "context", "and", "closes", "the", "connection" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/net/GssSocket.java#L187-L196
train
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/SSLUtil.java
SSLUtil.readSslMessage
public static byte[] readSslMessage(InputStream in) throws IOException { byte [] header = new byte[5]; readFully(in, header, 0, header.length); int length; if (isSSLv3Packet(header)) length = toShort(header[3], header[4]); else if (isSSLv2HelloPacket(header)) length =...
java
public static byte[] readSslMessage(InputStream in) throws IOException { byte [] header = new byte[5]; readFully(in, header, 0, header.length); int length; if (isSSLv3Packet(header)) length = toShort(header[3], header[4]); else if (isSSLv2HelloPacket(header)) length =...
[ "public", "static", "byte", "[", "]", "readSslMessage", "(", "InputStream", "in", ")", "throws", "IOException", "{", "byte", "[", "]", "header", "=", "new", "byte", "[", "5", "]", ";", "readFully", "(", "in", ",", "header", ",", "0", ",", "header", "...
Reads an entire SSL message from the specified input stream. @param in the input stream to read the SSL message from. @return the byte array containing the SSL message @exception IOException if I/O error occurs.
[ "Reads", "an", "entire", "SSL", "message", "from", "the", "specified", "input", "stream", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/SSLUtil.java#L81-L97
train
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/SSLUtil.java
SSLUtil.writeInt
public static void writeInt(int v, byte[] buf, int off) { buf[off] = (byte)((v >>> 24) & 0xFF); buf[off+1] = (byte)((v >>> 16) & 0xFF); buf[off+2] = (byte)((v >>> 8) & 0xFF); buf[off+3] = (byte)((v >>> 0) & 0xFF); }
java
public static void writeInt(int v, byte[] buf, int off) { buf[off] = (byte)((v >>> 24) & 0xFF); buf[off+1] = (byte)((v >>> 16) & 0xFF); buf[off+2] = (byte)((v >>> 8) & 0xFF); buf[off+3] = (byte)((v >>> 0) & 0xFF); }
[ "public", "static", "void", "writeInt", "(", "int", "v", ",", "byte", "[", "]", "buf", ",", "int", "off", ")", "{", "buf", "[", "off", "]", "=", "(", "byte", ")", "(", "(", "v", ">>>", "24", ")", "&", "0xFF", ")", ";", "buf", "[", "off", "+...
Converts the specified int value into 4 bytes. The bytes are put into the specified byte array at a given offset location. @param v the int value to convert into 4 bytes. @param buf the byte array to put the resulting 4 bytes. @param off offset in the byte array
[ "Converts", "the", "specified", "int", "value", "into", "4", "bytes", ".", "The", "bytes", "are", "put", "into", "the", "specified", "byte", "array", "at", "a", "given", "offset", "location", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/SSLUtil.java#L185-L190
train
jglobus/JGlobus
gss/src/main/java/org/globus/net/BaseServer.java
BaseServer.shutdown
public void shutdown() { accept = false; try { _server.close(); } catch(Exception e) {} // this is a hack to ensue the server socket is // unblocked from accpet() // but this is not guaranteed to work still SocketFactory factory = SocketFactory.getDefault(); Socket s = null; try { s = factory....
java
public void shutdown() { accept = false; try { _server.close(); } catch(Exception e) {} // this is a hack to ensue the server socket is // unblocked from accpet() // but this is not guaranteed to work still SocketFactory factory = SocketFactory.getDefault(); Socket s = null; try { s = factory....
[ "public", "void", "shutdown", "(", ")", "{", "accept", "=", "false", ";", "try", "{", "_server", ".", "close", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "}", "// this is a hack to ensue the server socket is", "// unblocked from accpet()", "...
Stops the server but does not stop all the client threads
[ "Stops", "the", "server", "but", "does", "not", "stop", "all", "the", "client", "threads" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/net/BaseServer.java#L132-L156
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/Binding.java
Binding.evaluate
public Binding evaluate(Map symbolTable) throws RslEvaluationException { String strValue = _value.evaluate(symbolTable); return new Binding(getName(), new Value(strValue)); }
java
public Binding evaluate(Map symbolTable) throws RslEvaluationException { String strValue = _value.evaluate(symbolTable); return new Binding(getName(), new Value(strValue)); }
[ "public", "Binding", "evaluate", "(", "Map", "symbolTable", ")", "throws", "RslEvaluationException", "{", "String", "strValue", "=", "_value", ".", "evaluate", "(", "symbolTable", ")", ";", "return", "new", "Binding", "(", "getName", "(", ")", ",", "new", "V...
Evaluates the variable definition with the specified symbol table. @param symbolTable the symbol table to evaluate the value against. @return an evaluated string. @exception RslEvaluationException If an error occured during rsl evaluation.
[ "Evaluates", "the", "variable", "definition", "with", "the", "specified", "symbol", "table", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/Binding.java#L67-L71
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/Binding.java
Binding.toRSL
public String toRSL(boolean explicitConcat) { StringBuffer buf = new StringBuffer(); toRSL(buf, explicitConcat); return buf.toString(); }
java
public String toRSL(boolean explicitConcat) { StringBuffer buf = new StringBuffer(); toRSL(buf, explicitConcat); return buf.toString(); }
[ "public", "String", "toRSL", "(", "boolean", "explicitConcat", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "toRSL", "(", "buf", ",", "explicitConcat", ")", ";", "return", "buf", ".", "toString", "(", ")", ";", "}" ]
Returns a RSL representation of this variable definition. @param explicitConcat if true explicit concatination will be used in RSL strings. @return RSL representation of this variable definition.
[ "Returns", "a", "RSL", "representation", "of", "this", "variable", "definition", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/Binding.java#L80-L84
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/Binding.java
Binding.toRSL
public void toRSL(StringBuffer buf, boolean explicitConcat) { buf.append("("); buf.append( getName() ); buf.append(" "); getValue().toRSL(buf, explicitConcat); buf.append(")"); }
java
public void toRSL(StringBuffer buf, boolean explicitConcat) { buf.append("("); buf.append( getName() ); buf.append(" "); getValue().toRSL(buf, explicitConcat); buf.append(")"); }
[ "public", "void", "toRSL", "(", "StringBuffer", "buf", ",", "boolean", "explicitConcat", ")", "{", "buf", ".", "append", "(", "\"(\"", ")", ";", "buf", ".", "append", "(", "getName", "(", ")", ")", ";", "buf", ".", "append", "(", "\" \"", ")", ";", ...
Produces a RSL representation of this variable definition. @param buf buffer to add the RSL representation to. @param explicitConcat if true explicit concatination will be used in RSL strings.
[ "Produces", "a", "RSL", "representation", "of", "this", "variable", "definition", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/Binding.java#L93-L99
train
jglobus/JGlobus
axis/src/main/java/org/globus/axis/transport/HTTPUtils.java
HTTPUtils.setTimeout
public static void setTimeout(Stub stub, int timeout) { if (stub instanceof org.apache.axis.client.Stub) { ((org.apache.axis.client.Stub)stub).setTimeout(timeout); } }
java
public static void setTimeout(Stub stub, int timeout) { if (stub instanceof org.apache.axis.client.Stub) { ((org.apache.axis.client.Stub)stub).setTimeout(timeout); } }
[ "public", "static", "void", "setTimeout", "(", "Stub", "stub", ",", "int", "timeout", ")", "{", "if", "(", "stub", "instanceof", "org", ".", "apache", ".", "axis", ".", "client", ".", "Stub", ")", "{", "(", "(", "org", ".", "apache", ".", "axis", "...
Sets connection timeout. @param stub The stub to set the property on @param timeout the new timeout value in milliseconds
[ "Sets", "connection", "timeout", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/axis/src/main/java/org/globus/axis/transport/HTTPUtils.java#L36-L40
train
jglobus/JGlobus
axis/src/main/java/org/globus/axis/transport/HTTPUtils.java
HTTPUtils.setHTTPVersion
public static void setHTTPVersion(Stub stub, boolean http10) { stub._setProperty(MessageContext.HTTP_TRANSPORT_VERSION, (http10) ? HTTPConstants.HEADER_PROTOCOL_V10 : HTTPConstants.HEADER_PROTOCOL_V11); }
java
public static void setHTTPVersion(Stub stub, boolean http10) { stub._setProperty(MessageContext.HTTP_TRANSPORT_VERSION, (http10) ? HTTPConstants.HEADER_PROTOCOL_V10 : HTTPConstants.HEADER_PROTOCOL_V11); }
[ "public", "static", "void", "setHTTPVersion", "(", "Stub", "stub", ",", "boolean", "http10", ")", "{", "stub", ".", "_setProperty", "(", "MessageContext", ".", "HTTP_TRANSPORT_VERSION", ",", "(", "http10", ")", "?", "HTTPConstants", ".", "HEADER_PROTOCOL_V10", "...
Sets on option on the stub to control what HTTP protocol version should be used. @param stub The stub to set the property on @param http10 If true, HTTP 1.0 will be used. Otherwise HTTP 1.1 will be used.
[ "Sets", "on", "option", "on", "the", "stub", "to", "control", "what", "HTTP", "protocol", "version", "should", "be", "used", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/axis/src/main/java/org/globus/axis/transport/HTTPUtils.java#L81-L86
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/util/GlobusPathMatchingResourcePatternResolver.java
GlobusPathMatchingResourcePatternResolver.getResource
public GlobusResource getResource(String location) { GlobusResource returnResource; URL resourceURL; if (location.startsWith("classpath:")) { resourceURL = getClass().getClassLoader().getResource(location.replaceFirst("classpath:/", "")); returnResource = new GlobusResour...
java
public GlobusResource getResource(String location) { GlobusResource returnResource; URL resourceURL; if (location.startsWith("classpath:")) { resourceURL = getClass().getClassLoader().getResource(location.replaceFirst("classpath:/", "")); returnResource = new GlobusResour...
[ "public", "GlobusResource", "getResource", "(", "String", "location", ")", "{", "GlobusResource", "returnResource", ";", "URL", "resourceURL", ";", "if", "(", "location", ".", "startsWith", "(", "\"classpath:\"", ")", ")", "{", "resourceURL", "=", "getClass", "(...
This method takes a location string and returns a GlobusResource of the corresponding location. This method does not accept any patterns for the location string. @param location An absolute or relative location in the style classpath:/folder/className.class, file:/folder/fileName.ext, or folder/folder/fileName.ext @re...
[ "This", "method", "takes", "a", "location", "string", "and", "returns", "a", "GlobusResource", "of", "the", "corresponding", "location", ".", "This", "method", "does", "not", "accept", "any", "patterns", "for", "the", "location", "string", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/util/GlobusPathMatchingResourcePatternResolver.java#L45-L56
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/util/GlobusPathMatchingResourcePatternResolver.java
GlobusPathMatchingResourcePatternResolver.getResources
public GlobusResource[] getResources(String locationPattern) { Vector<GlobusResource> pathsMatchingLocationPattern = new Vector<GlobusResource>(); String mainPath = ""; if (locationPattern.startsWith("classpath:")) { String pathUntilWildcard = getPathUntilWildcard(locationPattern.rep...
java
public GlobusResource[] getResources(String locationPattern) { Vector<GlobusResource> pathsMatchingLocationPattern = new Vector<GlobusResource>(); String mainPath = ""; if (locationPattern.startsWith("classpath:")) { String pathUntilWildcard = getPathUntilWildcard(locationPattern.rep...
[ "public", "GlobusResource", "[", "]", "getResources", "(", "String", "locationPattern", ")", "{", "Vector", "<", "GlobusResource", ">", "pathsMatchingLocationPattern", "=", "new", "Vector", "<", "GlobusResource", ">", "(", ")", ";", "String", "mainPath", "=", "\...
Finds all the resources that match the Ant-Style locationPattern @param locationPattern Ant-Style location pattern which may be prefixed with classpath:/, file:/, or describe a relative path. @return An array of GlobusResource containing all resources whose locaiton match the locationPattern
[ "Finds", "all", "the", "resources", "that", "match", "the", "Ant", "-", "Style", "locationPattern" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/util/GlobusPathMatchingResourcePatternResolver.java#L64-L93
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/util/GlobusPathMatchingResourcePatternResolver.java
GlobusPathMatchingResourcePatternResolver.parseFilesInDirectory
private void parseFilesInDirectory(File currentDirectory, Vector<GlobusResource> pathsMatchingLocationPattern) { File[] directoryContents = null; if (currentDirectory.isDirectory()) { directoryContents = currentDirectory.listFiles(); //Get a list of the files and directories } els...
java
private void parseFilesInDirectory(File currentDirectory, Vector<GlobusResource> pathsMatchingLocationPattern) { File[] directoryContents = null; if (currentDirectory.isDirectory()) { directoryContents = currentDirectory.listFiles(); //Get a list of the files and directories } els...
[ "private", "void", "parseFilesInDirectory", "(", "File", "currentDirectory", ",", "Vector", "<", "GlobusResource", ">", "pathsMatchingLocationPattern", ")", "{", "File", "[", "]", "directoryContents", "=", "null", ";", "if", "(", "currentDirectory", ".", "isDirector...
Compares every file's Absolute Path against the locationPattern, if they match a GlobusResource is created with the file's Absolute Path and added to pathsMatchingLocationPattern. @param currentDirectory The directory whose files to parse. @param pathsMatchingLocationPattern Holds GlobusResource instances of all the p...
[ "Compares", "every", "file", "s", "Absolute", "Path", "against", "the", "locationPattern", "if", "they", "match", "a", "GlobusResource", "is", "created", "with", "the", "file", "s", "Absolute", "Path", "and", "added", "to", "pathsMatchingLocationPattern", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/util/GlobusPathMatchingResourcePatternResolver.java#L171-L192
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/extended/GridFTPServerFacade.java
GridFTPServerFacade.closeOutgoingSockets
private void closeOutgoingSockets() throws ClientException { SocketOperator op = new SocketOperator() { public void operate(SocketBox sb) throws Exception { if (((ManagedSocketBox) sb).isReusable()) { Socket s = sb.getSocket(); ...
java
private void closeOutgoingSockets() throws ClientException { SocketOperator op = new SocketOperator() { public void operate(SocketBox sb) throws Exception { if (((ManagedSocketBox) sb).isReusable()) { Socket s = sb.getSocket(); ...
[ "private", "void", "closeOutgoingSockets", "(", ")", "throws", "ClientException", "{", "SocketOperator", "op", "=", "new", "SocketOperator", "(", ")", "{", "public", "void", "operate", "(", "SocketBox", "sb", ")", "throws", "Exception", "{", "if", "(", "(", ...
All sockets opened when this server was active should send a special EBlock header before closing.
[ "All", "sockets", "opened", "when", "this", "server", "was", "active", "should", "send", "a", "special", "EBlock", "header", "before", "closing", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/extended/GridFTPServerFacade.java#L159-L184
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/extended/GridFTPServerFacade.java
GridFTPServerFacade.store
public void store(DataSink sink) { try { localControlChannel.resetReplyCount(); if (session.transferMode != GridFTPSession.MODE_EBLOCK) { // // no EBLOCK // EBlockParallelTransferContext context = (EBlo...
java
public void store(DataSink sink) { try { localControlChannel.resetReplyCount(); if (session.transferMode != GridFTPSession.MODE_EBLOCK) { // // no EBLOCK // EBlockParallelTransferContext context = (EBlo...
[ "public", "void", "store", "(", "DataSink", "sink", ")", "{", "try", "{", "localControlChannel", ".", "resetReplyCount", "(", ")", ";", "if", "(", "session", ".", "transferMode", "!=", "GridFTPSession", ".", "MODE_EBLOCK", ")", "{", "//", "// no EBLOCK", "//...
Store the data from the data channel to the data sink. Does not block. If operation fails, exception might be thrown via local control channel. @param sink source of data
[ "Store", "the", "data", "from", "the", "data", "channel", "to", "the", "data", "sink", ".", "Does", "not", "block", ".", "If", "operation", "fails", "exception", "might", "be", "thrown", "via", "local", "control", "channel", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/extended/GridFTPServerFacade.java#L282-L360
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/extended/GridFTPServerFacade.java
GridFTPServerFacade.retrieve
public void retrieve(DataSource source) { try { localControlChannel.resetReplyCount(); if (session.transferMode != GridFTPSession.MODE_EBLOCK) { // // No EBLOCK // EBlockParallelTransferContext context = ...
java
public void retrieve(DataSource source) { try { localControlChannel.resetReplyCount(); if (session.transferMode != GridFTPSession.MODE_EBLOCK) { // // No EBLOCK // EBlockParallelTransferContext context = ...
[ "public", "void", "retrieve", "(", "DataSource", "source", ")", "{", "try", "{", "localControlChannel", ".", "resetReplyCount", "(", ")", ";", "if", "(", "session", ".", "transferMode", "!=", "GridFTPSession", ".", "MODE_EBLOCK", ")", "{", "//", "// No EBLOCK"...
Retrieve the data from the data source and write to the data channel. This method does not block. If operation fails, exception might be thrown via local control channel. @param source source of data
[ "Retrieve", "the", "data", "from", "the", "data", "source", "and", "write", "to", "the", "data", "channel", ".", "This", "method", "does", "not", "block", ".", "If", "operation", "fails", "exception", "might", "be", "thrown", "via", "local", "control", "ch...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/extended/GridFTPServerFacade.java#L368-L475
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/extended/GridFTPServerFacade.java
GridFTPServerFacade.authenticate
public static Socket authenticate( Socket simpleSocket, boolean isClientSocket, GSSCredential credential, int protection, DataChan...
java
public static Socket authenticate( Socket simpleSocket, boolean isClientSocket, GSSCredential credential, int protection, DataChan...
[ "public", "static", "Socket", "authenticate", "(", "Socket", "simpleSocket", ",", "boolean", "isClientSocket", ",", "GSSCredential", "credential", ",", "int", "protection", ",", "DataChannelAuthentication", "dcau", ")", "throws", "Exception", "{", "GSSContext", "gssCo...
authenticate socket. if protection on, return authenticated socket wrapped over the original simpleSocket, else return original socket.
[ "authenticate", "socket", ".", "if", "protection", "on", "return", "authenticated", "socket", "wrapped", "over", "the", "original", "simpleSocket", "else", "return", "original", "socket", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/extended/GridFTPServerFacade.java#L498-L560
train
jglobus/JGlobus
io/src/main/java/org/globus/io/urlcopy/UrlCopy.java
UrlCopy.addUrlCopyListener
public void addUrlCopyListener(UrlCopyListener listener) { if (listeners == null) listeners = new LinkedList(); listeners.add(listener); }
java
public void addUrlCopyListener(UrlCopyListener listener) { if (listeners == null) listeners = new LinkedList(); listeners.add(listener); }
[ "public", "void", "addUrlCopyListener", "(", "UrlCopyListener", "listener", ")", "{", "if", "(", "listeners", "==", "null", ")", "listeners", "=", "new", "LinkedList", "(", ")", ";", "listeners", ".", "add", "(", "listener", ")", ";", "}" ]
Adds url copy listener. @param listener url copy listener
[ "Adds", "url", "copy", "listener", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/urlcopy/UrlCopy.java#L196-L199
train
jglobus/JGlobus
io/src/main/java/org/globus/io/urlcopy/UrlCopy.java
UrlCopy.setSourceUrl
public void setSourceUrl(GlobusURL source) throws UrlCopyException { if (source == null) { throw new IllegalArgumentException("Source url cannot be null"); } checkUrl(source); srcUrl = source; }
java
public void setSourceUrl(GlobusURL source) throws UrlCopyException { if (source == null) { throw new IllegalArgumentException("Source url cannot be null"); } checkUrl(source); srcUrl = source; }
[ "public", "void", "setSourceUrl", "(", "GlobusURL", "source", ")", "throws", "UrlCopyException", "{", "if", "(", "source", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Source url cannot be null\"", ")", ";", "}", "checkUrl", "(", "...
Sets source url. @param source source url.
[ "Sets", "source", "url", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/urlcopy/UrlCopy.java#L348-L355
train
jglobus/JGlobus
io/src/main/java/org/globus/io/urlcopy/UrlCopy.java
UrlCopy.setDestinationUrl
public void setDestinationUrl(GlobusURL dest) throws UrlCopyException { if (dest == null) { throw new IllegalArgumentException("Desitination url cannot be null"); } checkUrl(dest); dstUrl = dest; }
java
public void setDestinationUrl(GlobusURL dest) throws UrlCopyException { if (dest == null) { throw new IllegalArgumentException("Desitination url cannot be null"); } checkUrl(dest); dstUrl = dest; }
[ "public", "void", "setDestinationUrl", "(", "GlobusURL", "dest", ")", "throws", "UrlCopyException", "{", "if", "(", "dest", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Desitination url cannot be null\"", ")", ";", "}", "checkUrl", "...
Sets destination url. @param dest destination url
[ "Sets", "destination", "url", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/urlcopy/UrlCopy.java#L371-L378
train
jglobus/JGlobus
io/src/main/java/org/globus/io/urlcopy/UrlCopy.java
UrlCopy.getInputStream
protected GlobusInputStream getInputStream() throws Exception { GlobusInputStream in = null; String fromP = srcUrl.getProtocol(); String fromFile = srcUrl.getPath(); if (fromP.equalsIgnoreCase("file")) { fromFile = URLDecoder.decode(fromFile); ...
java
protected GlobusInputStream getInputStream() throws Exception { GlobusInputStream in = null; String fromP = srcUrl.getProtocol(); String fromFile = srcUrl.getPath(); if (fromP.equalsIgnoreCase("file")) { fromFile = URLDecoder.decode(fromFile); ...
[ "protected", "GlobusInputStream", "getInputStream", "(", ")", "throws", "Exception", "{", "GlobusInputStream", "in", "=", "null", ";", "String", "fromP", "=", "srcUrl", ".", "getProtocol", "(", ")", ";", "String", "fromFile", "=", "srcUrl", ".", "getPath", "("...
Returns input stream based on the source url
[ "Returns", "input", "stream", "based", "on", "the", "source", "url" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/urlcopy/UrlCopy.java#L534-L585
train
jglobus/JGlobus
io/src/main/java/org/globus/io/urlcopy/UrlCopy.java
UrlCopy.getOutputStream
protected GlobusOutputStream getOutputStream(long size) throws Exception { GlobusOutputStream out = null; String toP = dstUrl.getProtocol(); String toFile = dstUrl.getPath(); if (toP.equalsIgnoreCase("file")) { toFile = URLDecoder.decode(toFile)...
java
protected GlobusOutputStream getOutputStream(long size) throws Exception { GlobusOutputStream out = null; String toP = dstUrl.getProtocol(); String toFile = dstUrl.getPath(); if (toP.equalsIgnoreCase("file")) { toFile = URLDecoder.decode(toFile)...
[ "protected", "GlobusOutputStream", "getOutputStream", "(", "long", "size", ")", "throws", "Exception", "{", "GlobusOutputStream", "out", "=", "null", ";", "String", "toP", "=", "dstUrl", ".", "getProtocol", "(", ")", ";", "String", "toFile", "=", "dstUrl", "."...
Returns output stream based on the destination url.
[ "Returns", "output", "stream", "based", "on", "the", "destination", "url", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/urlcopy/UrlCopy.java#L590-L647
train
jglobus/JGlobus
io/src/main/java/org/globus/io/urlcopy/UrlCopy.java
UrlCopy.transfer
private boolean transfer(long total, GlobusInputStream in, GlobusOutputStream out) throws IOException { byte [] buffer = new byte[bufferSize]; int bytes = 0; long totalBytes = total; long transferedB...
java
private boolean transfer(long total, GlobusInputStream in, GlobusOutputStream out) throws IOException { byte [] buffer = new byte[bufferSize]; int bytes = 0; long totalBytes = total; long transferedB...
[ "private", "boolean", "transfer", "(", "long", "total", ",", "GlobusInputStream", "in", ",", "GlobusOutputStream", "out", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "bufferSize", "]", ";", "int", "bytes", "=", "...
This function performs the actual transfer.
[ "This", "function", "performs", "the", "actual", "transfer", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/urlcopy/UrlCopy.java#L652-L695
train
jglobus/JGlobus
io/src/main/java/org/globus/io/urlcopy/UrlCopy.java
UrlCopy.thirdPartyTransfer
private void thirdPartyTransfer() throws UrlCopyException { logger.debug("Trying third party transfer..."); FTPClient srcFTP = null; FTPClient dstFTP = null; try { srcFTP = createFTPConnection(srcUrl, true); dstFTP = createFTPConnection(dstUrl, false);...
java
private void thirdPartyTransfer() throws UrlCopyException { logger.debug("Trying third party transfer..."); FTPClient srcFTP = null; FTPClient dstFTP = null; try { srcFTP = createFTPConnection(srcUrl, true); dstFTP = createFTPConnection(dstUrl, false);...
[ "private", "void", "thirdPartyTransfer", "(", ")", "throws", "UrlCopyException", "{", "logger", ".", "debug", "(", "\"Trying third party transfer...\"", ")", ";", "FTPClient", "srcFTP", "=", "null", ";", "FTPClient", "dstFTP", "=", "null", ";", "try", "{", "srcF...
This performs thrid party transfer only if source and destination urls are ftp urls.
[ "This", "performs", "thrid", "party", "transfer", "only", "if", "source", "and", "destination", "urls", "are", "ftp", "urls", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/urlcopy/UrlCopy.java#L710-L775
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/VarRef.java
VarRef.evaluate
public String evaluate(Map symbolTable) throws RslEvaluationException { String var = null; if (symbolTable != null) { var = (String)symbolTable.get(value); } if (var == null && defValue != null) { var = defValue.evaluate(symbolTable); } if (var == null) { /* NOTE: according to the rsl specs the...
java
public String evaluate(Map symbolTable) throws RslEvaluationException { String var = null; if (symbolTable != null) { var = (String)symbolTable.get(value); } if (var == null && defValue != null) { var = defValue.evaluate(symbolTable); } if (var == null) { /* NOTE: according to the rsl specs the...
[ "public", "String", "evaluate", "(", "Map", "symbolTable", ")", "throws", "RslEvaluationException", "{", "String", "var", "=", "null", ";", "if", "(", "symbolTable", "!=", "null", ")", "{", "var", "=", "(", "String", ")", "symbolTable", ".", "get", "(", ...
Evaluates the variable reference with the specified symbol table. The value of the reference is first looked up in the symbol table. If not found, then the default value is used. If the default value is not specified, the reference is evaluated to an empty string. @param symbolTable the symbol table to evaluate the va...
[ "Evaluates", "the", "variable", "reference", "with", "the", "specified", "symbol", "table", ".", "The", "value", "of", "the", "reference", "is", "first", "looked", "up", "in", "the", "symbol", "table", ".", "If", "not", "found", "then", "the", "default", "...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/VarRef.java#L89-L114
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/VarRef.java
VarRef.toRSL
public void toRSL(StringBuffer buf, boolean explicitConcat) { buf.append("$("); buf.append( value ); if (defValue != null) { buf.append(" "); defValue.toRSL(buf, explicitConcat); } buf.append(")"); if (concatValue == null) return; if (explicitConcat) buf.append(" # "); concatValue.toRSL(buf, expl...
java
public void toRSL(StringBuffer buf, boolean explicitConcat) { buf.append("$("); buf.append( value ); if (defValue != null) { buf.append(" "); defValue.toRSL(buf, explicitConcat); } buf.append(")"); if (concatValue == null) return; if (explicitConcat) buf.append(" # "); concatValue.toRSL(buf, expl...
[ "public", "void", "toRSL", "(", "StringBuffer", "buf", ",", "boolean", "explicitConcat", ")", "{", "buf", ".", "append", "(", "\"$(\"", ")", ";", "buf", ".", "append", "(", "value", ")", ";", "if", "(", "defValue", "!=", "null", ")", "{", "buf", ".",...
Produces a RSL representation of this variable reference. @param buf buffer to add the RSL representation to. @param explicitConcat if true explicit concatination will be used in RSL strings.
[ "Produces", "a", "RSL", "representation", "of", "this", "variable", "reference", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/VarRef.java#L123-L139
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/trustmanager/PKITrustManager.java
PKITrustManager.checkClientTrusted
public void checkClientTrusted(X509Certificate[] x509Certificates, String authType) throws CertificateException { // JGLOBUS-97 : anonymous clients? CertPath certPath = CertificateUtil.getCertPath(x509Certificates); try { this.result = this.validator.engineValidate(certPa...
java
public void checkClientTrusted(X509Certificate[] x509Certificates, String authType) throws CertificateException { // JGLOBUS-97 : anonymous clients? CertPath certPath = CertificateUtil.getCertPath(x509Certificates); try { this.result = this.validator.engineValidate(certPa...
[ "public", "void", "checkClientTrusted", "(", "X509Certificate", "[", "]", "x509Certificates", ",", "String", "authType", ")", "throws", "CertificateException", "{", "// JGLOBUS-97 : anonymous clients?", "CertPath", "certPath", "=", "CertificateUtil", ".", "getCertPath", "...
Test if the client is trusted based on the certificate chain. Does not currently support anonymous clients. @param x509Certificates The certificate chain to test for validity. @param authType The authentication type based on the client certificate. @throws CertificateException If the path validation fails.
[ "Test", "if", "the", "client", "is", "trusted", "based", "on", "the", "certificate", "chain", ".", "Does", "not", "currently", "support", "anonymous", "clients", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/trustmanager/PKITrustManager.java#L89-L100
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/trustmanager/PKITrustManager.java
PKITrustManager.getAcceptedIssuers
public X509Certificate[] getAcceptedIssuers() { try { Collection<X509Certificate> trusted = CertificateLoadUtil.getTrustedCertificates( this.parameters.getTrustStore(), null); return trusted.toArray(new X509Certificate[trusted.size()]); } catch (KeyStoreExcept...
java
public X509Certificate[] getAcceptedIssuers() { try { Collection<X509Certificate> trusted = CertificateLoadUtil.getTrustedCertificates( this.parameters.getTrustStore(), null); return trusted.toArray(new X509Certificate[trusted.size()]); } catch (KeyStoreExcept...
[ "public", "X509Certificate", "[", "]", "getAcceptedIssuers", "(", ")", "{", "try", "{", "Collection", "<", "X509Certificate", ">", "trusted", "=", "CertificateLoadUtil", ".", "getTrustedCertificates", "(", "this", ".", "parameters", ".", "getTrustStore", "(", ")",...
Get the collection of trusted certificate issuers. @return The trusted certificate issuers.
[ "Get", "the", "collection", "of", "trusted", "certificate", "issuers", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/trustmanager/PKITrustManager.java#L126-L135
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java
X509Credential.getDecodedPEMObject
private static byte[] getDecodedPEMObject(BufferedReader reader) throws IOException { String line; StringBuffer buf = new StringBuffer(); while ((line = reader.readLine()) != null) { if (line.indexOf("--END") != -1) { // found end return Base64.decode(buf.toString().g...
java
private static byte[] getDecodedPEMObject(BufferedReader reader) throws IOException { String line; StringBuffer buf = new StringBuffer(); while ((line = reader.readLine()) != null) { if (line.indexOf("--END") != -1) { // found end return Base64.decode(buf.toString().g...
[ "private", "static", "byte", "[", "]", "getDecodedPEMObject", "(", "BufferedReader", "reader", ")", "throws", "IOException", "{", "String", "line", ";", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "while", "(", "(", "line", "=", "reader...
Reads Base64 encoded data from the stream and returns its decoded value. The reading continues until the "END" string is found in the data. Otherwise, returns null.
[ "Reads", "Base64", "encoded", "data", "from", "the", "stream", "and", "returns", "its", "decoded", "value", ".", "The", "reading", "continues", "until", "the", "END", "string", "is", "found", "in", "the", "data", ".", "Otherwise", "returns", "null", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java#L180-L191
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java
X509Credential.saveCertificateChain
public void saveCertificateChain(OutputStream out) throws IOException, CertificateEncodingException { CertificateIOUtil.writeCertificate(out, this.certChain[0]); for (int i = 1; i < this.certChain.length; i++) { // skip the self-signed certificates if (this.certChain[i].getSubj...
java
public void saveCertificateChain(OutputStream out) throws IOException, CertificateEncodingException { CertificateIOUtil.writeCertificate(out, this.certChain[0]); for (int i = 1; i < this.certChain.length; i++) { // skip the self-signed certificates if (this.certChain[i].getSubj...
[ "public", "void", "saveCertificateChain", "(", "OutputStream", "out", ")", "throws", "IOException", ",", "CertificateEncodingException", "{", "CertificateIOUtil", ".", "writeCertificate", "(", "out", ",", "this", ".", "certChain", "[", "0", "]", ")", ";", "for", ...
COMMENT Used to be "key cert cert cert ...", which is wrong afaik. must be "cert key cert cert ..."
[ "COMMENT", "Used", "to", "be", "key", "cert", "cert", "cert", "...", "which", "is", "wrong", "afaik", ".", "must", "be", "cert", "key", "cert", "cert", "..." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java#L200-L212
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java
X509Credential.getCertNum
public int getCertNum() { for (int i = this.certChain.length - 1; i >= 0; i--) { if (!this.certChain[i].getSubjectDN().equals(this.certChain[i].getIssuerDN())) { return i + 1; } } return this.certChain.length; }
java
public int getCertNum() { for (int i = this.certChain.length - 1; i >= 0; i--) { if (!this.certChain[i].getSubjectDN().equals(this.certChain[i].getIssuerDN())) { return i + 1; } } return this.certChain.length; }
[ "public", "int", "getCertNum", "(", ")", "{", "for", "(", "int", "i", "=", "this", ".", "certChain", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "if", "(", "!", "this", ".", "certChain", "[", "i", "]", ".", "getSub...
Returns the number of certificates in the credential without the self-signed certificates. @return number of certificates without counting self-signed certificates
[ "Returns", "the", "number", "of", "certificates", "in", "the", "credential", "without", "the", "self", "-", "signed", "certificates", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java#L273-L280
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java
X509Credential.getTimeLeft
public long getTimeLeft() { Date earliestTime = null; for (int i = 0; i < this.certChain.length; i++) { Date time = this.certChain[i].getNotAfter(); if (earliestTime == null || time.before(earliestTime)) { earliestTime = time; } } long ...
java
public long getTimeLeft() { Date earliestTime = null; for (int i = 0; i < this.certChain.length; i++) { Date time = this.certChain[i].getNotAfter(); if (earliestTime == null || time.before(earliestTime)) { earliestTime = time; } } long ...
[ "public", "long", "getTimeLeft", "(", ")", "{", "Date", "earliestTime", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "certChain", ".", "length", ";", "i", "++", ")", "{", "Date", "time", "=", "this", ".", "certC...
Returns time left of this credential. The time left of the credential is based on the certificate with the shortest validity time. @return time left in seconds. Returns 0 if the certificate has expired.
[ "Returns", "time", "left", "of", "this", "credential", ".", "The", "time", "left", "of", "the", "credential", "is", "based", "on", "the", "certificate", "with", "the", "shortest", "validity", "time", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java#L355-L365
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java
X509Credential.getIdentityCertificate
public X509Certificate getIdentityCertificate() { try { return BouncyCastleUtil.getIdentityCertificate(this.certChain); } catch (CertificateException e) { logger.debug("Error getting certificate identity.", e); return null; } }
java
public X509Certificate getIdentityCertificate() { try { return BouncyCastleUtil.getIdentityCertificate(this.certChain); } catch (CertificateException e) { logger.debug("Error getting certificate identity.", e); return null; } }
[ "public", "X509Certificate", "getIdentityCertificate", "(", ")", "{", "try", "{", "return", "BouncyCastleUtil", ".", "getIdentityCertificate", "(", "this", ".", "certChain", ")", ";", "}", "catch", "(", "CertificateException", "e", ")", "{", "logger", ".", "debu...
Returns the identity certificate of this credential. The identity certificate is the first certificate in the chain that is not an impersonation proxy certificate. @return <code>X509Certificate</code> the identity cert. Null, if unable to get the identity certificate (an error occurred)
[ "Returns", "the", "identity", "certificate", "of", "this", "credential", ".", "The", "identity", "certificate", "is", "the", "first", "certificate", "in", "the", "chain", "that", "is", "not", "an", "impersonation", "proxy", "certificate", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java#L390-L397
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java
X509Credential.getPathConstraint
public int getPathConstraint() { int pathLength = Integer.MAX_VALUE; try { for (int i=0; i<this.certChain.length; i++) { int length = BouncyCastleUtil.getProxyPathConstraint(this.certChain[i]); // if length is one, then no proxy cert extension exists, so ...
java
public int getPathConstraint() { int pathLength = Integer.MAX_VALUE; try { for (int i=0; i<this.certChain.length; i++) { int length = BouncyCastleUtil.getProxyPathConstraint(this.certChain[i]); // if length is one, then no proxy cert extension exists, so ...
[ "public", "int", "getPathConstraint", "(", ")", "{", "int", "pathLength", "=", "Integer", ".", "MAX_VALUE", ";", "try", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "certChain", ".", "length", ";", "i", "++", ")", "{", "int", ...
Returns the path length constraint. The shortest length in the chain of certificates is returned as the credential's path length. @return The path length constraint of the credential. -1 is any error occurs.
[ "Returns", "the", "path", "length", "constraint", ".", "The", "shortest", "length", "in", "the", "chain", "of", "certificates", "is", "returned", "as", "the", "credential", "s", "path", "length", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java#L406-L426
train
jglobus/JGlobus
gss/src/main/java/org/globus/net/ServerSocketFactory.java
ServerSocketFactory.createServerSocket
private ServerSocket createServerSocket(int backlog, InetAddress binAddr) throws IOException { ServerSocket server = null ; int port = 0; while(true) { port = this.portRange.getFreePort(port); try { server = new PrServerSocket(port, backlog, binA...
java
private ServerSocket createServerSocket(int backlog, InetAddress binAddr) throws IOException { ServerSocket server = null ; int port = 0; while(true) { port = this.portRange.getFreePort(port); try { server = new PrServerSocket(port, backlog, binA...
[ "private", "ServerSocket", "createServerSocket", "(", "int", "backlog", ",", "InetAddress", "binAddr", ")", "throws", "IOException", "{", "ServerSocket", "server", "=", "null", ";", "int", "port", "=", "0", ";", "while", "(", "true", ")", "{", "port", "=", ...
Tries to find first available port within the port range specified. If it finds a free port, it first checks if the port is not used by any other server. If it is, it keeps looking for a next available port. If none found, it throws an exception. If the port is available the server instance is returned.
[ "Tries", "to", "find", "first", "available", "port", "within", "the", "port", "range", "specified", ".", "If", "it", "finds", "a", "free", "port", "it", "first", "checks", "if", "the", "port", "is", "not", "used", "by", "any", "other", "server", ".", "...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/net/ServerSocketFactory.java#L124-L142
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/GridFTPClient.java
GridFTPClient.checkGridFTPSupport
protected void checkGridFTPSupport() throws IOException, ServerException { FeatureList fl = getFeatureList(); if ( !(fl.contains(FeatureList.PARALLEL) && fl.contains(FeatureList.ESTO) && fl.contains(FeatureList.ERET) && fl.cont...
java
protected void checkGridFTPSupport() throws IOException, ServerException { FeatureList fl = getFeatureList(); if ( !(fl.contains(FeatureList.PARALLEL) && fl.contains(FeatureList.ESTO) && fl.contains(FeatureList.ERET) && fl.cont...
[ "protected", "void", "checkGridFTPSupport", "(", ")", "throws", "IOException", ",", "ServerException", "{", "FeatureList", "fl", "=", "getFeatureList", "(", ")", ";", "if", "(", "!", "(", "fl", ".", "contains", "(", "FeatureList", ".", "PARALLEL", ")", "&&",...
assure that the server supports extended transfer features; throw exception if not
[ "assure", "that", "the", "server", "supports", "extended", "transfer", "features", ";", "throw", "exception", "if", "not" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/GridFTPClient.java#L768-L780
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/GridFTPClient.java
GridFTPClient.get
public void get(String remoteFileName, File localFile) throws IOException, ClientException, ServerException { if (gSession.transferMode == GridFTPSession.MODE_EBLOCK) { DataSink sink = new FileRandomIO(new RandomAccessFile(loc...
java
public void get(String remoteFileName, File localFile) throws IOException, ClientException, ServerException { if (gSession.transferMode == GridFTPSession.MODE_EBLOCK) { DataSink sink = new FileRandomIO(new RandomAccessFile(loc...
[ "public", "void", "get", "(", "String", "remoteFileName", ",", "File", "localFile", ")", "throws", "IOException", ",", "ClientException", ",", "ServerException", "{", "if", "(", "gSession", ".", "transferMode", "==", "GridFTPSession", ".", "MODE_EBLOCK", ")", "{...
basic compatibility API
[ "basic", "compatibility", "API" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/GridFTPClient.java#L933-L945
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/GridFTPClient.java
GridFTPClient.setChecksum
public void setChecksum(ChecksumAlgorithm algorithm, String value) throws IOException, ServerException { String arguments = algorithm.toFtpCmdArgument() + " " + value; Command cmd = new Command("SCKS", arguments); try { controlChannel.execute(cmd)...
java
public void setChecksum(ChecksumAlgorithm algorithm, String value) throws IOException, ServerException { String arguments = algorithm.toFtpCmdArgument() + " " + value; Command cmd = new Command("SCKS", arguments); try { controlChannel.execute(cmd)...
[ "public", "void", "setChecksum", "(", "ChecksumAlgorithm", "algorithm", ",", "String", "value", ")", "throws", "IOException", ",", "ServerException", "{", "String", "arguments", "=", "algorithm", ".", "toFtpCmdArgument", "(", ")", "+", "\" \"", "+", "value", ";"...
Sets the checksum values ahead of the transfer @param algorithm the checksume algorithm @param value the checksum value as hexadecimal number @exception ServerException if an error occured.
[ "Sets", "the", "checksum", "values", "ahead", "of", "the", "transfer" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/GridFTPClient.java#L968-L981
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/GridFTPClient.java
GridFTPClient.checksum
public String checksum(ChecksumAlgorithm algorithm, long offset, long length, String file) throws IOException, ServerException { String arguments = algorithm.toFtpCmdArgument() + " " + String.valueOf(offset) + " " + String.valueOf(length) + " " + file; ...
java
public String checksum(ChecksumAlgorithm algorithm, long offset, long length, String file) throws IOException, ServerException { String arguments = algorithm.toFtpCmdArgument() + " " + String.valueOf(offset) + " " + String.valueOf(length) + " " + file; ...
[ "public", "String", "checksum", "(", "ChecksumAlgorithm", "algorithm", ",", "long", "offset", ",", "long", "length", ",", "String", "file", ")", "throws", "IOException", ",", "ServerException", "{", "String", "arguments", "=", "algorithm", ".", "toFtpCmdArgument",...
Computes and returns a checksum of a file. transferred. @param algorithm the checksume algorithm @param offset the offset @param length the length @param file file to compute checksum of @return the computed checksum @exception ServerException if an error occured.
[ "Computes", "and", "returns", "a", "checksum", "of", "a", "file", ".", "transferred", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/GridFTPClient.java#L995-L1012
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/GridFTPClient.java
GridFTPClient.changeGroup
public void changeGroup(String group, String file) throws IOException, ServerException { String arguments = group + " " + file; Command cmd = new Command("SITE CHGRP", arguments); try { controlChannel.execute(cmd); } catch (UnexpectedReplyCodeException urce) { ...
java
public void changeGroup(String group, String file) throws IOException, ServerException { String arguments = group + " " + file; Command cmd = new Command("SITE CHGRP", arguments); try { controlChannel.execute(cmd); } catch (UnexpectedReplyCodeException urce) { ...
[ "public", "void", "changeGroup", "(", "String", "group", ",", "String", "file", ")", "throws", "IOException", ",", "ServerException", "{", "String", "arguments", "=", "group", "+", "\" \"", "+", "file", ";", "Command", "cmd", "=", "new", "Command", "(", "\...
Change the Unix group membership of a file. @param group the name or ID of the group @param file the file whose group membership should be changed @exception ServerException if an error occurred.
[ "Change", "the", "Unix", "group", "membership", "of", "a", "file", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/GridFTPClient.java#L1085-L1096
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/GridFTPClient.java
GridFTPClient.changeModificationTime
public void changeModificationTime(int year, int month, int day, int hour, int min, int sec, String file) throws IOException, ServerException { DecimalFormat df2 = new DecimalFormat("00"); DecimalFormat df4 = new DecimalFormat("0000"); String arguments = df4.format(year) + d...
java
public void changeModificationTime(int year, int month, int day, int hour, int min, int sec, String file) throws IOException, ServerException { DecimalFormat df2 = new DecimalFormat("00"); DecimalFormat df4 = new DecimalFormat("0000"); String arguments = df4.format(year) + d...
[ "public", "void", "changeModificationTime", "(", "int", "year", ",", "int", "month", ",", "int", "day", ",", "int", "hour", ",", "int", "min", ",", "int", "sec", ",", "String", "file", ")", "throws", "IOException", ",", "ServerException", "{", "DecimalForm...
Change the modification time of a file. @param year Modifcation year @param month Modification month (1-12) @param day Modification day (1-31) @param hour Modification hour (0-23) @param min Modification minutes (0-59) @param sec Modification seconds (0-59) @param file file whose m...
[ "Change", "the", "modification", "time", "of", "a", "file", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/GridFTPClient.java#L1111-L1127
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/GridFTPClient.java
GridFTPClient.createSymbolicLink
public void createSymbolicLink(String link_target, String link_name) throws IOException, ServerException { String arguments = link_target.replaceAll(" ", "%20") + " " + link_name; Command cmd = new Command("SITE SYMLINK", arguments); try { controlChannel.execute(cmd); ...
java
public void createSymbolicLink(String link_target, String link_name) throws IOException, ServerException { String arguments = link_target.replaceAll(" ", "%20") + " " + link_name; Command cmd = new Command("SITE SYMLINK", arguments); try { controlChannel.execute(cmd); ...
[ "public", "void", "createSymbolicLink", "(", "String", "link_target", ",", "String", "link_name", ")", "throws", "IOException", ",", "ServerException", "{", "String", "arguments", "=", "link_target", ".", "replaceAll", "(", "\" \"", ",", "\"%20\"", ")", "+", "\"...
Create a symbolic link on the FTP server. @param link_target the path to which the symbolic link should point @param link_name the path of the symbolic link to create @throws IOException @throws ServerException if an error occurred.
[ "Create", "a", "symbolic", "link", "on", "the", "FTP", "server", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/GridFTPClient.java#L1137-L1150
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/X509Extension.java
X509Extension.setOid
public void setOid(String oid) { if (oid == null) { throw new IllegalArgumentException(i18n.getMessage("oidNull")); } this.oid = oid; }
java
public void setOid(String oid) { if (oid == null) { throw new IllegalArgumentException(i18n.getMessage("oidNull")); } this.oid = oid; }
[ "public", "void", "setOid", "(", "String", "oid", ")", "{", "if", "(", "oid", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "i18n", ".", "getMessage", "(", "\"oidNull\"", ")", ")", ";", "}", "this", ".", "oid", "=", "oid", ...
Sets the oid of this extension. @param oid the oid of this extension. Cannot not null.
[ "Sets", "the", "oid", "of", "this", "extension", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509Extension.java#L78-L83
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/GramJob.java
GramJob.addListener
public void addListener(GramJobListener listener) { if (listeners == null) listeners = new Vector(); listeners.addElement(listener); }
java
public void addListener(GramJobListener listener) { if (listeners == null) listeners = new Vector(); listeners.addElement(listener); }
[ "public", "void", "addListener", "(", "GramJobListener", "listener", ")", "{", "if", "(", "listeners", "==", "null", ")", "listeners", "=", "new", "Vector", "(", ")", ";", "listeners", ".", "addElement", "(", "listener", ")", ";", "}" ]
Add a listener to the GramJob. The listener will be notified whenever the status of the GramJob changes. @param listener The object that wishes to receive status updates. @see org.globus.gram.GramJobListener
[ "Add", "a", "listener", "to", "the", "GramJob", ".", "The", "listener", "will", "be", "notified", "whenever", "the", "status", "of", "the", "GramJob", "changes", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/GramJob.java#L80-L83
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/GramJob.java
GramJob.setStatus
protected void setStatus(int status) { if (this.status == status) return; this.status = status; if (listeners == null) return; int size = listeners.size(); for(int i=0;i<size;i++) { GramJobListener listener = (GramJobListener)listeners.elementAt(i); listener.statusChanged(this); } }
java
protected void setStatus(int status) { if (this.status == status) return; this.status = status; if (listeners == null) return; int size = listeners.size(); for(int i=0;i<size;i++) { GramJobListener listener = (GramJobListener)listeners.elementAt(i); listener.statusChanged(this); } }
[ "protected", "void", "setStatus", "(", "int", "status", ")", "{", "if", "(", "this", ".", "status", "==", "status", ")", "return", ";", "this", ".", "status", "=", "status", ";", "if", "(", "listeners", "==", "null", ")", "return", ";", "int", "size"...
Sets the status of the job. User should not call this function. @param status status of the job
[ "Sets", "the", "status", "of", "the", "job", ".", "User", "should", "not", "call", "this", "function", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/GramJob.java#L173-L183
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/GramJob.java
GramJob.request
public void request(String contact, boolean batch) throws GramException, GSSException { Gram.request(contact, this, batch); }
java
public void request(String contact, boolean batch) throws GramException, GSSException { Gram.request(contact, this, batch); }
[ "public", "void", "request", "(", "String", "contact", ",", "boolean", "batch", ")", "throws", "GramException", ",", "GSSException", "{", "Gram", ".", "request", "(", "contact", ",", "this", ",", "batch", ")", ";", "}" ]
Submits a job to the specified gatekeeper either as an interactive or batch job. Performs limited delegation. @param contact the resource manager contact. @param batch specifies if the job should be submitted as a batch job. @throws GramException if error occurs during job submission. @throws GSSException if user cred...
[ "Submits", "a", "job", "to", "the", "specified", "gatekeeper", "either", "as", "an", "interactive", "or", "batch", "job", ".", "Performs", "limited", "delegation", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/GramJob.java#L272-L275
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/GramJob.java
GramJob.signal
public int signal(int signal, String arg) throws GramException, GSSException { return Gram.jobSignal(this, signal, arg); }
java
public int signal(int signal, String arg) throws GramException, GSSException { return Gram.jobSignal(this, signal, arg); }
[ "public", "int", "signal", "(", "int", "signal", ",", "String", "arg", ")", "throws", "GramException", ",", "GSSException", "{", "return", "Gram", ".", "jobSignal", "(", "this", ",", "signal", ",", "arg", ")", ";", "}" ]
Sends a signal command to the job. @param signal signal type @param arg argument of signal @throws GramException if error occurs during signalization. @throws GSSException if user credentials are invalid.
[ "Sends", "a", "signal", "command", "to", "the", "job", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/GramJob.java#L383-L386
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/GramJob.java
GramJob.getStatusAsString
public static String getStatusAsString(int status) { if (status == STATUS_PENDING) { return "PENDING"; } else if (status == STATUS_ACTIVE) { return "ACTIVE"; } else if (status == STATUS_DONE) { return "DONE"; } else if (status == STATUS_FAILED) { return "FAILED"; } else if (status == STATUS_SUS...
java
public static String getStatusAsString(int status) { if (status == STATUS_PENDING) { return "PENDING"; } else if (status == STATUS_ACTIVE) { return "ACTIVE"; } else if (status == STATUS_DONE) { return "DONE"; } else if (status == STATUS_FAILED) { return "FAILED"; } else if (status == STATUS_SUS...
[ "public", "static", "String", "getStatusAsString", "(", "int", "status", ")", "{", "if", "(", "status", "==", "STATUS_PENDING", ")", "{", "return", "\"PENDING\"", ";", "}", "else", "if", "(", "status", "==", "STATUS_ACTIVE", ")", "{", "return", "\"ACTIVE\"",...
Convert the status of a GramJob from an integer to a string. This method is not typically called by users. @return string representing the status of the GramJob passed as an argument.
[ "Convert", "the", "status", "of", "a", "GramJob", "from", "an", "integer", "to", "a", "string", ".", "This", "method", "is", "not", "typically", "called", "by", "users", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/GramJob.java#L448-L467
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/CallbackHandler.java
CallbackHandler.registerJob
public void registerJob(GramJob job) { String id = job.getIDAsString(); _jobs.put(id, job); }
java
public void registerJob(GramJob job) { String id = job.getIDAsString(); _jobs.put(id, job); }
[ "public", "void", "registerJob", "(", "GramJob", "job", ")", "{", "String", "id", "=", "job", ".", "getIDAsString", "(", ")", ";", "_jobs", ".", "put", "(", "id", ",", "job", ")", ";", "}" ]
Registers gram job to listen for status updates @param job gram job
[ "Registers", "gram", "job", "to", "listen", "for", "status", "updates" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/CallbackHandler.java#L87-L90
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/CallbackHandler.java
CallbackHandler.unregisterJob
public void unregisterJob(GramJob job) { String id = job.getIDAsString(); _jobs.remove(id); }
java
public void unregisterJob(GramJob job) { String id = job.getIDAsString(); _jobs.remove(id); }
[ "public", "void", "unregisterJob", "(", "GramJob", "job", ")", "{", "String", "id", "=", "job", ".", "getIDAsString", "(", ")", ";", "_jobs", ".", "remove", "(", "id", ")", ";", "}" ]
Unregisters gram job from listening to status updates @param job gram job
[ "Unregisters", "gram", "job", "from", "listening", "to", "status", "updates" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/CallbackHandler.java#L96-L99
train
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/auth/HostOrSelfAuthorization.java
HostOrSelfAuthorization.authorize
public void authorize(GSSContext context, String host) throws AuthorizationException { logger.debug("Authorization: HOST/SELF"); try { GSSName expected = this.hostAuthz.getExpectedName(null, host); GSSName target = null; if (context.isInitiator()) { target = con...
java
public void authorize(GSSContext context, String host) throws AuthorizationException { logger.debug("Authorization: HOST/SELF"); try { GSSName expected = this.hostAuthz.getExpectedName(null, host); GSSName target = null; if (context.isInitiator()) { target = con...
[ "public", "void", "authorize", "(", "GSSContext", "context", ",", "String", "host", ")", "throws", "AuthorizationException", "{", "logger", ".", "debug", "(", "\"Authorization: HOST/SELF\"", ")", ";", "try", "{", "GSSName", "expected", "=", "this", ".", "hostAut...
Performs host authorization. If that fails, performs self authorization
[ "Performs", "host", "authorization", ".", "If", "that", "fails", "performs", "self", "authorization" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/auth/HostOrSelfAuthorization.java#L61-L92
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/X509ExtensionSet.java
X509ExtensionSet.add
public X509Extension add(X509Extension extension) { if (extension == null) { throw new IllegalArgumentException(i18n .getMessage("extensionNull")); } return (X509Extension)this.extensions.put(extension.getOid(), extension); }
java
public X509Extension add(X509Extension extension) { if (extension == null) { throw new IllegalArgumentException(i18n .getMessage("extensionNull")); } return (X509Extension)this.extensions.put(extension.getOid(), extension); }
[ "public", "X509Extension", "add", "(", "X509Extension", "extension", ")", "{", "if", "(", "extension", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "i18n", ".", "getMessage", "(", "\"extensionNull\"", ")", ")", ";", "}", "return", ...
Adds a X509Extension object to this set. @param extension the extension to add @return an extension that was removed with the same oid as the new extension. Null, if none existed before.
[ "Adds", "a", "X509Extension", "object", "to", "this", "set", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509ExtensionSet.java#L47-L54
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/X509ExtensionSet.java
X509ExtensionSet.get
public X509Extension get(String oid) { if (oid == null) { throw new IllegalArgumentException(i18n.getMessage("oidNull")); } return (X509Extension)this.extensions.get(oid); }
java
public X509Extension get(String oid) { if (oid == null) { throw new IllegalArgumentException(i18n.getMessage("oidNull")); } return (X509Extension)this.extensions.get(oid); }
[ "public", "X509Extension", "get", "(", "String", "oid", ")", "{", "if", "(", "oid", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "i18n", ".", "getMessage", "(", "\"oidNull\"", ")", ")", ";", "}", "return", "(", "X509Extension", ...
Retrieves X509Extension by given oid. @param oid the oid of the extension to retrieve. @return the extension with the specified oid. Can be null if there is no extension with such oid.
[ "Retrieves", "X509Extension", "by", "given", "oid", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509ExtensionSet.java#L63-L68
train
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSName.java
GlobusGSSName.getHostBasedServiceCN
protected String getHostBasedServiceCN(boolean last) { if (hostBasedServiceCN == null) { String dn = name.getName(); int cnStart; if (last) { // use the last instance of CN in the DN cnStart = dn.lastIndexOf("CN=") + 3; } else { ...
java
protected String getHostBasedServiceCN(boolean last) { if (hostBasedServiceCN == null) { String dn = name.getName(); int cnStart; if (last) { // use the last instance of CN in the DN cnStart = dn.lastIndexOf("CN=") + 3; } else { ...
[ "protected", "String", "getHostBasedServiceCN", "(", "boolean", "last", ")", "{", "if", "(", "hostBasedServiceCN", "==", "null", ")", "{", "String", "dn", "=", "name", ".", "getName", "(", ")", ";", "int", "cnStart", ";", "if", "(", "last", ")", "{", "...
Returns the CN corresponding to the host part of the DN @param last true if the CN is assumed to be the last CN attribute in the RFC 2253 formatted DN, else false to assume it is the first DN attribute @return the CN of the host based service
[ "Returns", "the", "CN", "corresponding", "to", "the", "host", "part", "of", "the", "DN" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSName.java#L343-L377
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/Value.java
Value.concat
public void concat(Value value) { if (concatValue != null) { concatValue.concat(value); } else { concatValue = value; } }
java
public void concat(Value value) { if (concatValue != null) { concatValue.concat(value); } else { concatValue = value; } }
[ "public", "void", "concat", "(", "Value", "value", ")", "{", "if", "(", "concatValue", "!=", "null", ")", "{", "concatValue", ".", "concat", "(", "value", ")", ";", "}", "else", "{", "concatValue", "=", "value", ";", "}", "}" ]
Appends the specified value to the end of the chain of concatinated values. That is, if this value has no concatinated value then set the specified value as the concatinated value. If this value already has a concatinated value then append the specified value to that concatinated value. @param value the value to conca...
[ "Appends", "the", "specified", "value", "to", "the", "end", "of", "the", "chain", "of", "concatinated", "values", ".", "That", "is", "if", "this", "value", "has", "no", "concatinated", "value", "then", "set", "the", "specified", "value", "as", "the", "conc...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/Value.java#L107-L113
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/Value.java
Value.evaluate
public String evaluate(Map symbolTable) throws RslEvaluationException { if (concatValue == null) { return value; } else { StringBuffer buf = new StringBuffer(value); buf.append(concatValue.evaluate(symbolTable)); return buf.toString(); } }
java
public String evaluate(Map symbolTable) throws RslEvaluationException { if (concatValue == null) { return value; } else { StringBuffer buf = new StringBuffer(value); buf.append(concatValue.evaluate(symbolTable)); return buf.toString(); } }
[ "public", "String", "evaluate", "(", "Map", "symbolTable", ")", "throws", "RslEvaluationException", "{", "if", "(", "concatValue", "==", "null", ")", "{", "return", "value", ";", "}", "else", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", "valu...
Evaluates the value with the specified symbol table. In this case the function just returns the string representation of the actual value. No symbol table lookups are performed. @param symbolTable the symbol table to evaluate the value against. @return an evaluated string. @exception RslEvaluationException If an error...
[ "Evaluates", "the", "value", "with", "the", "specified", "symbol", "table", ".", "In", "this", "case", "the", "function", "just", "returns", "the", "string", "representation", "of", "the", "actual", "value", ".", "No", "symbol", "table", "lookups", "are", "p...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/Value.java#L128-L137
train
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/Value.java
Value.toRSL
public void toRSL(StringBuffer buf, boolean explicitConcat) { if ( explicitConcat ) { buf.append( quotify( value ) ); } else { buf.append( value ); } if (concatValue == null) { return; } if (explicitConcat) { buf.append(" # "); } concatValue.toRSL(buf, explici...
java
public void toRSL(StringBuffer buf, boolean explicitConcat) { if ( explicitConcat ) { buf.append( quotify( value ) ); } else { buf.append( value ); } if (concatValue == null) { return; } if (explicitConcat) { buf.append(" # "); } concatValue.toRSL(buf, explici...
[ "public", "void", "toRSL", "(", "StringBuffer", "buf", ",", "boolean", "explicitConcat", ")", "{", "if", "(", "explicitConcat", ")", "{", "buf", ".", "append", "(", "quotify", "(", "value", ")", ")", ";", "}", "else", "{", "buf", ".", "append", "(", ...
Produces a RSL representation of this value. @param buf buffer to add the RSL representation to. @param explicitConcat if true explicit concatination will be used in RSL strings.
[ "Produces", "a", "RSL", "representation", "of", "this", "value", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/Value.java#L178-L195
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.ping
public static void ping(GSSCredential cred, String resourceManagerContact) throws GramException, GSSException { ResourceManagerContact rmc = new ResourceManagerContact(resourceManagerContact); Socket socket = gatekeeperConnect(cred, rmc, false, false); HttpResponse hd = null; try { OutputStream out = ...
java
public static void ping(GSSCredential cred, String resourceManagerContact) throws GramException, GSSException { ResourceManagerContact rmc = new ResourceManagerContact(resourceManagerContact); Socket socket = gatekeeperConnect(cred, rmc, false, false); HttpResponse hd = null; try { OutputStream out = ...
[ "public", "static", "void", "ping", "(", "GSSCredential", "cred", ",", "String", "resourceManagerContact", ")", "throws", "GramException", ",", "GSSException", "{", "ResourceManagerContact", "rmc", "=", "new", "ResourceManagerContact", "(", "resourceManagerContact", ")"...
Performs ping operation on the gatekeeper with specified user credentials. Verifies if the user is authorized to submit a job to that gatekeeper. @throws GramException if an error occurs or user in unauthorized @param cred user credentials @param resourceManagerContact resource manager contact
[ "Performs", "ping", "operation", "on", "the", "gatekeeper", "with", "specified", "user", "credentials", ".", "Verifies", "if", "the", "user", "is", "authorized", "to", "submit", "a", "job", "to", "that", "gatekeeper", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L209-L243
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.request
public static void request(String resourceManagerContact, GramJob job) throws GramException, GSSException { request(resourceManagerContact, job, false); }
java
public static void request(String resourceManagerContact, GramJob job) throws GramException, GSSException { request(resourceManagerContact, job, false); }
[ "public", "static", "void", "request", "(", "String", "resourceManagerContact", ",", "GramJob", "job", ")", "throws", "GramException", ",", "GSSException", "{", "request", "(", "resourceManagerContact", ",", "job", ",", "false", ")", ";", "}" ]
Submits a GramJob to specified gatekeeper as an interactive job. Performs limited delegation. @throws GramException if an error occurs during submisson @param resourceManagerContact resource manager contact @param job gram job
[ "Submits", "a", "GramJob", "to", "specified", "gatekeeper", "as", "an", "interactive", "job", ".", "Performs", "limited", "delegation", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L253-L257
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.request
public static void request(String resourceManagerContact, GramJob job, boolean batchJob) throws GramException, GSSException { request(resourceManagerContact, job, batchJob, true); }
java
public static void request(String resourceManagerContact, GramJob job, boolean batchJob) throws GramException, GSSException { request(resourceManagerContact, job, batchJob, true); }
[ "public", "static", "void", "request", "(", "String", "resourceManagerContact", ",", "GramJob", "job", ",", "boolean", "batchJob", ")", "throws", "GramException", ",", "GSSException", "{", "request", "(", "resourceManagerContact", ",", "job", ",", "batchJob", ",",...
Submits a GramJob to specified gatekeeper as a interactive or batch job. Performs limited delegation. @throws GramException if an error occurs during submisson @param resourceManagerContact resource manager contact @param job gram job @param batchJob true if batch job, interactive otherwise
[ "Submits", "a", "GramJob", "to", "specified", "gatekeeper", "as", "a", "interactive", "or", "batch", "job", ".", "Performs", "limited", "delegation", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L268-L273
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.request
public static void request(String resourceManagerContact, GramJob job, boolean batchJob, boolean limitedDelegation) throws GramException, GSSException { GSSCredential cred = getJobCredentials(job); // at this point proxy cannot be null String callbackURL = null; CallbackHandle...
java
public static void request(String resourceManagerContact, GramJob job, boolean batchJob, boolean limitedDelegation) throws GramException, GSSException { GSSCredential cred = getJobCredentials(job); // at this point proxy cannot be null String callbackURL = null; CallbackHandle...
[ "public", "static", "void", "request", "(", "String", "resourceManagerContact", ",", "GramJob", "job", ",", "boolean", "batchJob", ",", "boolean", "limitedDelegation", ")", "throws", "GramException", ",", "GSSException", "{", "GSSCredential", "cred", "=", "getJobCre...
Submits a GramJob to specified gatekeeper as a interactive or batch job. @throws GramException if an error occurs during submisson @param resourceManagerContact resource manager contact @param job gram job @param batchJob true if batch job, interactive otherwise. @param limitedDelegation true for limited delegation, f...
[ "Submits", "a", "GramJob", "to", "specified", "gatekeeper", "as", "a", "interactive", "or", "batch", "job", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L290-L364
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.renew
public static void renew(GramJob job, GSSCredential newCred) throws GramException, GSSException { renew(job, newCred, true); }
java
public static void renew(GramJob job, GSSCredential newCred) throws GramException, GSSException { renew(job, newCred, true); }
[ "public", "static", "void", "renew", "(", "GramJob", "job", ",", "GSSCredential", "newCred", ")", "throws", "GramException", ",", "GSSException", "{", "renew", "(", "job", ",", "newCred", ",", "true", ")", ";", "}" ]
Requests that a globus job manager accept newly delegated credentials. Uses limited delegation. @param job The job whose credentials are to be renewed/refreshed @param newCred The credentials to use in the delegation process @throws GSSException if a GSSAPI error occurs @throws GramException if a connection/communicat...
[ "Requests", "that", "a", "globus", "job", "manager", "accept", "newly", "delegated", "credentials", ".", "Uses", "limited", "delegation", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L522-L525
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.cancel
public static void cancel(GramJob job) throws GramException, GSSException { GlobusURL jobURL = job.getID(); if (jobURL == null) { throw new GramException(GramException.ERROR_JOB_CONTACT_NOT_SET); } GSSCredential cred = getJobCredentials(job); String msg = GRAMProtocol.CANCEL_JOB(jobURL.getURL(), ...
java
public static void cancel(GramJob job) throws GramException, GSSException { GlobusURL jobURL = job.getID(); if (jobURL == null) { throw new GramException(GramException.ERROR_JOB_CONTACT_NOT_SET); } GSSCredential cred = getJobCredentials(job); String msg = GRAMProtocol.CANCEL_JOB(jobURL.getURL(), ...
[ "public", "static", "void", "cancel", "(", "GramJob", "job", ")", "throws", "GramException", ",", "GSSException", "{", "GlobusURL", "jobURL", "=", "job", ".", "getID", "(", ")", ";", "if", "(", "jobURL", "==", "null", ")", "{", "throw", "new", "GramExcep...
This function cancels an already running job. @throws GramException if an error occurs during cancel @param job job to be canceled
[ "This", "function", "cancels", "an", "already", "running", "job", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L610-L634
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.jobSignal
public static int jobSignal(GramJob job, int signal, String arg) throws GramException, GSSException { GlobusURL jobURL = job.getID(); GSSCredential cred = getJobCredentials(job); String msg = GRAMProtocol.SIGNAL(jobURL.getURL(), jobURL.getHost(), signal, arg); GatekeeperReply hd = null; hd ...
java
public static int jobSignal(GramJob job, int signal, String arg) throws GramException, GSSException { GlobusURL jobURL = job.getID(); GSSCredential cred = getJobCredentials(job); String msg = GRAMProtocol.SIGNAL(jobURL.getURL(), jobURL.getHost(), signal, arg); GatekeeperReply hd = null; hd ...
[ "public", "static", "int", "jobSignal", "(", "GramJob", "job", ",", "int", "signal", ",", "String", "arg", ")", "throws", "GramException", ",", "GSSException", "{", "GlobusURL", "jobURL", "=", "job", ".", "getID", "(", ")", ";", "GSSCredential", "cred", "=...
This function sends a signal to a job. @throws GramException if an error occurs during cancel @param job the signaled job @param signal type of the signal @param arg argument of the signal
[ "This", "function", "sends", "a", "signal", "to", "a", "job", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L686-L725
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.unregisterListener
public static void unregisterListener(GramJob job) throws GramException, GSSException { CallbackHandler handler; GSSCredential cred = getJobCredentials(job); handler = initCallbackHandler(cred); unregisterListener(job, handler); }
java
public static void unregisterListener(GramJob job) throws GramException, GSSException { CallbackHandler handler; GSSCredential cred = getJobCredentials(job); handler = initCallbackHandler(cred); unregisterListener(job, handler); }
[ "public", "static", "void", "unregisterListener", "(", "GramJob", "job", ")", "throws", "GramException", ",", "GSSException", "{", "CallbackHandler", "handler", ";", "GSSCredential", "cred", "=", "getJobCredentials", "(", "job", ")", ";", "handler", "=", "initCall...
This function unregisters the job from callback listener. The job status will not be updated. @throws GramException if an error occurs during unregistering @param job the job
[ "This", "function", "unregisters", "the", "job", "from", "callback", "listener", ".", "The", "job", "status", "will", "not", "be", "updated", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L777-L787
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.deactivateAllCallbackHandlers
public static void deactivateAllCallbackHandlers() { synchronized(callbackHandlers) { Enumeration e = callbackHandlers.elements(); while(e.hasMoreElements()) { CallbackHandler handler = (CallbackHandler)e.nextElement(); handler.shutdown(); } callbackHandlers.clear(); } }
java
public static void deactivateAllCallbackHandlers() { synchronized(callbackHandlers) { Enumeration e = callbackHandlers.elements(); while(e.hasMoreElements()) { CallbackHandler handler = (CallbackHandler)e.nextElement(); handler.shutdown(); } callbackHandlers.clear(); } }
[ "public", "static", "void", "deactivateAllCallbackHandlers", "(", ")", "{", "synchronized", "(", "callbackHandlers", ")", "{", "Enumeration", "e", "=", "callbackHandlers", ".", "elements", "(", ")", ";", "while", "(", "e", ".", "hasMoreElements", "(", ")", ")"...
Deactivates all callback handlers.
[ "Deactivates", "all", "callback", "handlers", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L810-L819
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.deactivateCallbackHandler
public static CallbackHandler deactivateCallbackHandler(GSSCredential cred) { if (cred == null) { return null; } CallbackHandler handler = (CallbackHandler)callbackHandlers.remove(cred); if (handler == null) { return null; } handler.shutdown(); return handler; }
java
public static CallbackHandler deactivateCallbackHandler(GSSCredential cred) { if (cred == null) { return null; } CallbackHandler handler = (CallbackHandler)callbackHandlers.remove(cred); if (handler == null) { return null; } handler.shutdown(); return handler; }
[ "public", "static", "CallbackHandler", "deactivateCallbackHandler", "(", "GSSCredential", "cred", ")", "{", "if", "(", "cred", "==", "null", ")", "{", "return", "null", ";", "}", "CallbackHandler", "handler", "=", "(", "CallbackHandler", ")", "callbackHandlers", ...
Deactivates a callback handler for a given credential. @param cred the credential of the callback handler. @return the callback handler that was deactivated. Null, if no callback handler is associated with the credential
[ "Deactivates", "a", "callback", "handler", "for", "a", "given", "credential", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L828-L839
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.debug
private static void debug(String header, GatekeeperReply reply) { if (logger.isTraceEnabled()) { logger.trace(header); logger.trace(reply.toString()); } }
java
private static void debug(String header, GatekeeperReply reply) { if (logger.isTraceEnabled()) { logger.trace(header); logger.trace(reply.toString()); } }
[ "private", "static", "void", "debug", "(", "String", "header", ",", "GatekeeperReply", "reply", ")", "{", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", "(", "header", ")", ";", "logger", ".", "trace", "(", "rep...
Debug function for displaying the gatekeeper reply.
[ "Debug", "function", "for", "displaying", "the", "gatekeeper", "reply", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L894-L899
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.debug
private static void debug(String header, HttpResponse response) { if (logger.isTraceEnabled()) { logger.trace(header); logger.trace(response.toString()); } }
java
private static void debug(String header, HttpResponse response) { if (logger.isTraceEnabled()) { logger.trace(header); logger.trace(response.toString()); } }
[ "private", "static", "void", "debug", "(", "String", "header", ",", "HttpResponse", "response", ")", "{", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", "(", "header", ")", ";", "logger", ".", "trace", "(", "res...
Debug function for displaying HTTP responses.
[ "Debug", "function", "for", "displaying", "HTTP", "responses", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L904-L909
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/Gram.java
Gram.debug
private static void debug(String header, String msg) { if (logger.isTraceEnabled()) { logger.trace(header); logger.trace(msg); } }
java
private static void debug(String header, String msg) { if (logger.isTraceEnabled()) { logger.trace(header); logger.trace(msg); } }
[ "private", "static", "void", "debug", "(", "String", "header", ",", "String", "msg", ")", "{", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", "(", "header", ")", ";", "logger", ".", "trace", "(", "msg", ")", ...
A general debug message that prints the header and msg when the debug level is smaler than 3 @param header The header to be printed @param msg The message to be printed
[ "A", "general", "debug", "message", "that", "prints", "the", "header", "and", "msg", "when", "the", "debug", "level", "is", "smaler", "than", "3" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/Gram.java#L917-L922
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/OpenSSLKey.java
OpenSSLKey.decrypt
public void decrypt(byte[] password) throws GeneralSecurityException { if (!isEncrypted()) { return; } byte[] enc = Base64.decode(this.encodedKey); SecretKeySpec key = getSecretKey(password, this.initializationVector.getIV()); Cipher cipher = getCipher(); c...
java
public void decrypt(byte[] password) throws GeneralSecurityException { if (!isEncrypted()) { return; } byte[] enc = Base64.decode(this.encodedKey); SecretKeySpec key = getSecretKey(password, this.initializationVector.getIV()); Cipher cipher = getCipher(); c...
[ "public", "void", "decrypt", "(", "byte", "[", "]", "password", ")", "throws", "GeneralSecurityException", "{", "if", "(", "!", "isEncrypted", "(", ")", ")", "{", "return", ";", "}", "byte", "[", "]", "enc", "=", "Base64", ".", "decode", "(", "this", ...
Decrypts the private key with given password. Does nothing if the key is not encrypted. @param password password to decrypt the key with. @throws GeneralSecurityException whenever an error occurs during decryption.
[ "Decrypts", "the", "private", "key", "with", "given", "password", ".", "Does", "nothing", "if", "the", "key", "is", "not", "encrypted", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/OpenSSLKey.java#L271-L288
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/OpenSSLKey.java
OpenSSLKey.encrypt
public void encrypt(byte[] password) throws GeneralSecurityException { if (isEncrypted()) { return; } if (this.encAlg == null) { setEncryptionAlgorithm("DES-EDE3-CBC"); } if (this.ivData == null) { generateIV(); } Key key = ...
java
public void encrypt(byte[] password) throws GeneralSecurityException { if (isEncrypted()) { return; } if (this.encAlg == null) { setEncryptionAlgorithm("DES-EDE3-CBC"); } if (this.ivData == null) { generateIV(); } Key key = ...
[ "public", "void", "encrypt", "(", "byte", "[", "]", "password", ")", "throws", "GeneralSecurityException", "{", "if", "(", "isEncrypted", "(", ")", ")", "{", "return", ";", "}", "if", "(", "this", ".", "encAlg", "==", "null", ")", "{", "setEncryptionAlgo...
Encrypts the private key with given password. Does nothing if the key is encrypted already. @param password password to encrypt the key with. @throws GeneralSecurityException whenever an error occurs during encryption.
[ "Encrypts", "the", "private", "key", "with", "given", "password", ".", "Does", "nothing", "if", "the", "key", "is", "encrypted", "already", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/OpenSSLKey.java#L308-L332
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/OpenSSLKey.java
OpenSSLKey.writeTo
public void writeTo(String file) throws IOException { File privateKey = FileUtil.createFile(file); // JGLOBUS-96 try{ privateKey.setReadable(false, true);//setOwnerAccessOnly(file); privateKey.setWritable(false, true);//setOwnerAccessOnly(file); }catch(SecurityException e)...
java
public void writeTo(String file) throws IOException { File privateKey = FileUtil.createFile(file); // JGLOBUS-96 try{ privateKey.setReadable(false, true);//setOwnerAccessOnly(file); privateKey.setWritable(false, true);//setOwnerAccessOnly(file); }catch(SecurityException e)...
[ "public", "void", "writeTo", "(", "String", "file", ")", "throws", "IOException", "{", "File", "privateKey", "=", "FileUtil", ".", "createFile", "(", "file", ")", ";", "// JGLOBUS-96", "try", "{", "privateKey", ".", "setReadable", "(", "false", ",", "true", ...
Writes the private key to the specified file in PEM format. If the key was encrypted it will be encoded as an encrypted RSA key. If not, it will be encoded as a regular RSA key. @param file file to write the key to. @throws IOException if I/O problems writing the key
[ "Writes", "the", "private", "key", "to", "the", "specified", "file", "in", "PEM", "format", ".", "If", "the", "key", "was", "encrypted", "it", "will", "be", "encoded", "as", "an", "encrypted", "RSA", "key", ".", "If", "not", "it", "will", "be", "encode...
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/OpenSSLKey.java#L386-L402
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/OpenSSLKey.java
OpenSSLKey.objectsEquals
private static boolean objectsEquals(Object a, Object b) { return (a == b) || (a != null && a.equals(b)); }
java
private static boolean objectsEquals(Object a, Object b) { return (a == b) || (a != null && a.equals(b)); }
[ "private", "static", "boolean", "objectsEquals", "(", "Object", "a", ",", "Object", "b", ")", "{", "return", "(", "a", "==", "b", ")", "||", "(", "a", "!=", "null", "&&", "a", ".", "equals", "(", "b", ")", ")", ";", "}" ]
Java 7 is adopted
[ "Java", "7", "is", "adopted" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/OpenSSLKey.java#L607-L609
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/dc/SocketPool.java
SocketPool.add
public synchronized void add(SocketBox sb) { int status = ((ManagedSocketBox) sb).getStatus(); if (allSockets.containsKey(sb)) { throw new IllegalArgumentException("This socket already exists in the socket pool."); } allSockets.put(sb, sb); if (status == ManagedSo...
java
public synchronized void add(SocketBox sb) { int status = ((ManagedSocketBox) sb).getStatus(); if (allSockets.containsKey(sb)) { throw new IllegalArgumentException("This socket already exists in the socket pool."); } allSockets.put(sb, sb); if (status == ManagedSo...
[ "public", "synchronized", "void", "add", "(", "SocketBox", "sb", ")", "{", "int", "status", "=", "(", "(", "ManagedSocketBox", ")", "sb", ")", ".", "getStatus", "(", ")", ";", "if", "(", "allSockets", ".", "containsKey", "(", "sb", ")", ")", "{", "th...
add socketBox to the pool. Depending on its state, it will be added to free or busy sockets.
[ "add", "socketBox", "to", "the", "pool", ".", "Depending", "on", "its", "state", "it", "will", "be", "added", "to", "free", "or", "busy", "sockets", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/dc/SocketPool.java#L45-L70
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/dc/SocketPool.java
SocketPool.remove
public synchronized void remove(SocketBox sb) { int status = ((ManagedSocketBox) sb).getStatus(); if (!allSockets.containsKey(sb)) { throw new IllegalArgumentException("This socket does not seem to exist in the socket pool."); } allSockets.remove(sb); if (status =...
java
public synchronized void remove(SocketBox sb) { int status = ((ManagedSocketBox) sb).getStatus(); if (!allSockets.containsKey(sb)) { throw new IllegalArgumentException("This socket does not seem to exist in the socket pool."); } allSockets.remove(sb); if (status =...
[ "public", "synchronized", "void", "remove", "(", "SocketBox", "sb", ")", "{", "int", "status", "=", "(", "(", "ManagedSocketBox", ")", "sb", ")", ".", "getStatus", "(", ")", ";", "if", "(", "!", "allSockets", ".", "containsKey", "(", "sb", ")", ")", ...
remove socketBox from the pool, remove all references to it
[ "remove", "socketBox", "from", "the", "pool", "remove", "all", "references", "to", "it" ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/dc/SocketPool.java#L73-L95
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/dc/SocketPool.java
SocketPool.applyToAll
public synchronized void applyToAll(SocketOperator op) throws Exception { Enumeration keys = allSockets.keys(); while (keys.hasMoreElements()) { SocketBox myBox = (SocketBox) keys.nextElement(); op.operate(myBox); } }
java
public synchronized void applyToAll(SocketOperator op) throws Exception { Enumeration keys = allSockets.keys(); while (keys.hasMoreElements()) { SocketBox myBox = (SocketBox) keys.nextElement(); op.operate(myBox); } }
[ "public", "synchronized", "void", "applyToAll", "(", "SocketOperator", "op", ")", "throws", "Exception", "{", "Enumeration", "keys", "=", "allSockets", ".", "keys", "(", ")", ";", "while", "(", "keys", ".", "hasMoreElements", "(", ")", ")", "{", "SocketBox",...
Apply the suplied callback to all socketBoxes.
[ "Apply", "the", "suplied", "callback", "to", "all", "socketBoxes", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/dc/SocketPool.java#L169-L175
train
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/dc/SocketPool.java
SocketPool.flush
public synchronized void flush() throws IOException { Enumeration keys = allSockets.keys(); // close all sockets before removing them while (keys.hasMoreElements()) { SocketBox myBox = (SocketBox) keys.nextElement(); if (myBox != null) { myBox.setSocket(n...
java
public synchronized void flush() throws IOException { Enumeration keys = allSockets.keys(); // close all sockets before removing them while (keys.hasMoreElements()) { SocketBox myBox = (SocketBox) keys.nextElement(); if (myBox != null) { myBox.setSocket(n...
[ "public", "synchronized", "void", "flush", "(", ")", "throws", "IOException", "{", "Enumeration", "keys", "=", "allSockets", ".", "keys", "(", ")", ";", "// close all sockets before removing them", "while", "(", "keys", ".", "hasMoreElements", "(", ")", ")", "{"...
Forcibly close all sockets, and remove them from the pool.
[ "Forcibly", "close", "all", "sockets", "and", "remove", "them", "from", "the", "pool", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/dc/SocketPool.java#L180-L194
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/GramAttributes.java
GramAttributes.isDryRun
public boolean isDryRun() { String run = getSingle("dryrun"); if (run == null) return false; if (run.equalsIgnoreCase("yes")) return true; return false; }
java
public boolean isDryRun() { String run = getSingle("dryrun"); if (run == null) return false; if (run.equalsIgnoreCase("yes")) return true; return false; }
[ "public", "boolean", "isDryRun", "(", ")", "{", "String", "run", "=", "getSingle", "(", "\"dryrun\"", ")", ";", "if", "(", "run", "==", "null", ")", "return", "false", ";", "if", "(", "run", ".", "equalsIgnoreCase", "(", "\"yes\"", ")", ")", "return", ...
Checks if dryryn is enabled. @return true only if dryrun is enabled. False, otherwise.
[ "Checks", "if", "dryryn", "is", "enabled", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/GramAttributes.java#L187-L192
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/GramAttributes.java
GramAttributes.setJobType
public void setJobType(int jobType) { String type = null; switch(jobType) { case JOBTYPE_SINGLE: type = "single"; break; case JOBTYPE_MULTIPLE: type = "multiple"; break; case JOBTYPE_MPI: type = "mpi"; break; case JOBTYPE_CONDOR: type = "condor"; break; } if (type != null) { set("jobtyp...
java
public void setJobType(int jobType) { String type = null; switch(jobType) { case JOBTYPE_SINGLE: type = "single"; break; case JOBTYPE_MULTIPLE: type = "multiple"; break; case JOBTYPE_MPI: type = "mpi"; break; case JOBTYPE_CONDOR: type = "condor"; break; } if (type != null) { set("jobtyp...
[ "public", "void", "setJobType", "(", "int", "jobType", ")", "{", "String", "type", "=", "null", ";", "switch", "(", "jobType", ")", "{", "case", "JOBTYPE_SINGLE", ":", "type", "=", "\"single\"", ";", "break", ";", "case", "JOBTYPE_MULTIPLE", ":", "type", ...
Sets a job type. @param jobType type of the job: One of the following: SINGLE, MULTIPLE, MPI, or CONDOR.
[ "Sets", "a", "job", "type", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/GramAttributes.java#L236-L251
train
jglobus/JGlobus
gram/src/main/java/org/globus/gram/GramAttributes.java
GramAttributes.getJobType
public int getJobType() { String jobType = getSingle("jobtype"); if (jobType == null) return -1; if (jobType.equalsIgnoreCase("single")) { return JOBTYPE_SINGLE; } else if (jobType.equalsIgnoreCase("multiple")) { return JOBTYPE_MULTIPLE; } else if (jobType.equalsIgnoreCase("mpi")) { return JOBTYPE_M...
java
public int getJobType() { String jobType = getSingle("jobtype"); if (jobType == null) return -1; if (jobType.equalsIgnoreCase("single")) { return JOBTYPE_SINGLE; } else if (jobType.equalsIgnoreCase("multiple")) { return JOBTYPE_MULTIPLE; } else if (jobType.equalsIgnoreCase("mpi")) { return JOBTYPE_M...
[ "public", "int", "getJobType", "(", ")", "{", "String", "jobType", "=", "getSingle", "(", "\"jobtype\"", ")", ";", "if", "(", "jobType", "==", "null", ")", "return", "-", "1", ";", "if", "(", "jobType", ".", "equalsIgnoreCase", "(", "\"single\"", ")", ...
Returns type of the job. @return job type. -1 if not set or job type is unknown.
[ "Returns", "type", "of", "the", "job", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/gram/GramAttributes.java#L259-L273
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java
GridMap.load
public boolean load(File file) throws IOException { InputStream in = null; try { in = new FileInputStream(file); this.file = file; this.lastModified = file.lastModified(); return load(in); } finally { if (in != null) { ...
java
public boolean load(File file) throws IOException { InputStream in = null; try { in = new FileInputStream(file); this.file = file; this.lastModified = file.lastModified(); return load(in); } finally { if (in != null) { ...
[ "public", "boolean", "load", "(", "File", "file", ")", "throws", "IOException", "{", "InputStream", "in", "=", "null", ";", "try", "{", "in", "=", "new", "FileInputStream", "(", "file", ")", ";", "this", ".", "file", "=", "file", ";", "this", ".", "l...
Loads grid map definition from a given file. @param file the grid map file @exception IOException in case of I/O error or when there are parsing errors in the file (only when errors are not ignored). @return <tt>true</tt> if the file was parsed and loaded successfully. <tt>False</tt> otherwise.
[ "Loads", "grid", "map", "definition", "from", "a", "given", "file", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java#L136-L149
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java
GridMap.load
public boolean load(InputStream input) throws IOException { boolean success = true; BufferedReader reader = new BufferedReader(new InputStreamReader(input)); Map localMap = new HashMap(); GridMapEntry entry; QuotedStringTokenizer tokenizer; StringTok...
java
public boolean load(InputStream input) throws IOException { boolean success = true; BufferedReader reader = new BufferedReader(new InputStreamReader(input)); Map localMap = new HashMap(); GridMapEntry entry; QuotedStringTokenizer tokenizer; StringTok...
[ "public", "boolean", "load", "(", "InputStream", "input", ")", "throws", "IOException", "{", "boolean", "success", "=", "true", ";", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "input", ")", ")", ";", "Map", ...
Loads grid map file definition from a given input stream. The input stream is not closed in case of an error. @param input the input stream that contains the gridmap definitions. @exception IOException in case of I/O error or when there are parsing errors in the input (only when errors are not ignored). @return <tt>tr...
[ "Loads", "grid", "map", "file", "definition", "from", "a", "given", "input", "stream", ".", "The", "input", "stream", "is", "not", "closed", "in", "case", "of", "an", "error", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java#L186-L258
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java
GridMap.getUserID
public String getUserID(String globusID) { String [] ids = getUserIDs(globusID); if (ids != null && ids.length > 0) { return ids[0]; } else { return null; } }
java
public String getUserID(String globusID) { String [] ids = getUserIDs(globusID); if (ids != null && ids.length > 0) { return ids[0]; } else { return null; } }
[ "public", "String", "getUserID", "(", "String", "globusID", ")", "{", "String", "[", "]", "ids", "=", "getUserIDs", "(", "globusID", ")", ";", "if", "(", "ids", "!=", "null", "&&", "ids", ".", "length", ">", "0", ")", "{", "return", "ids", "[", "0"...
Returns first local user name mapped to the specified globusID. @param globusID globusID @return local user name for the specified globusID. Null if the globusID is not mapped to a local user name.
[ "Returns", "first", "local", "user", "name", "mapped", "to", "the", "specified", "globusID", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java#L269-L276
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java
GridMap.getUserIDs
public String[] getUserIDs(String globusID) { if (globusID == null) { throw new IllegalArgumentException(i18n .getMessage("globusIdNull")); } if (this.map == null) { return null; } GridMapEntry entry = (Grid...
java
public String[] getUserIDs(String globusID) { if (globusID == null) { throw new IllegalArgumentException(i18n .getMessage("globusIdNull")); } if (this.map == null) { return null; } GridMapEntry entry = (Grid...
[ "public", "String", "[", "]", "getUserIDs", "(", "String", "globusID", ")", "{", "if", "(", "globusID", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "i18n", ".", "getMessage", "(", "\"globusIdNull\"", ")", ")", ";", "}", "if", ...
Returns local user names mapped to the specified globusID. @param globusID globusID @return array of local user names for the specified globusID. Null if the globusID is not mapped to any local user name.
[ "Returns", "local", "user", "names", "mapped", "to", "the", "specified", "globusID", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java#L287-L299
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java
GridMap.checkUser
public boolean checkUser(String globusID, String userID) { if (globusID == null) { throw new IllegalArgumentException(i18n.getMessage("glousIdNull")); } if (userID == null) { throw new IllegalArgumentException(i18n.getMessage("userIdNull")); } if (this.ma...
java
public boolean checkUser(String globusID, String userID) { if (globusID == null) { throw new IllegalArgumentException(i18n.getMessage("glousIdNull")); } if (userID == null) { throw new IllegalArgumentException(i18n.getMessage("userIdNull")); } if (this.ma...
[ "public", "boolean", "checkUser", "(", "String", "globusID", ",", "String", "userID", ")", "{", "if", "(", "globusID", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "i18n", ".", "getMessage", "(", "\"glousIdNull\"", ")", ")", ";", ...
Checks if a given globus ID is associated with given local user account. @param globusID globus ID @param userID userID @return true if globus ID is associated with given local user account, false, otherwise.
[ "Checks", "if", "a", "given", "globus", "ID", "is", "associated", "with", "given", "local", "user", "account", "." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java#L310-L324
train
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/gridmap/GridMap.java
GridMap.getGlobusID
public String getGlobusID(String userID) { if (userID == null) { throw new IllegalArgumentException(i18n.getMessage("userIdNull")); } if (this.map == null) { return null; } Iterator iter = this.map.entrySet().iterator(); Map.Entry mapEntry; ...
java
public String getGlobusID(String userID) { if (userID == null) { throw new IllegalArgumentException(i18n.getMessage("userIdNull")); } if (this.map == null) { return null; } Iterator iter = this.map.entrySet().iterator(); Map.Entry mapEntry; ...
[ "public", "String", "getGlobusID", "(", "String", "userID", ")", "{", "if", "(", "userID", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "i18n", ".", "getMessage", "(", "\"userIdNull\"", ")", ")", ";", "}", "if", "(", "this", "...
Returns globus ID associated with the specified local user name. @param userID local user name @return associated globus ID, null if there is not any.
[ "Returns", "globus", "ID", "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#L334-L354
train