Search in sources :

Example 11 with NativeWorkerPool

use of org.apache.axis2.transport.base.threads.NativeWorkerPool in project wso2-synapse by wso2.

the class FIXIncomingMessageHandlerTest method testToApp.

@Test
public void testToApp() throws Exception {
    SessionID id = new SessionID(new BeginString("FIX.4.1"), new SenderCompID("SYNAPSE"), new TargetCompID("BANZAI"), "FIX.4.1:SYNAPSE->BANZAI");
    Message message = new NewOrderSingle();
    message.getHeader().setField(new BeginString("FIX.4.1"));
    message.getHeader().setField(new SenderCompID("SYNAPSE"));
    message.getHeader().setField(new TargetCompID("BANZAI"));
    message.getHeader().setField(new MsgSeqNum(1));
    message.getHeader().setField(new MsgType("A"));
    ConfigurationContext cfgCtx = new ConfigurationContext(new AxisConfiguration());
    WorkerPool pool = new NativeWorkerPool(3, 4, 10, 10, "name", "id");
    FIXIncomingMessageHandler handler = new FIXIncomingMessageHandler(cfgCtx, pool, service, true);
    handler.toApp(message, id);
}
Also used : NewOrderSingle(quickfix.fix41.NewOrderSingle) BeginString(quickfix.field.BeginString) SenderCompID(quickfix.field.SenderCompID) ConfigurationContext(org.apache.axis2.context.ConfigurationContext) AxisConfiguration(org.apache.axis2.engine.AxisConfiguration) Message(quickfix.Message) TargetCompID(quickfix.field.TargetCompID) NativeWorkerPool(org.apache.axis2.transport.base.threads.NativeWorkerPool) MsgType(quickfix.field.MsgType) MsgSeqNum(quickfix.field.MsgSeqNum) WorkerPool(org.apache.axis2.transport.base.threads.WorkerPool) NativeWorkerPool(org.apache.axis2.transport.base.threads.NativeWorkerPool) SessionID(quickfix.SessionID) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Aggregations

ConfigurationContext (org.apache.axis2.context.ConfigurationContext)11 AxisConfiguration (org.apache.axis2.engine.AxisConfiguration)11 NativeWorkerPool (org.apache.axis2.transport.base.threads.NativeWorkerPool)11 WorkerPool (org.apache.axis2.transport.base.threads.WorkerPool)11 Test (org.junit.Test)10 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)10 PassThroughTransportMetricsCollector (org.apache.synapse.transport.passthru.jmx.PassThroughTransportMetricsCollector)6 NHttpClientConnection (org.apache.http.nio.NHttpClientConnection)5 TargetConfiguration (org.apache.synapse.transport.passthru.config.TargetConfiguration)5 HttpResponse (org.apache.http.HttpResponse)3 Message (quickfix.Message)3 SessionID (quickfix.SessionID)3 BeginString (quickfix.field.BeginString)3 MsgSeqNum (quickfix.field.MsgSeqNum)3 MsgType (quickfix.field.MsgType)3 SenderCompID (quickfix.field.SenderCompID)3 TargetCompID (quickfix.field.TargetCompID)3 NewOrderSingle (quickfix.fix41.NewOrderSingle)3 MessageContext (org.apache.axis2.context.MessageContext)2 Parameter (org.apache.axis2.description.Parameter)2