|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.larsan.urd.impl.UrdServer
This is the main Urd server class. This class does not do any preparations to its execution but asumes that all needed objects will be available in the Urd JNDI context.
The context must be prepared by this class environment. In particular this server will search the context for the following objects:
/urd/classloader/shared (shared services class loader)
/urd/threads (the framework thread pool)
All of the above objects must be available before this server can start. And should
any of them be missing the execution will immediately halt. The server will also look
for the following objects, but will use default values if they are not found:
/urd/handler (current error handler; default: stderr)
/urd/classloader/system (system framework class loader; default: current class loader)
/urd/classloader/service (service root classloader; default: parent class loader)
The command line server takes its default values (such as address and port) from the preference
object from the JNDI context ('/urd/pref').
| Constructor Summary | |
UrdServer()
Create server |
|
| Method Summary | |
void |
addServerListener(UrdServerListener list)
Add listener to this server. |
protected void |
cleanup()
Cleanup resources |
java.lang.Thread[] |
dumpThreads()
Print all threads |
Registry |
getRegistry()
Get the service registry. |
protected boolean |
getRunFlag()
Get internal thread flag |
ListInfo |
info(java.lang.String url)
List service info |
void |
kill()
Kill the server |
ListInfo[] |
list()
List all services |
void |
removeServerListener(UrdServerListener list)
Remive listener from this server |
void |
run()
Run server |
protected void |
setRunFlag(boolean runFlag)
Set internal thread flag |
void |
shutdown(long millis)
Shutdown server. |
void |
startService(java.lang.String service)
Start service command |
void |
stopService(java.lang.String service)
Stop service command |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UrdServer()
| Method Detail |
public void run()
run in interface java.lang.Runnablepublic Registry getRegistry()
public void addServerListener(UrdServerListener list)
public void removeServerListener(UrdServerListener list)
public void kill()
protected void cleanup()
public void shutdown(long millis)
millis - Millisecond timeout for shutdown eventprotected boolean getRunFlag()
protected void setRunFlag(boolean runFlag)
public java.lang.Thread[] dumpThreads()
public ListInfo info(java.lang.String url)
throws NoSuchServiceException
NoSuchServiceExceptionpublic ListInfo[] list()
public void startService(java.lang.String service)
throws NoSuchServiceException
NoSuchServiceException
public void stopService(java.lang.String service)
throws NoSuchServiceException
NoSuchServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||