|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.globus.net.BaseServer
public abstract class BaseServer
This class provides the basics for writing various servers.
Note: Sockets created by this server have a 5 minute default timeout.
The timeout can be changed using the setTimeout()
function.
Field Summary | |
---|---|
protected java.net.ServerSocket |
_server
|
protected boolean |
accept
|
protected org.globus.gsi.gssapi.auth.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 Summary | |
---|---|
BaseServer()
|
|
BaseServer(boolean secure,
int port)
|
|
BaseServer(org.ietf.jgss.GSSCredential cred,
int port)
|
|
BaseServer(int port)
|
Method Summary | |
---|---|
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(org.globus.gsi.gssapi.auth.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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 org.globus.gsi.gssapi.auth.Authorization authorization
protected java.lang.Integer gssMode
protected int timeout
protected org.globus.net.AbstractServerDeactivator deactivator
Constructor Detail |
---|
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
Method Detail |
---|
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(org.globus.gsi.gssapi.auth.Authorization auth)
protected abstract void handleConnection(java.net.Socket socket)
public void registerDefaultDeactivator()
public void unregisterDefaultDeactivator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |