public abstract class BaseServer
extends java.lang.Object
implements java.lang.Runnable
setTimeout()
function.Modifier and Type | Field and Description |
---|---|
protected java.net.ServerSocket |
_server |
protected boolean |
accept |
protected Authorization |
authorization |
protected org.ietf.jgss.GSSCredential |
credentials |
protected org.globus.net.AbstractServerDeactivator |
deactivator
A handler for the deactivation framework.
|
protected java.lang.Integer |
gssMode |
static int |
SO_TIMEOUT
Socket timeout in milliseconds.
|
protected int |
timeout |
protected java.lang.String |
url |
Constructor and Description |
---|
BaseServer() |
BaseServer(boolean secure,
int port) |
BaseServer(org.ietf.jgss.GSSCredential cred,
int port) |
BaseServer(int port) |
Modifier and Type | Method and Description |
---|---|
org.ietf.jgss.GSSCredential |
getCredentials() |
java.lang.String |
getHost()
Returns hostname of this server.
|
java.lang.String |
getHostname()
Returns hostname of this server
|
int |
getPort()
Returns port of this server
|
java.lang.String |
getProtocol() |
int |
getTimeout() |
java.lang.String |
getURL()
Returns url of this server
|
protected abstract void |
handleConnection(java.net.Socket socket)
This method needs to be implemented by subclasses.
|
protected void |
initialize()
This method should be called by all subclasses.
|
void |
registerDefaultDeactivator()
Registers a default deactivation handler.
|
void |
run() |
void |
setAuthorization(Authorization auth) |
void |
setGssMode(java.lang.Integer mode) |
void |
setTimeout(int timeout)
Sets timeout for the created sockets.
|
void |
shutdown()
Stops the server but does
not stop all the client threads
|
protected void |
start()
Starts the server.
|
void |
unregisterDefaultDeactivator()
Unregisters a default deactivation handler.
|
protected java.net.Socket |
wrapSocket(java.net.Socket socket) |
public static final int SO_TIMEOUT
protected boolean accept
protected java.net.ServerSocket _server
protected java.lang.String url
protected org.ietf.jgss.GSSCredential credentials
protected Authorization authorization
protected java.lang.Integer gssMode
protected int timeout
protected org.globus.net.AbstractServerDeactivator deactivator
public BaseServer() throws java.io.IOException
java.io.IOException
public BaseServer(int port) throws java.io.IOException
java.io.IOException
public BaseServer(org.ietf.jgss.GSSCredential cred, int port) throws java.io.IOException
java.io.IOException
public BaseServer(boolean secure, int port) throws java.io.IOException
java.io.IOException
protected void initialize()
protected void start()
public void setTimeout(int timeout)
public int getTimeout()
public void shutdown()
public org.ietf.jgss.GSSCredential getCredentials()
public java.lang.String getProtocol()
public java.lang.String getURL()
public int getPort()
public java.lang.String getHostname()
public java.lang.String getHost()
public void run()
run
in interface java.lang.Runnable
protected java.net.Socket wrapSocket(java.net.Socket socket) throws org.ietf.jgss.GSSException
org.ietf.jgss.GSSException
public void setGssMode(java.lang.Integer mode)
public void setAuthorization(Authorization auth)
protected abstract void handleConnection(java.net.Socket socket)
public void registerDefaultDeactivator()
public void unregisterDefaultDeactivator()
Copyright © 2013. All Rights Reserved.