public class WfXML extends 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 String |
dateToWfXMLDate(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 String |
getContextRoot()
Use this method to get the context root of the local server.
|
static com.dec.avw.core.Server |
getDefaultServer() |
static User |
getDefaultUser() |
static String |
getDomainName()
Returns the fully qualified domain name of the local host, or an empty
String if no domain name is available.
|
static 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(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 String |
getURI()
Returns the complete URI to the Receiver's receive method on the local
server.
|
static String |
getVersion()
Use this method to find out which version of the WfXML specification is
implemented by this implementation.
|
static boolean |
isLogEnabled(String object) |
Page |
localStatus(HttpServletRequest req) |
static boolean |
registerMessageListener(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(HttpServletRequest req)
This method requests "live" info from a partner and generates a HTML page
containing this information.
|
static void |
unregisterMessageListener(Class<?> listener,
Partner partner)
Use this method to remove previously registered message listeners.
|
static Date |
wfXMLDateToDate(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(HttpServletRequest req) throws Exception
req
- The HTTP requestException
public Page localStatus(HttpServletRequest req)
public static Partner getPartner(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 String getDomainName()
public static int getPort()
public static String getContextRoot()
wf
.public static String getId()
public static String getURI()
http://iquitos:8000/wf/servlet.method/com.groiss.wfxml.impl.Receiver.receive/
public static String getVersion()
public static boolean registerMessageListener(Class<?> listener, Partner partner)
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.public static void unregisterMessageListener(Class<?> listener, Partner partner)
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).public static String dateToWfXMLDate(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 Date wfXMLDateToDate(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 User getDefaultUser()
public static com.dec.avw.core.Server getDefaultServer()
public static int getMaxLogSize()
public static boolean isLogEnabled(String object)
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.