org.apache.geronimo.remoting.transport.async.bio
Class BlockingServer
java.lang.Object
org.apache.geronimo.proxy.SimpleComponent
org.apache.geronimo.proxy.SimpleContainer
org.apache.geronimo.remoting.transport.async.AbstractServer
org.apache.geronimo.remoting.transport.async.bio.BlockingServer
- All Implemented Interfaces:
- org.apache.geronimo.core.service.Component, org.apache.geronimo.core.service.Container, Runnable, Serializable, TransportServer
- public final class BlockingServer
- extends AbstractServer
- implements Runnable
Provides a Blocking implemenation of the AsynchChannelServer interface.
Sets up a blocking ServerSocket to accept blocking client connections.
- Version:
- $Revision: 1.3 $ $Date: 2004/03/10 09:59:20 $
- See Also:
- Serialized Form
Method Summary |
void |
bind(URI localURI,
Router dispatcher)
Configures and otatains any resources needed to
start accepting client requests. |
void |
dispose()
Rleases all resources that were obtained during the life of
the server. |
URI |
getClientConnectURI()
Once the bind() call has been done, this method will
return a URI that can be used by a client to connect
to the server. |
Router |
getNextRouter()
|
void |
run()
|
void |
start()
Enables the server to start accepting new client requests. |
void |
stop()
Stops the server from accepting new client requests. |
Methods inherited from class org.apache.geronimo.proxy.SimpleContainer |
addComponent, getComponents, removeComponent |
Methods inherited from class org.apache.geronimo.proxy.SimpleComponent |
getContainer, getObjectName, setContainer, setObjectName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.geronimo.core.service.Component |
getContainer, setContainer |
BlockingServer
public BlockingServer()
bind
public void bind(URI localURI,
Router dispatcher)
throws IOException,
URISyntaxException
- Description copied from interface:
TransportServer
- Configures and otatains any resources needed to
start accepting client requests. The bindURI argument
will configure the interface/port etc. that the server
will use to service requests.
The sever should pass all requests and datagrams to the
dispatcher.
- Specified by:
bind
in interface TransportServer
- Parameters:
localURI
-
- Throws:
IOException
URISyntaxException
start
public void start()
throws Exception
- Description copied from interface:
TransportServer
- Enables the server to start accepting new client requests.
- Specified by:
start
in interface TransportServer
- Overrides:
start
in class AbstractServer
- Throws:
Exception
- See Also:
TransportServer.start()
stop
public void stop()
throws Exception
- Description copied from interface:
TransportServer
- Stops the server from accepting new client requests.
start() may be called at a later time to start processing
requests again.
- Specified by:
stop
in interface TransportServer
- Overrides:
stop
in class AbstractServer
- Throws:
Exception
- See Also:
TransportServer.stop()
run
public void run()
- Specified by:
run
in interface Runnable
- See Also:
Runnable.run()
getClientConnectURI
public URI getClientConnectURI()
- Description copied from interface:
TransportServer
- Once the bind() call has been done, this method will
return a URI that can be used by a client to connect
to the server.
- Specified by:
getClientConnectURI
in interface TransportServer
- Returns:
- null if server has not been bound.
- See Also:
org.apache.j2ee.remoting.transport.TransportServer#getClientConnectURI()
dispose
public void dispose()
throws Exception
- Description copied from interface:
TransportServer
- Rleases all resources that were obtained during the life of
the server. Once disposed, the sever instance cannot be used
again.
- Specified by:
dispose
in interface TransportServer
- Overrides:
dispose
in class AbstractServer
- Throws:
Exception
- See Also:
org.apache.j2ee.remoting.transport.TransportServer#dispose()
getNextRouter
public Router getNextRouter()
- Specified by:
getNextRouter
in class AbstractServer
- See Also:
AbstractServer.getNextRouter()
Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.