Interface horb.orb.HORBAgent
All Packages Class Hierarchy This Package Previous Next Index
Interface horb.orb.HORBAgent
- public interface HORBAgent
- extends Object
HORB management agent.
This object can be used either from server side objects or from
management clients. There are three categories, HORB Server management,
HORB object mangement, and HORB thread management in this management
agent.
- HORB server - One for each port. It Accepts a connection from a client,
then binds the client to a HORB thread of a desired HORB object.
- HORB object - A HORB object (aka. a remote object) can have
multiple HORB threads.
- HORB thread - A HORB thread corresponds to a client. A client
calls methods repeatedly in the context of a HORB thread.
Pay attention to security. It is strongly recommended to set up ACL
for HORBAgent.
-
getClientHostName_Local()
- returns hostname of the client for this HORB thread.
-
getClientInetAddress_Local()
- returns IP address of the client for this HORB thread.
-
getClientNetAddress_Local()
- returns network address of the client for this HORB thread.
-
getObjectID()
- returns objectID of the current thread.
-
getObjectStatus()
- returns status of HORB objects.
-
getObjectStatus(String)
- returns status of a specific HORB object.
-
getPriorityHORBThread(String)
- get priority of a HORB thread.
-
getServerStatus()
- returns status of all HORB servers.
-
getServerStatus(int)
- returns status of a HORB server serving the port.
-
getThreadStatus()
- returns status of threads of all HORB object.
-
getThreadStatus(String)
- returns status of threads of a HORB object.
-
isHORBServerDebugging()
- returns debugging flag of the HORB server for the current thread.
-
isHORBServerDebugging(int)
- returns debugging flag of the HORB server for the port.
-
resumeHORBThread(String)
- resume a HORB thread.
-
resumeObject(String)
- resume acception of connections to an object.
-
setHORBServerDebug(boolean)
- set debug switch of the HORB server for the current thread.
-
setHORBServerDebug(int, boolean)
- set debug switch of the HORB server for the port.
-
setPriorityHORBThread(String, int)
- set priority of a thread.
-
stopHORBServer()
- terminate the HORB server that launched the current thread.
-
stopHORBServer(int)
- terminate the HORB server for the port.
-
stopHORBThread(String)
- terminate a HORB thread.
-
stopObject(String)
- stop acceptance of connect requests to an object.
-
suspendHORBThread(String)
- suspend a HORB thread.
-
terminateHORB(int)
- terminate the HORB process.
-
unRegisterObject(String)
- unregister a HORB object registered by registerObject().
getServerStatus
public abstract ServerStatus[] getServerStatus() throws HORBException
- returns status of all HORB servers.
getServerStatus
public abstract ServerStatus getServerStatus(int port) throws HORBException
- returns status of a HORB server serving the port. null if no server
is active for the port.
- Parameters:
- port - server port
isHORBServerDebugging
public abstract boolean isHORBServerDebugging() throws HORBException
- returns debugging flag of the HORB server for the current thread.
isHORBServerDebugging
public abstract boolean isHORBServerDebugging(int port) throws HORBException
- returns debugging flag of the HORB server for the port.
- Parameters:
- port - server port.
setHORBServerDebug
public abstract void setHORBServerDebug(boolean sw) throws HORBException
- set debug switch of the HORB server for the current thread. If this
switch is on, all threads launced from the HORB server prints stack
dump when an uncaught exception occures. This switch can also be
turned on by 'horb -v' option.
- Parameters:
- sw - true or false
setHORBServerDebug
public abstract void setHORBServerDebug(int port,
boolean sw) throws HORBException
- set debug switch of the HORB server for the port. If this
switch is on, all threads launced from the HORB server prints stack
dump when an uncaught exception occures. This switch can also be
turned on by 'horb -v' option.
- Parameters:
- port - server port.
- sw - true or false
stopHORBServer
public abstract void stopHORBServer() throws HORBException
- terminate the HORB server that launched the current thread.
stopHORBServer
public abstract void stopHORBServer(int port) throws HORBException
- terminate the HORB server for the port.
- Parameters:
- port - server port.
terminateHORB
public abstract void terminateHORB(int exitCode) throws HORBException
- terminate the HORB process.
- Parameters:
- exitCode - this HORB process exit with exit code.
getObjectStatus
public abstract ObjectStatus[] getObjectStatus() throws HORBException
- returns status of HORB objects.
getObjectStatus
public abstract ObjectStatus getObjectStatus(String objectID) throws HORBException
- returns status of a specific HORB object.
unRegisterObject
public abstract void unRegisterObject(String objectID) throws NoObjectException, HORBException
- unregister a HORB object registered by registerObject().
- Parameters:
- objectID - object ID of the object to be unregistered.
- Throws: NoObjectException
- no such object found
stopObject
public abstract void stopObject(String objectID) throws HORBException
- stop acceptance of connect requests to an object. If one tries
to connect the object, the request will fail.
- Parameters:
- objectID - object ID to be stopped.
resumeObject
public abstract void resumeObject(String objectID) throws HORBException
- resume acception of connections to an object.
- Parameters:
- objectID - object ID to be resumed.
getObjectID
public abstract String getObjectID() throws HORBException
- returns objectID of the current thread.
Since one daemon object can have multiple threads for
requests, several threads can have the same object name.
This method intends to be used from a server object (HORB object).
At the client side, you can obtain the objectID of a remote object
from the proxy object, by using _getObjectURL().
How to get objectID at client side:
Foo_Proxy remote = new Foo_Proxy(horbURL);
HorbURL url = remote._getObjectURL();
String objectID = url.getObjectID();
How to get objectID at server side:
HORBAgent agent = new HORBAgent_Impl();
String objectID = agent.objectID();
- Throws: HORBException
- if the current thread is not a HORB thread.
getClientNetAddress_Local
public abstract byte[] getClientNetAddress_Local() throws HORBException
- returns network address of the client for this HORB thread.
This method intends to be used at server side. So, this does not make
sense when this is called remotely.
- Throws: HORBException
- if the current thread is not a HORB thread.
getClientInetAddress_Local
public abstract InetAddress getClientInetAddress_Local() throws HORBException
- returns IP address of the client for this HORB thread.
This method intends to be used at server side. So, this does not make
sense when this is called remotely.
- Throws: HORBException
- if the current thread is not a HORB thread.
getClientHostName_Local
public abstract String getClientHostName_Local() throws HORBException
- returns hostname of the client for this HORB thread.
If hostname lookup fails, this method returns null.
This method intends to be used at server side. So, this does not make
sense when this is called remotely.
- Throws: HORBException
- if the current thread is not a HORB thread.
stopHORBThread
public abstract void stopHORBThread(String threadName) throws HORBException
- terminate a HORB thread.
- Parameters:
- threadName - HORB thread to be terminated.
suspendHORBThread
public abstract void suspendHORBThread(String threadName) throws HORBException
- suspend a HORB thread.
- Parameters:
- threadName - HORB thread to be suspended.
resumeHORBThread
public abstract void resumeHORBThread(String threadName) throws HORBException
- resume a HORB thread.
- Parameters:
- threadName - HORB thread to be resumed.
setPriorityHORBThread
public abstract void setPriorityHORBThread(String threadName,
int newPriority) throws IllegalArgumentException, HORBException
- set priority of a thread.
- Parameters:
- newPriority - new priority. Value should be within the range
Thread.MIN_PRIORTY, Thread.MAX_PRIORITY.
getPriorityHORBThread
public abstract void getPriorityHORBThread(String threadName) throws HORBException
- get priority of a HORB thread.
getThreadStatus
public abstract ThreadStatus[] getThreadStatus() throws HORBException
- returns status of threads of all HORB object.
getThreadStatus
public abstract ThreadStatus[] getThreadStatus(String objectID) throws HORBException
- returns status of threads of a HORB object.
- Parameters:
- objectID - return threads' status concerning to objectID.
All Packages Class Hierarchy This Package Previous Next Index