Skip to main content

Application

Trait Application 

Source
pub trait Application:
    Send
    + Sync
    + 'static {
    type Outbound: OutboundMessage;

    // Required methods
    fn on_outbound_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        msg: &'life1 Self::Outbound,
    ) -> Pin<Box<dyn Future<Output = OutboundDecision> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn on_inbound_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        msg: &'life1 Message,
    ) -> Pin<Box<dyn Future<Output = InboundDecision> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn on_logout<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        reason: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn on_logon<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The application users of HotFIX can implement to hook into the engine.

Required Associated Types§

Required Methods§

Source

fn on_outbound_message<'life0, 'life1, 'async_trait>( &'life0 self, msg: &'life1 Self::Outbound, ) -> Pin<Box<dyn Future<Output = OutboundDecision> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Called when a message is sent to the engine to be sent to the counterparty.

This is invoked before the raw message is persisted in the message store.

Source

fn on_inbound_message<'life0, 'life1, 'async_trait>( &'life0 self, msg: &'life1 Message, ) -> Pin<Box<dyn Future<Output = InboundDecision> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Called when a message is received from the counterparty.

This is invoked after the message is verified by the session layer.

Source

fn on_logout<'life0, 'life1, 'async_trait>( &'life0 mut self, reason: &'life1 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Called when the session is logged out.

Source

fn on_logon<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Called when the session is logged on.

Implementors§