Package quickfix.fix42

Examples of quickfix.fix42.NewOrderSingle


            1000L, Long.class)).thenReturn(5000L);
               
        org.apache.camel.Message mockOutboundCamelMessage = Mockito.mock(org.apache.camel.Message.class);
        Mockito.when(mockExchange.getOut()).thenReturn(mockOutboundCamelMessage);
               
        final Message outboundFixMessage = new Email();
        outboundFixMessage.getHeader().setString(SenderCompID.FIELD, "TARGET");
        outboundFixMessage.getHeader().setString(TargetCompID.FIELD, "SENDER");
       
        Session mockSession = Mockito.spy(TestSupport.createSession(sessionID));
        Mockito.doReturn(mockSession).when(producer).getSession(MessageUtils.getSessionID(inboundFixMessage));
        Mockito.doAnswer(new Answer<Boolean>() {
            @Override
View Full Code Here


       
        String gatewayUri = "quickfix:examples/gateway.cfg?sessionID=FIX.4.2:TRADER@1->GATEWAY";
        Endpoint gatewayEndpoint = context.getEndpoint(gatewayUri);
        Producer producer = gatewayEndpoint.createProducer();
       
        Email email = TestSupport.createEmailMessage("Dynamic Routing Example");
        email.getHeader().setString(DeliverToCompID.FIELD, "TRADER@2");
       
        LOG.info("Sending routed message");
       
        Exchange exchange = producer.createExchange(ExchangePattern.InOnly);
        exchange.getIn().setBody(email);
View Full Code Here

                }
            }
        };

        quickfixjEngine.addEventListener(messageListener);
        Email email = TestSupport.createEmailMessage("Test");
        Session.sendToTarget(email, initiatorSessionID);

        assertTrue("Application message not received", messageLatch.await(5000, TimeUnit.MILLISECONDS));
        quickfixjEngine.removeEventListener(messageListener);
View Full Code Here

                }
            }
        };

        quickfixjEngine.addEventListener(messageListener);
        Email email = TestSupport.createEmailMessage("Test");
        Session.sendToTarget(email, initiatorSessionID);

        assertTrue("Application message not received", messageLatch.await(5000, TimeUnit.MILLISECONDS));
        quickfixjEngine.removeEventListener(messageListener);
View Full Code Here

                }
            }
        };

        quickfixjEngine.addEventListener(messageListener);
        Email email = TestSupport.createEmailMessage("Test");
        Session.sendToTarget(email, initiatorSessionID);

        assertTrue("Application message not received", messageLatch.await(5000, TimeUnit.MILLISECONDS));
        quickfixjEngine.removeEventListener(messageListener);
View Full Code Here

    public static class MarketOrderStatusService {
        private static final Logger LOG = LoggerFactory.getLogger(MarketOrderStatusService.class);
       
        public ExecutionReport getOrderStatus(OrderStatusRequest request) throws FieldNotFound {
            LOG.info("Received order status request for orderId=" + request.getOrderID().getValue());
            return new ExecutionReport(request.getOrderID(),
                new ExecID(UUID.randomUUID().toString()),
                new ExecTransType(ExecTransType.STATUS),
                new ExecType(ExecType.REJECTED),
                new OrdStatus(OrdStatus.REJECTED),
                new Symbol("GOOG"),
View Full Code Here

    public static class MarketOrderStatusService {
        private static final Logger LOG = LoggerFactory.getLogger(QuickfixjComponent.class);
       
        public ExecutionReport getOrderStatus(OrderStatusRequest request) throws FieldNotFound {
            LOG.info("Received order status request for orderId=" + request.getOrderID().getValue());
            return new ExecutionReport(request.getOrderID(),
                new ExecID(UUID.randomUUID().toString()),
                new ExecTransType(ExecTransType.STATUS),
                new ExecType(ExecType.REJECTED),
                new OrdStatus(OrdStatus.REJECTED),
                new Symbol("GOOG"),
View Full Code Here

    public static class MarketOrderStatusService {
        private static final Logger LOG = LoggerFactory.getLogger(QuickfixjComponent.class);
       
        public ExecutionReport getOrderStatus(OrderStatusRequest request) throws FieldNotFound {
            LOG.info("Received order status request for orderId=" + request.getOrderID().getValue());
            return new ExecutionReport(request.getOrderID(),
                new ExecID(UUID.randomUUID().toString()),
                new ExecTransType(ExecTransType.STATUS),
                new ExecType(ExecType.REJECTED),
                new OrdStatus(OrdStatus.REJECTED),
                new Symbol("GOOG"),
View Full Code Here

    public static class MarketOrderStatusService {
        private static final Logger LOG = LoggerFactory.getLogger(MarketOrderStatusService.class);
       
        public ExecutionReport getOrderStatus(OrderStatusRequest request) throws FieldNotFound {
            LOG.info("Received order status request for orderId=" + request.getOrderID().getValue());
            return new ExecutionReport(request.getOrderID(),
                new ExecID(UUID.randomUUID().toString()),
                new ExecTransType(ExecTransType.STATUS),
                new ExecType(ExecType.REJECTED),
                new OrdStatus(OrdStatus.REJECTED),
                new Symbol("GOOG"),
View Full Code Here

        } catch ( Exception e ) {}
       
        // Add OnBehalfOfCompID
        if ( sendoboCompID && !oboCompID.equals("") ) {
            OnBehalfOfCompID onBehalfOfCompID = new OnBehalfOfCompID(oboCompID);
            Header header = (Header) message.getHeader();
            header.set( onBehalfOfCompID );     
        }

        // Add OnBehalfOfSubID
        if ( sendoboSubID && !oboSubID.equals("") ) {
            OnBehalfOfSubID onBehalfOfSubID = new OnBehalfOfSubID(oboSubID);
            Header header = (Header) message.getHeader();
            header.set( onBehalfOfSubID );     
        }
       
        // Send actual message
        try {
            Session.sendToTarget( message, currentSession );
View Full Code Here

TOP

Related Classes of quickfix.fix42.NewOrderSingle

Copyright © 2018 www.massapicom. 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.