|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.b2b.server.ServerAPI
public class ServerAPI
Central point of access for internal server functionality. This includes:
Constructor Summary | |
---|---|
ServerAPI()
|
Method Summary | |
---|---|
static boolean |
checkAcl(java.lang.String aclName,
java.lang.String userName)
Returns true if the user belongs to a group that is a member of the specified ACL. |
static ContentHandler |
getContentHandler(java.lang.String content_type)
Returns a new ContentHandler for the specified content type. |
static int |
getCurrentPort()
Returns the port number associated with the current thread of execution. |
static java.lang.String[] |
getEnabledPackages()
Returns an array of String objects representing all enabled packages. |
static LogOutputStream |
getLogStream(java.lang.String logfile)
Opens a log file in the server's default logs directory. |
static java.io.File |
getPackageConfigDir(java.lang.String pkgname)
Returns a File object representing the path name for the given package's configuration directory. |
static java.lang.String[] |
getPackages()
Returns an array of String objects representing all packages. |
static java.io.File |
getServerConfigDir()
Returns a File object for the server's config directory. |
static java.lang.String |
getServerName()
Returns the server's host name. |
static void |
logError(java.lang.Throwable t)
Logs the specified error to the server's default log file. |
static void |
logError(Values v)
Logs the specified error to the server's default log file. |
static void |
registerContentHandler(java.lang.String content_type,
ContentHandlerFactory factory)
Registers a new content-type with the server. |
static void |
registerFlowService(java.lang.String pkgname,
NSName svcname,
FlowRoot root,
NSSignature sig)
Registers a Flow service. |
static void |
registerFlowService(java.lang.String pkgname,
NSName svcname,
FlowRoot root,
NSSignature sig,
Values vals)
Registers a Flow service. |
static void |
registerService(java.lang.String pkgname,
NSName svcname,
boolean validate,
int type,
java.lang.String classname,
java.lang.String methodname,
Values vals)
Registers a service. |
static void |
removeContentHandler(java.lang.String content_type)
Deregisters a content type from the server. |
static void |
sendMail(java.lang.String to,
java.lang.String from,
java.lang.String subject,
java.lang.String body)
Sends an e-mail message to the specified recipient. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerAPI()
Method Detail |
---|
public static void registerContentHandler(java.lang.String content_type, ContentHandlerFactory factory)
content_type
- A String specifying the new MIME content type to be supported (for example, "text/xml").factory
- A ContentHandlerFactory that will process requests for the new MIME type.ContentHandler
,
ContentHandlerFactory
public static void removeContentHandler(java.lang.String content_type)
content_type
- A String specifying the MIME content type to deregistered.public static ContentHandler getContentHandler(java.lang.String content_type)
content_type
- A String specifying a MIME content-type.
public static void logError(java.lang.Throwable t)
t
- A Throwable object specifying the error to be logged.logError(Values)
,
Service.throwError(java.lang.Throwable)
public static void logError(Values v)
v
- A Values object specifying the error to be logged.logError(Throwable)
,
Service.throwError(java.lang.Throwable)
public static LogOutputStream getLogStream(java.lang.String logfile)
logfile
- A String specifying the name of the new log file.
public static void sendMail(java.lang.String to, java.lang.String from, java.lang.String subject, java.lang.String body)
to
- A String specifying the recipient of the message.from
- A String specifying the return address.subject
- A String specifying the subject line of the message.body
- A String specifying the body of the message.public static java.io.File getServerConfigDir()
SERVERHOME/config
directory.public static java.io.File getPackageConfigDir(java.lang.String pkgname)
pkgname
- A String specifying the name of the package whose configuration directory is desired.
public static java.lang.String[] getPackages()
public static java.lang.String[] getEnabledPackages()
public static void registerFlowService(java.lang.String pkgname, NSName svcname, FlowRoot root, NSSignature sig) throws ServiceSetupException
pkgname
- A String specifying the package in which the service will reside.svcname
- A NSName specifying the service to be registered.root
- A FlowRoot object specifying the Flow in which the service will be placed.sig
- A NSSignature specifying the signature of the service.
ServiceSetupException
- If an error occurs while registering the Flow service.public static void registerFlowService(java.lang.String pkgname, NSName svcname, FlowRoot root, NSSignature sig, Values vals) throws ServiceSetupException
pkgname
- A String specifying the package in which the service will reside.svcname
- A NSName specifying the service to be registered.root
- A FlowRoot object specifying the Flow in which the service will be placed.sig
- A NSSignature specifying the signature of the service.vals
- A Values object (information from namespace node definition file)
ServiceSetupException
- If there is an error registering the Flow service.public static void registerService(java.lang.String pkgname, NSName svcname, boolean validate, int type, java.lang.String classname, java.lang.String methodname, Values vals) throws ServiceSetupException
pkgname
- A String specifying the package.svcname
- A NSName specifying the service name.validate
- A boolean value (true: attempt to load service)type
- An int value specifying the type of the service (from NSService).classname
- A String (if Java service), null otherwise.methodname
- A String (if Java service), null otherwise.vals
- A Values object (information from namespace node definition file).
ServiceSetupException
- If an error occurs while registering the service.
ServiceSetupException
public static java.lang.String getServerName()
public static int getCurrentPort()
InvokeState
public static boolean checkAcl(java.lang.String aclName, java.lang.String userName)
aclName
- A string specifying an ACL nameuserName
- A string specifying a user name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |