Examples of JSONMessage


Examples of org.apache.stratos.messaging.message.JsonMessage

     * @param json
     * @param type
     * @return
     */
    public static Object jsonToObject(String json, Class type) {
        return (new JsonMessage(json, type)).getObject();
    }
View Full Code Here

Examples of org.archfirst.bfcommon.jsontrading.JsonMessage

        // Write out the JsonMessage as a string
        String jsonMessageString = JsonMessageMapper.toFormattedString(newOrderSingle);
       
        // Read the JsonMessage back
        JsonMessage jsonMessageRead = JsonMessageMapper.fromString(jsonMessageString);
       
        // Make sure that the message type has been retrieved properly
        Assert.assertTrue(
                jsonMessageRead.getClass().equals(NewOrderSingle.class));
       
        // Make sure that the order has been retrieved properly
        Order orderRead =
            ((NewOrderSingle)jsonMessageRead).getOrder();
View Full Code Here

Examples of org.archfirst.bfcommon.jsontrading.JsonMessage

    @Override
    public void processMessage(String messageText) {

        // Parse the message
        JsonMessage jsonMessage = JsonMessageMapper.fromString(messageText);
        logger.debug("Received message:\n{}", JsonMessageMapper.toFormattedString(jsonMessage));
       
        // Dispatch to the correct handler
        if (jsonMessage.getClass().equals(NewOrderSingle.class)) {
            this.onMessage((NewOrderSingle)jsonMessage);
        }
        else if (jsonMessage.getClass().equals(OrderCancelRequest.class)) {
            this.onMessage((OrderCancelRequest)jsonMessage);
        }
    }
View Full Code Here

Examples of org.archfirst.bfcommon.jsontrading.JsonMessage

    @Override
    public void processMessage(String messageText) {

        // Parse the message
        JsonMessage jsonMessage = JsonMessageMapper.fromString(messageText);
        logger.debug("Received message:\n{}", JsonMessageMapper.toFormattedString(jsonMessage));
       
        // Dispatch to the correct handler
        if (jsonMessage.getClass().equals(ExecutionReport.class)) {
            this.onMessage((ExecutionReport)jsonMessage);
        }
        else if (jsonMessage.getClass().equals(OrderCancelReject.class)) {
            this.onMessage((OrderCancelReject)jsonMessage);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.