The C++ framework for developing highly scalable, high performance servers on Windows platforms.

Interfaces
[Programming Concepts]

Collaboration diagram for Interfaces:

Detailed Description

These abstract base classes define Interfaces that concrete classes implement. They exist so that we can reduce coupling in the system. Since objects interact with each other through abstract interfaces and they don't care about the implementation of those interfaces we're free to plug in any object that implements the interface, such as a Mock Object, or alternative implementation. This allows us to evolve the system in a gradual manner; isolated objects can be replaced by new objects that implement the same interfaces without causing changes to ripple through the entire system due to unexpected coupling. See: here and here for more details.

This section contains links to the code that implements this concept.


Classes

class  IAcceptRuntimes
class  IEventSinkCallback
 A callback interface that is used by CCLREventSink to report events. More...
class  IHandleExceptions
class  IHostControl
 An interface that extends the MSCoreE IHostControl interface... More...
class  IHostPolicyManagerCallback
 A callback interface that is used by CHostPolicyManager to report events. More...
class  IAllocateFixedSizedMemory
 Provides an interface that can allocate fixed sized blocks of memory. More...
class  IConfiguration
 Provides an interface to a tree structured configuration such as something that could easily be modelled by an XML file or the registry. More...
class  IIndexedOpaqueUserData
 Provides an interface that allows access to 'opaque user data' that is data that is stored as either a void * or an unsigned long and that is basically anything that the user wants to store. The data is stored by index and an implementation of this class is free to store the data in any way that it sees fit. An index represents a single storage location so a call to GetUserPointer() and GetUserData() on the same index will return the same data, just viewed in different ways. More...
class  ILockableObject
 An interface onto objects that can be locked. More...
class  TILockableObjectTracksLockingThread
 An interface onto objects that can be locked and which track the thread that currently holds the lock and can tell you if you currently hold the lock. More...
class  ILogMessages
 An interface for logging messages. These can be debug trace messages or more structured logging. The messages are sent to a log, which can be pretty much anything. More...
class  IManageThreadPoolThreads
 An interface to allow a thread pool to monitor the actions of the threads that it manages. More...
class  IManageTimerQueue
 An interface representing a class that manages timers that implement the IQueueTimers::Timer interface and and which have their IQueueTimers::Timer::OnTimer() method called when the the timer expires. See here for more details. Note that this interface extends IQueueTimers to provide the ability to deal with the timer's timeouts via IManageTimerQueue::BeginTimeoutHandling(), etc. This interface is designed for composing timer queues, such as is done in CThreadedCallbackTimerQueue and not for passing to users of timer queues. More...
class  IMonitorCallbackTimerQueue
 An interface to allow a class to monitor the operation of an instance of CCallbackTimerQueue. More...
class  IMonitorThreadedCallbackTimerQueue
 An interface to allow a class to monitor the operation of an instance of CCallbackTimerQueue. More...
class  IMonitorThreadPool
 An interface to allow a class to monitor an instance of a thread pool. The interface assumes that threads in the pool go through the following life-cycle: created, begin processing, end processing, destroyed, and that they may optionally (hopefully not) generate errors. Obviously a thread is likely to begin and end processing several work items before it is destroyed. The methods on this interface can be called either from any thread and may not be called from the thread pool thread itself. Incrementing a counter when OnThreadCreated() is called and decrementing it when OnThreadDestroyed() is called will give you a count of the number of threads that are in existence at any one time. A corresponding counter that is incremented in OnThreadBeginProcessing() and decremented in OnThreadEndProcessing() is called will give a count of the threads that are currently in use. More...
class  IProvideRandomBytes
class  IProvideRandomNumbers
class  IProvideSystemTime
 An interface that provides access to the operating system GetSystemTime() call. Code can access this service via an instance to IProvideSystemTime so that the provider can be replaced (usually for testing purposes). See here for more details. More...
class  IProvideUserData
 An interface that works with IIndexedOpaqueUserData to allow users of a class that provides opaque user data to request a named 'slot' for their data. Generally what happens is that an allocator will expose this interface and the allocated items will expose the interface to access the user data. Users of the allocator can request named slots of user data before allocating the first item and then all items are created with the required amount of user data space. More...
class  IQueueTimers
 An interface representing a class that manages timers that implement the IQueueTimers::Timer interface and and which have their IQueueTimers::Timer::OnTimer() method called when the the timer expires. See here for more details. More...
class  IReentrantLockableObject
 An interface onto objects that can be locked and where the same thread is able to call Lock() multiple times successfully and where each call to Lock() needs to be balanced by a corresponding call to Unlock() to unlock the object. More...
class  IReentrantLockableObjectTracksLockingThread
 An interface onto objects that can be locked and where the same thread is able to call Lock() multiple times successfully and where each call to Lock() needs to be balanced by a corresponding call to Unlock() to unlock the object. More...
class  IRunnable
 An interface to code that can be Run() on a thread. Usually passed to the CThread constructor. More...
class  IThreadPoolWorkerThreadCallback
 An interface to an object that acts as a worker thread for a work queue. The life-cycle of an object that implements this interface is as follows: one call to Initialise() (and, if it returns true), 0 or many calls to Process() and then one call to Shutdown(). More...
class  IThreadPoolWorkerThreadFactory
 An interface to create instances of IThreadPoolWorkerThreadCallback. Usually passed to the CThreadPool constructor. More...
class  IWaitable
 An interface to code that can be waited for, either via the methods on the interface or by passing a handle to one of the Wait Functions. More...
class  CRandomByteProvider
class  CAsyncFileLog
 A class that implements JetByteTools::Core::ILogMessages to provide an asynchronous file log that uses overlapped I/O to perform writes to the log file. This class allows you to change the name of the log file after creation but this functionality should be externally synchronised with any use of the various LogMessage() calls and any calls on the IWaitable interface to ensure that SetLogName() is never called concurrently to one of the other calls. The reason that we require YOU to do this synchronisation work is that when used carefully (i.e. SetLogName() is never called when the class is being used by multiple threads) then there is no need to synchronise the calls to LogMessage(). More...
class  CFixedFileHeaderRotatingAsyncFileLog
 A class that implements JetByteTools::ILogMessages to provide an asynchronous file log that uses overlapped I/O to perform writes to the log file. The log can be set to automatically rotate (i.e. create a new log file) after a set period of time or when the file grows to a particular size. More...
class  IAddBuffersToPool
class  IAllocatableBuffer
class  IAllocateBuffer
class  IAllocateBufferHandles
 An interface to a class that allocates instances of CBufferHandle which can be attached to an instance of an IBuffer. More...
class  IAllocateBuffers
 An interface to a class that allocates instances of IBuffer of a fixed size. Each instance of IBuffer has opaque user data associated with it and so this allocator derives from IProvideUserData to allow the user to request user data "slots" from the allocator; you must request all of your slots before calling Allocate() for the first time. More...
class  IAssociateDeviceWithIOSubSystem
class  IAsyncIOStream
 An interface onto an asynchrnonous I/O stream. Calls to Write() are not guaranteed to have completed when the call returns and calls to Read() simply request that a Read() happens and do not, in any way, result in incoming data being placed in the provided buffer before the call returns. Objects that implement this interface must provide another way to provide the caller with the data that is read from the stream when the read actually completes. More...
class  IBufferBase
 An interface to a I/O buffer (with a partially refactored name!). Initially IBuffer and IBufferBase was one class, it was split to make it easier to mock and in an attempt to remove some of the socket stuff. Classes that implement this interface represent a byte buffer that can be used for overlapped I/O and that consist of a contiguous array of bytes and an insertion point which moves along the buffer as data is added to it. More work needs to be done. More...
class  IBufferChain
class  ICloseableOutputStream
 An extension to IOutputStream that allows the user to call Close() on it. More...
class  IDispatchToWorkerThread
class  IHandleFileCreationFailure
class  IHandler
 An interface that represents code that handles operations on I/O buffers. More...
class  IInputStream
 An interface to an input stream (which may be sync or async). More...
class  IIOPool
 An interface to an I/O thread pool (usually based on an I/O completion port) that can have operations on buffers and handlers dispatched to it (either directly or as a result of an I/O completion packet being generated by some asynchronous I/O event) and that handles these events on one of the threads in the pool. More...
class  IIOSubSystem
class  IIterateableBufferChain
class  ILimitPendingWrites
 An interface to an object that manages the number of writes currently in progress and that can disallow any more write requests being made. Call CanWrite() when you wish to issue a new write request and when it returns you can issue your write and call WriteComplete() when the write is complete. More...
class  IManageBufferHandleLifeCycle
 A helper interface to remove a friend relationship between buffers and their allocators... More...
class  IManageBufferLifeCycle
 A helper interface to remove a friend relationship between buffers and their allocators... More...
class  IManageWorkerThreads
class  IMonitorAsyncFileReader
 An interface to allow a class to monitor an instance of an async file reader. More...
class  IMonitorAsyncFileWriter
 An interface to allow a class to monitor an instance of an async file writer. More...
class  IMonitorBufferAllocation
 An interface to allow a class to monitor the operation of a class that allocates buffers. The interface assumes that buffers go through the following life-cycle: created, allocated, released, destroyed. Allocators that pool buffers can allow a buffer to be created once and then allocated and released several times before being deleted. Incrementing a counter when OnBufferCreated() is called and decrementing it when OnBufferDestroyed() is called will give you a count of the number of buffers that are in existence at any one time. A corresponding counter that is incremented in OnBufferAllocated() and decremented when OnBufferReleased() is called will give a count of the buffers that are currently in use. More...
class  IOutputStream
 An interface to an output stream (which may be sync or async). More...
class  IPoolBuffers
class  IProvideWorkItems
 A restricted interface onto a queue of work items (such as an I/O completion port, perhaps). More...
class  IStream
 An interface to an stream... More...
class  IUnsortedBufferChain
class  CNullBufferPool
class  CRetryAndRenameFileCreationFailureHandler
class  CRotatingAsyncFileLog
 A class that implements JetByteTools::ILogMessages to provide an asynchronous file log that uses overlapped I/O to perform writes to the log file. The log can be set to automatically rotate (i.e. create a new log file) after a set period of time or when the file grows to a particular size. More...
class  TTimeChangeAwareRotatingAsyncFileLog
 A class that implements JetByteTools::ILogMessages to provide an asynchronous file log that uses overlapped I/O to perform writes to the log file. The log can be set to automatically rotate (i.e. create a new log file) after a set period of time or when the file grows to a particular size. Aware of time changes that occur on the system. More...
class  ICollectPerformanceData
 An interface to an object that manages a set of performance counter data that can be exposed via a dll that conforms to the API required for perfmon performance extension dll data collection dlls. More...
class  IInstallPerformanceMonitorCounters
 An interface to an object that can install performance counters on a system. See here for more details. More...
class  IAcceptDatagramSocketConnectionFilters
 This interface works in conjunction with IFilterDatagramSocketConnections and allows datagram filters to be added to a class that can use them. More...
class  IAcceptStreamSocketConnectionFilters
 This interface works in conjunction with IFilterStreamSocketConnections and allows stream filters to be added to a class that can use them. More...
class  IAddress
 An interface that represents a Winsock address. This interface only deals with the data that's available from the underlying address; none of the 'meta-data' related to the address type is available; see IFullAddress for that stuff. More...
class  IAddressRef
 A reference counted IAddress. More...
class  IAddressType
 An interface that provides meta-data information about the type of a Winsock Address. More...
class  IAllocateDatagramServerSockets
 An interface for allocating IPoolableDatagramServerSocket. More...
class  IAllocateDatagramSockets
 An interface for allocating IPoolableDatagramSocket. More...
class  IAllocatePoolableSockets
 An interface for managing IPoolableSocket. More...
class  IAllocateSequencedStreamSockets
 An interface for allocating instances of IPoolableStreamSocket that support sequencing of reads and writes. Before you allocate the first socket you can request that the socket manage buffer sequencing counters for you by requesting a "sequnce id". This id can then be passed to IManageStreamSocketConnectionFilters::ReadCompleted() and IManageStreamSocketConnectionFilters::RequestWrite() calls to have the buffer sequenced using the specified sequnce id. Sockets allocated with this interface automatically support sequencing of the 'primary' byte stream. More...
class  IAllocateStreamSockets
 An interface for allocating instances of IPoolableStreamSocket. More...
class  IAsyncSocket
 An interface to the functionality common to all asynchronous sockets. The "Try" functions add to the functions from JetByteTools::IO::IAsyncIOStream by adding versions that return false on failure rather than by throwing an exception. More...
class  ICreateFilteredStreamSocketConnections
 An interface used to create outgoing stream socket connections. More...
class  ICreateStreamSocketConnections
 An interface used to create outgoing stream socket connections. More...
class  IDatagramSendSocket
class  IDatagramServerSocket
 This interface provides an equivalent interface to the one provided by IAsyncSocket for IDatagramSocket and IStreamSocket. It does not feature the ability to issue Read() calls as the sockets derived from this interface are purely disconnected, datagram, server sockets; i.e. they're how you send a datagram back to whoever sent you the datagram that has just arrived. IDatagramSocket supports a pseudo connected interface where you can issue Read() calls ... More...
class  IDatagramServerSocketCallback
 The socket server callback interface is composed from more specific interfaces using inheritance. This is purely to allow the framework to work in terms of the narrowest interface internally and does not affect the user of the code. This is, effectively, the first interface that the user would wish to implement. More...
class  IDatagramServerSocketConnectionManager
 An interface that is used to allow a socket to communicate with the connection manager that manages it. This interface is supplied to the socket in the call to Attach(). More...
class  IDatagramServerSocketConnectionManagerIO
class  IDatagramServerSocketEx
 A socket interface that adds functionality that is used internally by the socket server classe. More...
class  IDatagramSocket
 This interface adds datagram socket specific functionality to the IAsyncSocket interface. Note that instances of IDatagramSocket support a pseudo connected interface where you can issues Read() calls and RecvFrom() any address. IDatagramServerSocket presents a much more restricted interface intended for use from "pure" datagram servers. More...
class  IDatagramSocketCallback
 The connection manager and socket server callback interfaces are composed from more specific interfaces using inheritance. This is purely to allow the framework to work in terms of the narrowest interface internally and does not affect the user of the code. Effectively the first interface that the user would wish to implement is at the IXXXConnectionManagerCallback level and above. More...
class  IDatagramSocketConnectionManager
 An interface that is used to allow a socket to communicate with the connection manager that manages it. This interface is supplied to the socket in the call to Attach(). More...
class  IDatagramSocketConnectionManagerCallback
 The connection manager and socket server callback interfaces are composed from more specific interfaces using inheritance. This is purely to allow the framework to work in terms of the narrowest interface internally and does not affect the user of the code. Effectively the first interface that the user would wish to implement is at the IXXXConnectionManagerCallback level and above. More...
class  IDatagramSocketConnectionManagerIO
class  IDatagramSocketEx
 A socket interface that adds functionality that is used internally by the connection manager and socket server classes. More...
class  IDatagramSocketServerCallback
 The socket server callback interface is composed from more specific interfaces using inheritance. This is purely to allow the framework to work in terms of the narrowest interface internally and does not affect the user of the code. This is, effectively, the first interface that the user would wish to implement. More...
class  IFilterableDatagramSocket
 An interface which adds functionality that is useful when filtering a connection. More...
class  IFilterableStreamSocket
 An interface which adds functionality that is useful when filtering a connection. More...
class  IFullAddress
 An interface that represents an IAddress which knows about its address type and that can create dynamically allocated copies of itself. More...
class  IIPAddress
 An interface that represents an IP address which knows about its port. More...
class  ILimitConnections
 An interface to an object that manages the number of connections currently in progress and that can disallow any more connections being made. Call CanCreateConnection() when you wish to create a new connection and if it returns true then you can create your connection and call ReleaseConnection() when the connection terminates. If it returns false then you should not create your connection. More...
class  IMaintainStreamSocketConnections
 An interface used to create and maintain outgoing stream socket connections. More...
class  IManageDatagramSocketConnectionFilters
 This interface works in conjunction with IFilterDatagramSocketConnections to allow datagram filters to issue new read and write events. Any filter that either can swallow data buffers (by not passing on calls to the next filter in the chain) or that generates data buffers (passing data to the next filter in the chain when that data wasn't generated by a previous layer in the chain) should always use this interface to pass data buffers to the next layer in the chain. Failure to do so will affect any additional filter processing that may (or may not) be occurring. More...
class  IManageNamedServers
class  IManageStreamSocketConnectionFilters
 This interface works in conjunction with IFilterStreamSocketConnections to allow stream filters to issue new read and write events. Any filter that either can swallow data buffers (by not passing on calls to the next filter in the chain) or that generates data buffers (passing data to the next filter in the chain when that data wasn't generated by a previous layer in the chain) should always use this interface to pass data buffers to the next layer in the chain. Failure to do so will affect any buffer sequencing that may (or may not) be occurring. A filter can specify that its own sequence counter is used by requesting one from the socket allocator and then by passing the sequence id to the relevant calls. If a filter only ever injects new data into a stream then it can use the socket's own sequence counter and calls to the methods that don't take an explicit sequence id. More...
class  IMonitorDatagramSocketFlowControl
class  IMonitorSocketAllocation
 An interface to allow a class to monitor the operation of a class that allocates sockets. The design of the interface assumes that sockets go through the following life-cycle: created, allocated, released, destroyed. Allocators that pool sockets can allow a socket to be created once and then allocated and released several times before being deleted. Incrementing a counter when OnSocketCreated() is called and decrementing it when OnSocketDestroyed() is called will give you a count of the number of sockets that are in existence at any one time. A corresponding counter that is incremented in OnSocketAttached() and decremented in OnSocketReleased() is called will give a count of the sockets that are currently in use. More...
class  IMonitorStreamSocketFlowControl
 An interface to allow a class to monitor the operation of a class that implements flow control for stream socket connections. The design of the interface assumes that only buffers that are affected by flow control are noted by the monitor. The effects of flow control on a buffer that is being sent on a connection are as follows: delayed, sent or discarded. A buffer that is delayed is being held for a while until it can be sent. A buffer that has been sent is a buffer that was previously delayed and that has now been written to the connection. A buffer that is discarded can either be a new buffer that is being discarded rather than delayed or an existing delayed buffer that will now never be sent. Incrementing a counter when OnBufferDelayed() is called and decrementing it when OnBufferSent() is called, OR when 'wasDelayed' is true and OnBufferDiscarded() is called will give you a count of buffers that are currently delayed. Incrementing a counter when OnBufferDiscarded() is called will give you a count of all the buffers that were discarded. You can use the 'id' value as a way of maintaining these counts on a per-connection basis. The Id that you return from a call to OnConnectionEstablished() will be passed with every call to the other monitor functions. Note that if all you require is a unique id per connection then you can simply cast the address of the supplied socket to a ConnectionId in OnConnectionEstablished() and return that. More...
class  IPoolableDatagramServerSocket
 An interface that exists purely to tie together the poolable nature of a socket and the datagram server socket nature of a socket into a poolable datagram server socket. The CDatagramServerSocketAllocator object works in terms of this interface. More...
class  IPoolableDatagramSocket
 An interface that exists purely to tie together the poolable nature of a socket and the datagram socket nature of a socket into a poolable datagram socket. The CDatagramSocketAllocator object works in terms of this interface. More...
class  IPoolableSocket
 The IPoolableSocket interface provides the 'poolability' of the sockets. Poolable sockets are pooled using a CNodeList and so, for a socket to be pooled it must derive from CNodeList::Node. When a socket is used from the pool or released to the pool the allocator passes the socket's user data to the allocation monitor and so poolable sockets must support IIndexedOpaqueUserData. More...
class  IPoolableSocketManager
 A convenience interface that acts as a common base class for SocketManagers simply so that the whole of the socket allocator common code doesn't need to be templatised. Typesafety is ensured by TSocketAllocator. More...
class  IPoolableStreamSocket
 An interface that exists purely to tie together the poolable nature of a socket and the stream socket nature of a socket into a poolable stream socket. The CStreamSocketAllocator and CSequencedStreamSocketAllocator objects work in terms of this interface. More...
class  IReleaseCreatedConnections
class  IRenderAddresses
 An interface to an object that can take an instance of IAddress and produce a readable textual representation of that address. So, for example, it could takean IPv4 address and render it in standard dotted IP format xxx.xxx.xxx.xxx, etc. More...
class  IServerControl
 An interface to a 'server' that can be started, stopped and can be toggled between accepting connections or not. The life-cycle of an object that implements this interface is; start, accept connections, stop accepting connections, initiate shutdown, shutdown. The object may go from accepting to not accepting and back again any number of times after being started. The object may go from started to stopped and stopped to started any number of times. More...
class  ISocketCallback
 The connection manager and socket server callback interfaces are composed from more specific interfaces using inheritance. This is purely to allow the framework to work in terms of the narrowest interface internally and does not affect the user of the code. Effectively the first interface that the user would wish to implement is at the IXXXConnectionManagerCallback level and above. More...
class  IStreamSocket
 This interface adds stream socket specific functionality to the IAsyncSocket interface. As you can see that isn't much. This is the interface that you will interact with to access socket functionality when you write a client or server as this is the interface to the socket connection that you are passed when callback events occur on a connection. More...
class  IStreamSocketCallback
 The connection manager and socket server callback interfaces are composed from more specific interfaces using inheritance. This is purely to allow the framework to work in terms of the narrowest interface internally and does not affect the user of the code. Effectively the first interface that the user would wish to implement is at the IXXXConnectionManagerCallback level and above. More...
class  IStreamSocketConnectionManager
 An interface that is used to allow a socket to communicate with the connection manager that manages it. This interface is supplied to the socket in the call to Attach(). More...
class  IStreamSocketConnectionManagerCallback
 The connection manager and socket server callback interfaces are composed from more specific interfaces using inheritance. This is purely to allow the framework to work in terms of the narrowest interface internally and does not affect the user of the code. Effectively the first interface that the user would wish to implement is at the IXXXConnectionManagerCallback level and above. More...
class  IStreamSocketConnectionManagerIO
class  IStreamSocketEx
 A socket interface that adds functionality that is used internally by the connection manager and socket server classes. More...
class  IStreamSocketServerCallback
 The connection manager and socket server callback interfaces are composed from more specific interfaces using inheritance. This is purely to allow the framework to work in terms of the narrowest interface internally and does not affect the user of the code. Effectively the first interface that the user would wish to implement is at the IXXXConnectionManagerCallback level and above. More...
class  IStreamSocketServerExCallback
 The connection manager and socket server callback interfaces are composed from more specific interfaces using inheritance. This is purely to allow the framework to work in terms of the narrowest interface internally and does not affect the user of the code. Effectively the first interface that the user would wish to implement is at the IXXXConnectionManagerCallback level and above. More...
class  ISupportMulticast
 The interface used to support multicasting. More...
class  IWritableAddress
 An interface which represents an address that can be written to and updated. A typical way that this interface would be used is like this: getsockname(socket, address.GetStorage(), address.GetSize()). More...
class  IWritableAddressRef
 A reference counted IWritableAddress. More...
class  IAssignProcessesToJobs
 Provides an interface that can assign a process to a job. More...
class  ICreateMiniDumps
 Provides an interface that can create a mini dump of a process. More...
class  IHandleJobEvents
 An interface to allow a class to handle the events that are generated by operating system Job objects. More...
class  IManageEnvironmentVariables
 An interface for manipulating operating system environment variables. More...
class  IManageJobEvents
 An interface to a class that manages the asynchronous events generated by an operating system job object and routes them to the supplied handler interface. More...
class  IMonitorJobs
 An interface to allow a class to monitor the events that are generated by instances of CJob. More...
class  IProvideEnvironmentBlock
 An interface for providing operating system environment variable blocks as detailed here. More...


Generated on Sun Sep 12 19:06:47 2021 for The Server Framework - v7.4 by doxygen 1.5.3