public class GassServer extends BaseServer
GassServer
class acts as a basic multi-threaded HTTPS
server that handles GASS requests.Modifier and Type | Field and Description |
---|---|
static int |
CLIENT_SHUTDOWN_ENABLE |
static int |
READ_ENABLE |
static String |
SHUTDOWN_STR |
static int |
STDERR_ENABLE |
static int |
STDOUT_ENABLE |
static int |
WRITE_ENABLE |
_server, accept, authorization, credentials, deactivator, gssMode, SO_TIMEOUT, timeout, url
Constructor and Description |
---|
GassServer()
Starts Gass Server with default user credentials.
|
GassServer(boolean secure,
int port)
Starts Gass Server on given port and mode.
|
GassServer(GSSCredential cred,
int port)
Starts Gass Server on given port and given credentials.
|
GassServer(int port)
Starts Gass Server on given port with default user credentials.
|
Modifier and Type | Method and Description |
---|---|
protected OutputStream |
getJobOutputStream(String id) |
int |
getOptions()
Returns current options of the server.
|
protected void |
handleConnection(Socket socket)
This method needs to be implemented by subclasses.
|
void |
registerJobOutputStream(String lb,
OutputStream out)
Registers a output stream with a job.
|
void |
setOptions(int options)
Sets the options of the gass server such
as enabling client shutdown, etc.
|
static void |
shutdown(GSSCredential cred,
GlobusURL gassURL)
Shutdowns a remote gass server.
|
String |
toString() |
void |
unregisterJobOutputStream(String lb)
Unregisters a job output stream for specified output label.
|
void |
unregisterJobOutputStream(String lb,
OutputStream out)
Unregisters a job output stream.
|
getCredentials, getHost, getHostname, getPort, getProtocol, getTimeout, getURL, initialize, registerDefaultDeactivator, run, setAuthorization, setGssMode, setTimeout, shutdown, start, unregisterDefaultDeactivator, wrapSocket
public static final int READ_ENABLE
public static final int WRITE_ENABLE
public static final int STDOUT_ENABLE
public static final int STDERR_ENABLE
public static final int CLIENT_SHUTDOWN_ENABLE
public static final String SHUTDOWN_STR
public GassServer() throws IOException
IOException
public GassServer(int port) throws IOException
port
- port of the server, if 0 it will be dynamically assignedIOException
public GassServer(GSSCredential cred, int port) throws IOException
cred
- credentials to use. if null default user credentials
will be usedport
- port of the server, if 0 it will be dynamically assignedIOException
public GassServer(boolean secure, int port) throws IOException
secure
- if true starts server in secure mode, otherwise unsecureport
- port of the server, if 0 it will be dynamically assignedIOException
public void setOptions(int options)
options
- server optionspublic int getOptions()
public void registerJobOutputStream(String lb, OutputStream out)
lb
- job label as described above.out
- the output stream to redirect output to.public void unregisterJobOutputStream(String lb)
lb
- job output label.public void unregisterJobOutputStream(String lb, OutputStream out)
protected OutputStream getJobOutputStream(String id)
protected void handleConnection(Socket socket)
BaseServer
handleConnection
in class BaseServer
public static void shutdown(GSSCredential cred, GlobusURL gassURL) throws IOException, GSSException
cred
- credentials to use.gassURL
- the url of the remote gass server.IOException
GSSException
Copyright © 2016. All rights reserved.