|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MXAppTest
The MXAppTest
class is used to test MXRequest API
functionality. It can used by Market Participants as a guidance tool.
MXAppTest
uses the
MXRequest API
as a door to log in to the
IMO MX Server, through the WEB Server.
Please take a look at the Javadoc for the MXRequest API
.
The MXAppTest has both BASIC
and SSL
login method.
This is dictated by the protocol and the port number.
Basic authentication, data encryption are provided by using the JSSE and JCE API
from Sun MicroSystems.
Note that this class is only a supporting class. This does not provide
access to Message Exchange on its own. The MXRequest API
class provides the access.
Login. MXRequest
users may authenticate using
JSSE basic authentication i.e. HTTPS or HTTP. This is dicated by
the constructor used. Invoke the login
method
after creating an MXRequest
instance to perform the actual
login. In MXAppTest, the login is done via asking all the parameters to the user
on a command line. Later, user has to provide all the parameters to MXRequest for
successful login.
Download Messages. This method is used to get new,active,alarm
messages from server once there is a successful login. Use the
getMessage
method.
Receipt. Message Exchange Server requires that once the message is received at the clients' end, client should send back the receipt with a message ID, so that message can be marked as received in the Database. This functin is called automatically for the user. User doesn't have to worry about sending the receipts back.
Response. Message Exchange Server requires that the client send
send back a response for a particular messageID. A Vector
of messageID's which are to be rejected, is passed as a parameter to the sendReject method.
Use the following method to send Response:
sendReject
.
Notes.
For application users, ensure that your CLASSPATH includes an archive
file: mxapi.jar
.
Please take a look at the javadoc for the MXRequest for full information.
Constructor Summary | |
MXAppTest()
|
Method Summary | |
static void |
main(java.lang.String[] args)
Create and exercise test MXAppTest object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MXAppTest()
Method Detail |
public static void main(java.lang.String[] args)
MXAppTest
object. The program
logs-in in Web Server using the JSSE and JCE API from Sun.
Based on the mode specified, required login information
is collected (e.g. host, port, mode (https or http), username and
password). If https is specified, the MXRequest creates a SSL session with the
Web Server and downloads all the message
types and sends the receipt as well as the response.
In this application, message is parsed using MessageFormat
class provided by Sun.
Users are free to use any XML Parsers available in the Market.
The main function should be used like usage: java -cp .;{path of mxapi.jar} MXAppTest
Web_host
:
- The Web Server IP Address to connect to.Web_Port
:
- The Web Server port to connect to (443 or 80).Protocol
:
- The Protocol which is to be used to connect to Web Server (HTTPS or HTTP).Username
:
- The MX Username.Password
:
- The MX User Password.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |