public interface ServerManager
| Modifier and Type | Method and Description |
|---|---|
void |
channel_reaper()
This fuction runs in a separate thread and cleans up
any channels which are not used for a long time.
|
AdapterManager |
create_adapter_manager()
Create an adapter manager.
|
byte[] |
create_cacheable_object_key(boolean use_suid,
byte[][] parts)
This function is used by adapters to generate a key which will
participate in adapter lookup short-circuiting.
|
void |
enqueue_request(ServerRequest request)
Begin dispatch sequence for incoming request.
|
byte[][] |
extract_cacheable_object_key(byte[] object_key)
Extract the component parts of a cacheable object_key.
|
ObjectAdapter |
find_adapter(byte[] object_key)
This function finds an adapter for the specified object id.
|
java.lang.Object[] |
get_protocol_ids()
Return the array of registered protocols.
|
boolean |
is_cacheable_object_key(byte[] object_key)
Returns true if the given object_key can be used in the cache.
|
boolean |
is_local_cacheable_object_key(byte[] object_key)
Returns true if the given object_key is cacheable and was
created by this server.
|
boolean |
is_suid_object_key(byte[] object_key)
Returns true if the given object key has a persistent target.
|
org.omg.CORBA.ORB |
orb() |
void |
protocol_listening(ServerProtocol protocol)
This is called when a server protocol begins listening.
|
void |
protocol_not_listening(ServerProtocol protocol,
boolean paused)
This is called when a server protocol is no longer listening.
|
void |
register_adapter(byte[] aid,
ObjectAdapter adapter)
Register an adapter.
|
void |
register_channel(ServerChannel channel)
This operation occours when a protocol accepts a new incoming channel.
|
void |
register_protocol(int profile_tag,
ServerProtocol protocol)
Register a server protocol.
|
boolean |
serve_request(boolean wait)
This is called from orb.perform_work, it serves a single request.
|
void |
setMaxManagerHeldRequests(int maxManagerHeldRequests)
Maximum number of requests which may be held by an adapter in the
HOLDING state.
|
void |
setMaxQueueSize(int maxQueueSize)
Set maximum queue size.
|
void |
setThreadPoolLimits(int min,
int max)
Set thread pool size ranges.
|
void |
shutdown(boolean wait_for_complete)
Shutdown the server side.
|
void |
startup(boolean block,
boolean allowPool)
Start up the server.
|
void |
unregister_adapter(byte[] aid)
Unregister an adapter.
|
void |
unregister_channel(ServerChannel channel)
Called when a channel enters the closed state.
|
boolean |
work_pending()
Returns true if there are requests waiting in the incomming request
queue for resources.
|
org.omg.CORBA.ORB orb()
void setThreadPoolLimits(int min,
int max)
min - minimum size for thread pool. Must be greater than 0 and less
than max.max - maximum thread pool size. If this is 0 then requests will
only be processed when the orb.perform_work function is called. Must
be greater than 0.void setMaxQueueSize(int maxQueueSize)
maxQueueSize - maximum queue size. Must be greater than 1. Values
should be several times the maximum thread pool size.void setMaxManagerHeldRequests(int maxManagerHeldRequests)
maxManagerHeldRequests - ceiling on adapter held requests.
Individial adapter managers may modify this value downwards. Use 0 to
dissallow the adapter holding state, and Integer.MAX_VALUE for
no limit.byte[] create_cacheable_object_key(boolean use_suid,
byte[][] parts)
byte[][] extract_cacheable_object_key(byte[] object_key)
boolean is_cacheable_object_key(byte[] object_key)
boolean is_suid_object_key(byte[] object_key)
boolean is_local_cacheable_object_key(byte[] object_key)
void register_protocol(int profile_tag,
ServerProtocol protocol)
profile_tag - Profile tag of IOR consturcted with the protocol.protocol - The server protocol.java.lang.Object[] get_protocol_ids()
void protocol_listening(ServerProtocol protocol)
protocol - The server protocol.void protocol_not_listening(ServerProtocol protocol, boolean paused)
protocol - The server protocol.paused - If true when the server side is shut down close will still
be called on the protocol.void register_channel(ServerChannel channel)
void unregister_channel(ServerChannel channel)
void channel_reaper()
ObjectAdapter find_adapter(byte[] object_key)
void register_adapter(byte[] aid,
ObjectAdapter adapter)
void unregister_adapter(byte[] aid)
AdapterManager create_adapter_manager()
void enqueue_request(ServerRequest request)
boolean work_pending()
boolean serve_request(boolean wait)
void startup(boolean block,
boolean allowPool)
block - true if this funtion should not return until
the server is shut down.allowPool - true if the thread pool is allowed. Once a call
the thread pool has been started it cannot be dissallowed
in the future by calling this with a false.void shutdown(boolean wait_for_complete)
wait_for_complete - If true wait until all channels have closed
and incomming requests have finished processing. If false all
active requests will be canceled and the function will return once
connections have shutdown.