|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.eclipse.http.ServerAPI
public class ServerAPI
This class provides a REST based interface to IBM Tivoli Directory Integrator's server api as well as a few other services the server api currently does not provide. Validation is performed by the local server api (e.g. APIEngine.getLocalSession()) and any username/passwords passed in the request is forwarded to the local server api.
The HTTPServerConnector is used to handle connections. All commands are delegated to a java class named after the command. A command of "status" will result in attempt to instantiate "com.ibm.di.eclipse.http.commands.StatusCommand". If no such class exists an attempt is made to execute a script
This class is not intended to be used by other clients than the IBM Tivoli Directory Integrator configuration editor. It's functions and services are considered internal use only.
Field Summary | |
---|---|
static int |
PORT
|
static java.lang.String |
PROP_REST_ON
|
static java.lang.String |
PROP_REST_PORT
|
static java.lang.String |
PROP_REST_SSL
|
Constructor Summary | |
---|---|
ServerAPI()
Initializes this object with the default port (1098) |
|
ServerAPI(HTTPServerConnector conn)
Initializes this object with an established connection. |
|
ServerAPI(int port,
boolean ssl)
Initializes this object with the provided port number. |
Method Summary | |
---|---|
void |
addPendingCommand(java.lang.String url,
RestCommand obj)
Adds a command to be retrieved by a subsequent URL request. |
void |
debugMsg(java.lang.String string)
|
HTTPServerConnector |
getConn()
|
RestCommand |
getPendingCommand(java.lang.String name)
This method returns a pending RestCommand. |
Entry |
getRequest()
|
Session |
getSession()
|
boolean |
isDebugOn()
Returns true if debug level logging is enabled |
void |
logmsg(java.lang.String string)
|
void |
run()
|
java.lang.Thread |
start()
Creates a thread to run this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROP_REST_ON
public static final java.lang.String PROP_REST_PORT
public static final java.lang.String PROP_REST_SSL
public static final int PORT
Constructor Detail |
---|
public ServerAPI() throws java.lang.Exception
java.lang.Exception
public ServerAPI(int port, boolean ssl) throws java.lang.Exception
port
- The TCP port number for incoming connections
java.lang.Exception
public ServerAPI(HTTPServerConnector conn) throws java.lang.Exception
conn
- HTTPServerConnector instance
java.lang.Exception
Method Detail |
---|
public java.lang.Thread start()
public void run()
run
in interface java.lang.Runnable
public void logmsg(java.lang.String string)
public void debugMsg(java.lang.String string)
public HTTPServerConnector getConn()
public Session getSession()
public Entry getRequest()
public void addPendingCommand(java.lang.String url, RestCommand obj)
url
- The name of the commandobj
- The value for the commandpublic RestCommand getPendingCommand(java.lang.String name)
name
- The name of the command to retrieve and remove.
public boolean isDebugOn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |