|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.presents.server.PresentsServer
public class PresentsServer
The presents server provides a central point of access to the various facilities that make up
the presents framework. To facilitate extension and customization, a single instance of the
presents server should be created and initialized in a process. To facilitate easy access to the
services provided by the presents server, static references to the various managers are made
available in the PresentsServer class. These will be configured when the singleton
instance is initialized.
| Nested Class Summary | |
|---|---|
static class |
PresentsServer.PresentsModule
Configures dependencies needed by the Presents services. |
static class |
PresentsServer.PresentsServerModule
Binds PresentsServer to a particular class. |
| Field Summary | |
|---|---|
protected Invoker |
_authInvoker
Used to invoke authentication tasks. |
protected ClientManager |
_clmgr
The manager of clients. |
protected PresentsConnectionManager |
_conmgr
The manager of network connections. |
protected DatagramChannelReader |
_datagramReader
|
protected InvocationManager |
_invmgr
The manager of invocation services. |
protected Invoker |
_invoker
Used to invoke background tasks that should not be allowed to tie up the distributed object manager thread (generally talking to databases and other relatively slow entities). |
protected Lifecycle |
_lifecycle
Handles orderly initialization and shutdown of our managers, etc. |
protected PresentsDObjectMgr |
_omgr
The manager of distributed objects. |
protected ServerSocketChannelAcceptor |
_socketAcceptor
|
static InvocationManager |
invmgr
Deprecated. |
static PresentsDObjectMgr |
omgr
Deprecated. |
| Constructor Summary | |
|---|---|
PresentsServer()
|
|
| Method Summary | |
|---|---|
protected AccessController |
createDefaultObjectAccessController()
Defines the default object access policy for all DObject instances. |
protected ServerSocketChannelAcceptor |
createSocketAcceptor()
|
protected String |
getBindHostname()
Returns the hostname on which the connection manager will listen for TCP traffic, or null to bind to the wildcard address. |
protected String |
getDatagramHostname()
Returns the hostname on which the connection will listen for datagram traffic, or null to bind to the wildcard address. |
protected int[] |
getDatagramPorts()
Returns the ports on which the connection manager will listen for datagrams or an empty array if no datagrams are desired. |
protected int[] |
getListenPorts()
Returns the port on which the connection manager will listen for client connections or an empty array to skip binding and have an external entity transfer accepted sockets into the connection manager. |
void |
init(com.google.inject.Injector injector)
Initializes all of the server services and prepares for operation. |
protected void |
invokerDidShutdown()
Called once the invoker and distributed object manager have both completed processing all remaining events and are fully shutdown. |
static void |
main(String[] args)
The default entry point for the server. |
protected void |
openToThePublic()
Opens the server for connections after the event thread is running and all the invokers are clear after starting up. |
void |
queueShutdown()
Queues up a request to shutdown on the event thread. |
protected void |
registerSignalHandlers(com.google.inject.Injector injector)
|
void |
run()
Starts up all of the server services and enters the main server event loop. |
static void |
runServer(com.google.inject.Module... modules)
Inits and runs the PresentsServer bound in the given modules. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public static PresentsDObjectMgr omgr
PlaceManager._omgr.
@Deprecated public static InvocationManager invmgr
PlaceManager._invmgr.
protected ServerSocketChannelAcceptor _socketAcceptor
protected DatagramChannelReader _datagramReader
@Inject protected PresentsDObjectMgr _omgr
@Inject protected PresentsConnectionManager _conmgr
@Inject protected ClientManager _clmgr
@Inject protected InvocationManager _invmgr
@Inject protected Lifecycle _lifecycle
@Inject protected Invoker _invoker
@Inject protected Invoker _authInvoker
| Constructor Detail |
|---|
public PresentsServer()
| Method Detail |
|---|
public static void runServer(com.google.inject.Module... modules)
public static void main(String[] args)
public void init(com.google.inject.Injector injector)
throws Exception
Exceptionprotected void registerSignalHandlers(com.google.inject.Injector injector)
protected ServerSocketChannelAcceptor createSocketAcceptor()
public void run()
protected void openToThePublic()
public void queueShutdown()
protected AccessController createDefaultObjectAccessController()
DObject instances. The default
default policy is to allow all subscribers but reject all modifications by the client.
protected String getBindHostname()
null to bind to the wildcard address.
protected String getDatagramHostname()
null to bind to the wildcard address.
protected int[] getListenPorts()
protected int[] getDatagramPorts()
protected void invokerDidShutdown()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||