FairMQTransportFactoryZMQ.h
/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIRMQTRANSPORTFACTORYZMQ_H_
#define FAIRMQTRANSPORTFACTORYZMQ_H_
#include <vector>
#include <string>
#include "FairMQTransportFactory.h"
#include "FairMQMessageZMQ.h"
#include "FairMQSocketZMQ.h"
#include "FairMQPollerZMQ.h"
#include "FairMQUnmanagedRegionZMQ.h"
#include <options/FairMQProgOptions.h>
class FairMQTransportFactoryZMQ : public FairMQTransportFactory
{
public:
FairMQTransportFactoryZMQ(const std::string& id = "", const FairMQProgOptions* config = nullptr);
FairMQTransportFactoryZMQ(const FairMQTransportFactoryZMQ&) = delete;
FairMQTransportFactoryZMQ operator=(const FairMQTransportFactoryZMQ&) = delete;
~FairMQTransportFactoryZMQ() override;
FairMQMessagePtr CreateMessage() const override;
FairMQMessagePtr CreateMessage(const size_t size) const override;
FairMQMessagePtr CreateMessage(void* data, const size_t size, fairmq_free_fn* ffn, void* hint = nullptr) const override;
FairMQMessagePtr CreateMessage(FairMQUnmanagedRegionPtr& region, void* data, const size_t size, void* hint = 0) const override;
FairMQSocketPtr CreateSocket(const std::string& type, const std::string& name) const override;
FairMQPollerPtr CreatePoller(const std::vector<FairMQChannel>& channels) const override;
FairMQPollerPtr CreatePoller(const std::vector<const FairMQChannel*>& channels) const override;
FairMQPollerPtr CreatePoller(const std::unordered_map<std::string, std::vector<FairMQChannel>>& channelsMap, const std::vector<std::string>& channelList) const override;
FairMQPollerPtr CreatePoller(const FairMQSocket& cmdSocket, const FairMQSocket& dataSocket) const override;
FairMQUnmanagedRegionPtr CreateUnmanagedRegion(const size_t size, FairMQRegionCallback callback) const override;
FairMQ::Transport GetType() const override;
void Interrupt() override { FairMQSocketZMQ::Interrupt(); }
void Resume() override { FairMQSocketZMQ::Resume(); }
private:
static FairMQ::Transport fTransportType;
void* fContext;
};
#endif /* FAIRMQTRANSPORTFACTORYZMQ_H_ */
FairMQTransportFactoryZMQ
Definition: FairMQTransportFactoryZMQ.h:28
FairMQTransportFactoryZMQ::CreateMessage
FairMQMessagePtr CreateMessage() const override
Create empty FairMQMessage.
Definition: FairMQTransportFactoryZMQ.cxx:52
FairMQTransportFactory
Definition: FairMQTransportFactory.h:27
FairMQTransportFactoryZMQ::CreateSocket
FairMQSocketPtr CreateSocket(const std::string &type, const std::string &name) const override
Create a socket.
Definition: FairMQTransportFactoryZMQ.cxx:72
FairMQProgOptions
Definition: FairMQProgOptions.h:41
FairMQSocket
Definition: FairMQSocket.h:18
FairMQTransportFactoryZMQ::GetType
FairMQ::Transport GetType() const override
Get transport type.
Definition: FairMQTransportFactoryZMQ.cxx:103
FairMQTransportFactoryZMQ::CreatePoller
FairMQPollerPtr CreatePoller(const std::vector< FairMQChannel > &channels) const override
Create a poller for a single channel (all subchannels)