C# Class PBCaGw.Workers.WorkerChain

Stores a processing chain composed of workers
Inheritance: IDisposable
Show file Open project: ISISComputingGroup/EPICS-epicssharp Class Usage Examples

Public Properties

Property Type Description
ChannelCid uint>.ConcurrentDictionary
ChannelSubscriptions uint>.ConcurrentDictionary
Channels ObservableConcurrentBag
ClientEndPoint System.Net.IPEndPoint
Gateway Gateway
IsDisposed bool
IsDisposing bool
LastMessage System.DateTime
ServerEndPoint System.Net.IPEndPoint
Subscriptions uint>.ConcurrentDictionary

Public Methods

Method Description
Add ( Worker worker ) : void

Adds the next Worker to the chain and register it to the previous Worker to the ReceiveData event.

Dispose ( ) : void

Dispose the current chain.

NbClientConn ( ) : int
NbServerConn ( ) : int
RemoveLast ( ) : void
TcpChain ( Gateway gateway, ChainSide side, IPEndPoint client, IPEndPoint server ) : WorkerChain

Creates a request TCP chain

TcpResponseChain ( Gateway gateway, ChainSide side, IPEndPoint client, IPEndPoint server ) : WorkerChain

Creates a response TCP chains

UdpBeaconReceiver ( Gateway gateway, ChainSide side, IPEndPoint client, List server ) : WorkerChain
UdpChain ( Gateway gateway, ChainSide side, IPEndPoint client, List server ) : WorkerChain

Creates a request UDP chain

UdpResponseChain ( Gateway gateway, ChainSide side, IPEndPoint client, List server ) : WorkerChain

Creates a request UDP chain

UseChain ( WorkerChain chain ) : void

Link 2 chains together (a client which is connected to an IOC)

this ( int key ) : Worker

Private Methods

Method Description
GatewayTenSecJobs ( object sender, EventArgs e ) : void

Cleanup server chains (IOC) which are not used since more than Gateway.IOC_KEEP_ALIVE_CONNECTION

PopulateChain ( Gateway gateway, ChainSide side, IEnumerable workersNeeded, IPEndPoint client, IPEndPoint server ) : WorkerChain

Used to populate the chain based on a list of types

WorkerChain ( ) : System

Method Details

Add() public method

Adds the next Worker to the chain and register it to the previous Worker to the ReceiveData event.
public Add ( Worker worker ) : void
worker Worker
return void

Dispose() public method

Dispose the current chain.
public Dispose ( ) : void
return void

NbClientConn() public static method

public static NbClientConn ( ) : int
return int

NbServerConn() public static method

public static NbServerConn ( ) : int
return int

RemoveLast() public method

public RemoveLast ( ) : void
return void

TcpChain() public static method

Creates a request TCP chain
public static TcpChain ( Gateway gateway, ChainSide side, IPEndPoint client, IPEndPoint server ) : WorkerChain
gateway Gateway
side ChainSide
client System.Net.IPEndPoint
server System.Net.IPEndPoint
return WorkerChain

TcpResponseChain() public static method

Creates a response TCP chains
public static TcpResponseChain ( Gateway gateway, ChainSide side, IPEndPoint client, IPEndPoint server ) : WorkerChain
gateway Gateway
side ChainSide
client System.Net.IPEndPoint
server System.Net.IPEndPoint
return WorkerChain

UdpBeaconReceiver() public static method

public static UdpBeaconReceiver ( Gateway gateway, ChainSide side, IPEndPoint client, List server ) : WorkerChain
gateway Gateway
side ChainSide
client System.Net.IPEndPoint
server List
return WorkerChain

UdpChain() public static method

Creates a request UDP chain
public static UdpChain ( Gateway gateway, ChainSide side, IPEndPoint client, List server ) : WorkerChain
gateway Gateway
side ChainSide
client System.Net.IPEndPoint
server List
return WorkerChain

UdpResponseChain() public static method

Creates a request UDP chain
public static UdpResponseChain ( Gateway gateway, ChainSide side, IPEndPoint client, List server ) : WorkerChain
gateway Gateway
side ChainSide
client System.Net.IPEndPoint
server List
return WorkerChain

UseChain() public method

Link 2 chains together (a client which is connected to an IOC)
public UseChain ( WorkerChain chain ) : void
chain WorkerChain
return void

this() public method

public this ( int key ) : Worker
key int
return Worker

Property Details

ChannelCid public property

public ConcurrentDictionary ChannelCid
return uint>.ConcurrentDictionary

ChannelSubscriptions public property

public ConcurrentDictionary ChannelSubscriptions
return uint>.ConcurrentDictionary

Channels public property

public ObservableConcurrentBag Channels
return ObservableConcurrentBag

ClientEndPoint public property

public IPEndPoint,System.Net ClientEndPoint
return System.Net.IPEndPoint

Gateway public property

public Gateway Gateway
return Gateway

IsDisposed public property

public bool IsDisposed
return bool

IsDisposing public property

public bool IsDisposing
return bool

LastMessage public property

public DateTime,System LastMessage
return System.DateTime

ServerEndPoint public property

public IPEndPoint,System.Net ServerEndPoint
return System.Net.IPEndPoint

Subscriptions public property

public ConcurrentDictionary Subscriptions
return uint>.ConcurrentDictionary