AsyncWcfLib

SourceForge.AsyncWcfLib Namespace

AsyncWcfLib is a software library for distributed, actor based computing using Microsoft WCF and .NET.

Online Wiki: http://sourceforge.net/apps/mediawiki/asyncwcflib

Namespace Hierarchy

Classes

ClassDescription
ActorInput

This class represents a communication partner (service).

It is the destination of a request message and the source of a response message.

ActorInput(TSC)

This class represents an incoming connection from a client to an actor (service).

It is the destination of requests and contains additional data representing the session and the sending actor (client).

ActorOutput

This class represents a communication partner (client).

It is the source of a request message and the destination of the response.

ActorOutput(TOC)

This class represents an outgoing (client) connection to an actor (service).

It is the destination of responses and contains additional data representing the session and the remote service.

ActorPort

The base class of ActorInput and ActorOutput.

It is the source or destination of message exchange.

WcfApplication Static members to handle application start and shutdown in a compatible way. Supports Microsoft and Linux operating systems.
WcfDefault Common definitions for all interacting actors. Library users may plug in their own implementation of this class to WcfDefault.Instance.
WcfErrorMessage

An error-message is generated when an exeption or timeout occurs on client or service side.

The message contains a code indicating where the error occured and a text representation of the exception.

WcfExtensionMethods Contains extension methods for AsyncWcfLib. To use extension methods you need to reference assembly 'System.Core'
WcfIdleMessage

A message without information content. Just for alive check or default response.

WcfMessage

Base class for all messages sent through AsyncWcfLib.

WcfPartnerMessage

This class identifies a communication partner (client or service).

It is used to open and close communication.

WcfReqIdent

All data for a message sent through AsyncWcfLib.

Contains the Message itself as well as some request identification and a reference to the sending ActorPort.

The class may be used to send a response to the sender and to trace unique message identification.

WcfTrc

Use these static methods to write debugging trace or logs.

This way you are able to redirect your trace anywhere.

How to run it:

1. call WcfTrc.UsePlugin(x) when you don't want to use WcfTrcPluginDefault

2. call WcfTrc.Start(appInstance) to direct output to the correct file and write a trace-header

3. periodically call WcfTrc.Run() to write the filebuffer to disk

4. calling WcfTrc.Stop() during shutdown writes the trace-footer

WcfTrc.PluginDefault

The default implementation of a ITracePlugin

Writes to visual studio diagnostic console or to Terminal/Console.

You can easyly write a similar adapter class to redirect trace output to your own logging framework.

WcfTrc.PluginFile

The 'file' implementation of a ITracePlugin

Writes 2 tracefiles.

Switches to the next tracefile, when 1MB has been reached.

Finds default trace folder.

Interfaces

InterfaceDescription
IActorInput The public input interface of an actor. It may be called from any thread. The members of IActorPortId represent the actor receiving the incoming messages.
IActorOutput The public output interface of an actor may be called from any thread. The members of IActorPortId represent the actor sending the outgoing messages.
IActorPortId The public interface of ActorPort for inputs and outputs. Actors may have several outgoing connection to other actors. An incoming connection may receive messages from several actors.
IExtensibleWcfMessage Represents the interface used for the base message class WcfMessage. It is provided for library users wishing to write their own base message implementation.
IWcfClientConfiguration The configuration interface is implemented by WcfDefault. It may be provided by the library user.
IWcfDefault Common definitions for all interacting actors. Library users may plug in their own implementation of this class to WcfDefault.Instance.
IWcfMessage Represents the base type for all messages sent through AsyncWcfLib. The interface exists to find all message implementations in a project. The interface itself does not declare any constraints on your message implementation. It is your own responsibility to design the message for immutability by multiple threads when needed.
IWcfServiceConfiguration The configuration interface is implemented by WcfDefault. It may be provided by the library user.
WcfTrc.ITracePlugin Trace plugins must implement this interface

Delegates

DelegateDescription
AsyncResponseHandler Extension method On implements this delegate for handling messages directly in a Send context. On(T), SendOut
WcfApplication.ExitHandler The eventhandler type raised at application end.
WcfMessageHandler A general handler for internal and external messages. Called on the correct thread (synchronization context).
WcfMessageHandler(TSC) A handler for internal and external messages to ActorPort objects. Called on the correct thread (synchronization context).

Enumerations

EnumerationDescription
WcfApplication.CloseType An enumerated type sent to the ApplicationExit handler.
WcfErrorMessage.Code Most Error-Codes uniquely definies the code position where the error occured.
WcfPartnerMessage.Use Usage of WcfPartnerMessage triggers functionality on service oder client side while connecting/disconnecting. Use is set to ServiceEnableRequest when a Service is opened or ClientConnectRequest when a client is connected. Use is set to another state when a Service is closed or a client is disconnected or a timeout has occured.
WcfState Communication state for WcfPartners