proxygen
fizz::test::MockAsyncFizzBase Class Reference

#include <Mocks.h>

Inheritance diagram for fizz::test::MockAsyncFizzBase:
fizz::AsyncFizzBase folly::WriteChainAsyncTransportWrapper< folly::AsyncTransportWrapper > folly::AsyncWriter::WriteCallback folly::AsyncReader::ReadCallback folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper > folly::AsyncTransportWrapper folly::AsyncTransport folly::AsyncReader folly::AsyncWriter folly::DelayedDestruction folly::AsyncSocketBase folly::DelayedDestructionBase

Public Member Functions

 MockAsyncFizzBase ()
 
 MOCK_CONST_METHOD0 (good, bool())
 
 MOCK_CONST_METHOD0 (readable, bool())
 
 MOCK_CONST_METHOD0 (connecting, bool())
 
 MOCK_CONST_METHOD0 (error, bool())
 
 MOCK_CONST_METHOD0 (getPeerCert, folly::ssl::X509UniquePtr())
 
 MOCK_CONST_METHOD0 (getSelfCert, const X509 *())
 
 MOCK_CONST_METHOD0 (isReplaySafe, bool())
 
 MOCK_METHOD1 (setReplaySafetyCallback, void(folly::AsyncTransport::ReplaySafetyCallback *callback))
 
 MOCK_CONST_METHOD0 (getSelfCertificate, const Cert *())
 
 MOCK_CONST_METHOD0 (getPeerCertificate, const Cert *())
 
 MOCK_CONST_METHOD0 (getApplicationProtocol_, std::string())
 
std::string getApplicationProtocol () const noexceptoverride
 
 MOCK_CONST_METHOD0 (getCipher, folly::Optional< CipherSuite >())
 
 MOCK_CONST_METHOD0 (getSupportedSigSchemes, std::vector< SignatureScheme >())
 
 MOCK_CONST_METHOD3 (getEkm, Buf(folly::StringPiece, const Buf &, uint16_t))
 
 MOCK_METHOD3 (writeAppDataInternal, void(folly::AsyncTransportWrapper::WriteCallback *, std::shared_ptr< folly::IOBuf >, folly::WriteFlags))
 
void writeAppData (folly::AsyncTransportWrapper::WriteCallback *callback, std::unique_ptr< folly::IOBuf > &&buf, folly::WriteFlags flags=folly::WriteFlags::NONE) override
 
 MOCK_METHOD1 (transportError, void(const folly::AsyncSocketException &))
 
 MOCK_METHOD0 (transportDataAvailable, void())
 
- Public Member Functions inherited from fizz::AsyncFizzBase
 AsyncFizzBase (folly::AsyncTransportWrapper::UniquePtr transport)
 
 ~AsyncFizzBase () override
 
ReadCallbackgetReadCallback () const override
 
void setReadCB (ReadCallback *callback) override
 
void writeChain (folly::AsyncTransportWrapper::WriteCallback *callback, std::unique_ptr< folly::IOBuf > &&buf, folly::WriteFlags flags=folly::WriteFlags::NONE) override
 
size_t getAppBytesWritten () const override
 
size_t getAppBytesReceived () const override
 
bool good () const override=0
 
bool readable () const override=0
 
bool connecting () const override=0
 
bool error () const override=0
 
folly::ssl::X509UniquePtr getPeerCert () const override=0
 
const X509 * getSelfCert () const override=0
 
const CertgetPeerCertificate () const override=0
 
const CertgetSelfCertificate () const override=0
 
bool isReplaySafe () const override=0
 
void setReplaySafetyCallback (folly::AsyncTransport::ReplaySafetyCallback *callback) override=0
 
virtual folly::Optional< CipherSuitegetCipher () const =0
 
virtual std::vector< SignatureSchemegetSupportedSigSchemes () const =0
 
virtual Buf getEkm (folly::StringPiece label, const Buf &context, uint16_t length) const =0
 
void destroy () override
 
std::string getSecurityProtocol () const override
 
void attachTimeoutManager (folly::TimeoutManager *manager)
 
void detachTimeoutManager ()
 
void attachEventBase (folly::EventBase *eventBase) override
 
void detachEventBase () override
 
bool isDetachable () const override
 
- Public Member Functions inherited from folly::WriteChainAsyncTransportWrapper< folly::AsyncTransportWrapper >
void write (folly::AsyncTransportWrapper::WriteCallback *callback, const void *buf, size_t bytes, folly::WriteFlags flags=folly::WriteFlags::NONE) override
 
void writev (folly::AsyncTransportWrapper::WriteCallback *callback, const iovec *vec, size_t count, folly::WriteFlags flags=folly::WriteFlags::NONE) override
 
- Public Member Functions inherited from folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >
 DecoratedAsyncTransportWrapper (typename folly::AsyncTransportWrapper::UniquePtr transport)
 
const AsyncTransportWrappergetWrappedTransport () const override
 
ReadCallbackgetReadCallback () const override
 
void setReadCB (folly::AsyncTransportWrapper::ReadCallback *callback) override
 
folly::EventBasegetEventBase () const override
 
void attachEventBase (folly::EventBase *eventBase) override
 
void close () override
 
void closeNow () override
 
void closeWithReset () override
 
bool connecting () const override
 
void detachEventBase () override
 
bool error () const override
 
size_t getAppBytesReceived () const override
 
size_t getAppBytesWritten () const override
 
void getLocalAddress (folly::SocketAddress *address) const override
 
void getPeerAddress (folly::SocketAddress *address) const override
 
folly::ssl::X509UniquePtr getPeerCert () const override
 
size_t getRawBytesReceived () const override
 
size_t getRawBytesWritten () const override
 
uint32_t getSendTimeout () const override
 
bool good () const override
 
bool isDetachable () const override
 
bool isEorTrackingEnabled () const override
 
bool readable () const override
 
bool writable () const override
 
void setEorTracking (bool track) override
 
void setSendTimeout (uint32_t timeoutInMs) override
 
void shutdownWrite () override
 
void shutdownWriteNow () override
 
std::string getApplicationProtocol () const noexceptoverride
 
std::string getSecurityProtocol () const override
 
bool isReplaySafe () const override
 
void setReplaySafetyCallback (folly::AsyncTransport::ReplaySafetyCallback *callback) override
 
const AsyncTransportCertificategetPeerCertificate () const override
 
const AsyncTransportCertificategetSelfCertificate () const override
 
- Public Member Functions inherited from folly::AsyncTransportWrapper
template<class T >
const TgetUnderlyingTransport () const
 
template<class T >
TgetUnderlyingTransport ()
 
- Public Member Functions inherited from folly::AsyncTransport
virtual bool isPending () const
 
SocketAddress getLocalAddress () const
 
void getAddress (SocketAddress *address) const override
 
SocketAddress getPeerAddress () const
 
- Public Member Functions inherited from folly::DelayedDestruction
bool getDestroyPending () const
 
- Public Member Functions inherited from folly::DelayedDestructionBase
virtual ~DelayedDestructionBase ()=default
 
- Public Member Functions inherited from folly::AsyncSocketBase
virtual ~AsyncSocketBase ()=default
 

Additional Inherited Members

- Public Types inherited from fizz::AsyncFizzBase
using UniquePtr = std::unique_ptr< AsyncFizzBase, folly::DelayedDestruction::Destructor >
 
using ReadCallback = folly::AsyncTransportWrapper::ReadCallback
 
- Public Types inherited from folly::AsyncTransportWrapper
using UniquePtr = std::unique_ptr< AsyncTransportWrapper, Destructor >
 
using ReadCallback = AsyncReader::ReadCallback
 
using WriteCallback = AsyncWriter::WriteCallback
 
- Public Types inherited from folly::AsyncTransport
typedef std::unique_ptr< AsyncTransport, DestructorUniquePtr
 
- Protected Member Functions inherited from fizz::AsyncFizzBase
virtual void startTransportReads ()
 
virtual void startHandshakeTimeout (std::chrono::milliseconds)
 
virtual void cancelHandshakeTimeout ()
 
virtual void deliverAppData (std::unique_ptr< folly::IOBuf > buf)
 
virtual void deliverError (const folly::AsyncSocketException &ex, bool closeTransport=true)
 
virtual void transportError (const folly::AsyncSocketException &ex)=0
 
virtual void transportDataAvailable ()=0
 
- Protected Member Functions inherited from folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >
 ~DecoratedAsyncTransportWrapper () override
 
- Protected Member Functions inherited from folly::AsyncTransport
 ~AsyncTransport () override=default
 
- Protected Member Functions inherited from folly::DelayedDestruction
 ~DelayedDestruction () override=default
 
 DelayedDestruction ()
 
- Protected Member Functions inherited from folly::DelayedDestructionBase
 DelayedDestructionBase ()
 
uint32_t getDestructorGuardCount () const
 
- Protected Member Functions inherited from folly::AsyncReader
virtual ~AsyncReader ()=default
 
- Protected Member Functions inherited from folly::AsyncWriter
virtual ~AsyncWriter ()=default
 
- Protected Member Functions inherited from folly::AsyncWriter::WriteCallback
virtual ~WriteCallback ()=default
 
- Protected Attributes inherited from fizz::AsyncFizzBase
folly::IOBufQueue transportReadBuf_ {folly::IOBufQueue::cacheChainLength()}
 
- Protected Attributes inherited from folly::DecoratedAsyncTransportWrapper< folly::AsyncTransportWrapper >
folly::AsyncTransportWrapper::UniquePtr transport_
 

Detailed Description

Definition at line 260 of file Mocks.h.

Constructor & Destructor Documentation

fizz::test::MockAsyncFizzBase::MockAsyncFizzBase ( )
inline

Definition at line 262 of file Mocks.h.

References folly::pushmi::operators::error(), fizz::test::getPeerCert(), MOCK_CONST_METHOD0, MOCK_METHOD1, and string.

AsyncFizzBase(folly::AsyncTransportWrapper::UniquePtr transport)
std::unique_ptr< AsyncTransportWrapper, Destructor > UniquePtr

Member Function Documentation

std::string fizz::test::MockAsyncFizzBase::getApplicationProtocol ( ) const
inlineoverridevirtualnoexcept

Return the application protocol being used by the underlying transport protocol. This is useful for transports which are used to tunnel other protocols.

Implements fizz::AsyncFizzBase.

Definition at line 279 of file Mocks.h.

References fizz::test::getCipher(), MOCK_CONST_METHOD0, MOCK_CONST_METHOD3, MOCK_METHOD3, and uint16_t.

279  {
280  return getApplicationProtocol_();
281  }
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( good  ,
bool()   
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( readable  ,
bool()   
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( connecting  ,
bool()   
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( error  ,
bool()   
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( getPeerCert  ,
folly::ssl::X509UniquePtr()   
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( getSelfCert  ,
const X509 *  () 
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( isReplaySafe  ,
bool()   
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( getSelfCertificate  ,
const Cert () 
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( getPeerCertificate  ,
const Cert () 
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( getApplicationProtocol_  ,
std::string()   
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( getCipher  ,
folly::Optional< CipherSuite () 
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD0 ( getSupportedSigSchemes  ,
std::vector< SignatureScheme () 
)
fizz::test::MockAsyncFizzBase::MOCK_CONST_METHOD3 ( getEkm  ,
Buf(folly::StringPiece, const Buf &, uint16_t  
)
fizz::test::MockAsyncFizzBase::MOCK_METHOD0 ( transportDataAvailable  ,
void()   
)
fizz::test::MockAsyncFizzBase::MOCK_METHOD1 ( setReplaySafetyCallback  ,
void(folly::AsyncTransport::ReplaySafetyCallback *callback)   
)
fizz::test::MockAsyncFizzBase::MOCK_METHOD1 ( transportError  ,
void(const folly::AsyncSocketException &)   
)
fizz::test::MockAsyncFizzBase::MOCK_METHOD3 ( writeAppDataInternal  ,
void(folly::AsyncTransportWrapper::WriteCallback *, std::shared_ptr< folly::IOBuf >, folly::WriteFlags  
)
void fizz::test::MockAsyncFizzBase::writeAppData ( folly::AsyncTransportWrapper::WriteCallback callback,
std::unique_ptr< folly::IOBuf > &&  buf,
folly::WriteFlags  flags = folly::WriteFlags::NONE 
)
inlineoverridevirtual

Interface for the derived class to implement to receive app data from the app layer.

Implements fizz::AsyncFizzBase.

Definition at line 294 of file Mocks.h.

References MOCK_METHOD0, and MOCK_METHOD1.

297  {
298  writeAppDataInternal(
299  callback, std::shared_ptr<folly::IOBuf>(buf.release()), flags);
300  }
flags
Definition: http_parser.h:127

The documentation for this class was generated from the following file: