public class WfXML
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static short |
MODE_ACTIVE
Operating mode active means that WfXML is fully active.
|
static short |
MODE_OFF
Operating mode off means that WfXML is deactivated.
|
static short |
MODE_PASSIVE
Operating mode passive means that WfXML is activated.
|
Constructor and Description |
---|
WfXML() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
dateToWfXMLDate(java.util.Date date)
Transforms a date to a WfXML date (like specified in the WfXML
specification).
|
static Partner[] |
getAllPartners()
This method returns an array containing all defined partners.
|
static java.lang.String |
getContextRoot()
Use this method to get the context root of the local server.
|
static com.dec.avw.core.Server |
getDefaultServer() |
static com.dec.avw.core.User |
getDefaultUser() |
static java.lang.String |
getDomainName()
Returns the fully qualified domain name of the local host, or an empty
String if no domain name is available.
|
static java.lang.String |
getId()
This method returns the id of the local enterprise server.
|
static int |
getMaxLogSize() |
static short |
getOperatingMode()
Use this method to find out if the local server operates in passive,
active, or off mode.
|
static Partner |
getPartner(java.lang.String id)
Use this method to get a Partner object representing a WfXML
communication partner that you know (you must know the id with which the
partner has been defined).
|
static int |
getPort()
Returns the port on which the local http server is running.
|
static java.lang.String |
getURI()
Returns the complete URI to the Receiver's receive method on the local
server.
|
static java.lang.String |
getVersion()
Use this method to find out which version of the WfXML specification is
implemented by this implementation.
|
static boolean |
isLogEnabled(java.lang.String object) |
Page |
localStatus(javax.servlet.http.HttpServletRequest req) |
static boolean |
registerMessageListener(java.lang.Class<?> listener,
Partner partner)
Use this method to register a message listener that will listen for
messages from a specific partner or all partners.
|
Page |
requestPartnerStatus(javax.servlet.http.HttpServletRequest req)
This method requests "live" info from a partner and generates a HTML page
containing this information.
|
static void |
unregisterMessageListener(java.lang.Class<?> listener,
Partner partner)
Use this method to remove previously registered message listeners.
|
static java.util.Date |
wfXMLDateToDate(java.lang.String dateString)
Transforms a WfXML date to a Java
Date object. |
public static final short MODE_OFF
public static final short MODE_ACTIVE
public static final short MODE_PASSIVE
public Page requestPartnerStatus(javax.servlet.http.HttpServletRequest req) throws java.lang.Exception
req
- The HTTP requestjava.lang.Exception
public Page localStatus(javax.servlet.http.HttpServletRequest req) throws java.lang.Exception
java.lang.Exception
public static Partner getPartner(java.lang.String id)
id
- The id with which the partner has been defined in the
enterprise configuration of the local server.null
if no partner with this id exists.public static Partner[] getAllPartners()
public static short getOperatingMode()
short
value representing the operating mode of
the local server. This can be one of the constants of this class,
e.g., MODE_ACTIVE
.public static java.lang.String getDomainName()
public static int getPort()
public static java.lang.String getContextRoot()
wf
.public static java.lang.String getId()
public static java.lang.String getURI()
http://iquitos:8000/wf/servlet.method/com.groiss.wfxml.impl.Receiver.receive/
public static java.lang.String getVersion()
public static boolean registerMessageListener(java.lang.Class<?> listener, Partner partner) throws java.lang.Exception
false
indicating that the
listener already exists. Otherwise the listener will be registered and
true
is returned.listener
- The message listener that you want to register.partner
- The listener will be called for all incoming messages of this
partner. If you don't provide a partner here (null
)
the listener will be registered for incoming messages of all
partners.true
if the listener didn't exist and was inserted
now, or false
if the listener already existed and
nothing was done.java.lang.Exception
- if registering the listener failed because of database
problems.public static void unregisterMessageListener(java.lang.Class<?> listener, Partner partner) throws java.lang.Exception
null
), no partner (null
):
All registered listeners for all partners will be removed. Take
care, this really removes all message listeneres, so afterwards there
will be 0 listeners.listener
- The listener that you want to remove (see text above for more
details).partner
- The partner for which you want to remove registered listeners
(also see the text above for more details).java.lang.Exception
- if there are database problems and removing the listener does
not work.public static java.lang.String dateToWfXMLDate(java.util.Date date)
YYYY-MM-DDThh:mm:ssZ
and always in GMT (Greenwich Mean
Time). So this method transforms the given date to this requirements.wfXMLDateToDate
method.date
- A Date object containing a date/time which you want to
tranform to WfXML representationpublic static java.util.Date wfXMLDateToDate(java.lang.String dateString)
Date
object. The
WfXML date must be in the specified format
YYYY-MM-DDThh:mm:ssZ
and in GMT (Greenwich Mean Time). The
returned date object will represent the time in the current timezone,
depending on where the computer is located. For transformations in the
other direction, use the dateToWfXMLDate
method.dateString
- A String object containing the WfXML representation of a
date/time.Date
object containing the date and
time.ApplicationException
- if the String dateString
is not formatted
according to the above mentioned format.public static com.dec.avw.core.User getDefaultUser()
public static com.dec.avw.core.Server getDefaultServer()
public static int getMaxLogSize()
public static boolean isLogEnabled(java.lang.String object)
@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.