Show / Hide Table of Contents

Class WorkHandler

Represents a base for all work handlers. Handlers are final work execution destination

Inheritance
System.Object
DisposableObject
ApplicationComponent
WorkHandler
CompositeHandler
ContextDumpHandler
EmbeddedSiteHandler
FileDownloadHandler
NOPHandler
TypeLookupHandler<TTarget>
Implements
IApplicationComponent
System.IDisposable
INamed
IOrdered
Inherited Members
ApplicationComponent.AllComponents
ApplicationComponent.GetAppComponentBySID(UInt64)
ApplicationComponent.GetAppComponentByCommonName(String)
ApplicationComponent.ComponentSID
ApplicationComponent.ComponentStartTime
ApplicationComponent.ComponentCommonName
ApplicationComponent.ComponentDirector
DisposableObject.DisposeAndNull<T>(T)
DisposableObject.DisposeStarted
DisposableObject.Disposed
DisposableObject.EnsureObjectNotDisposed()
DisposableObject.Dispose()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: NFX.Wave
Assembly: NFX.Wave.dll
Syntax
public abstract class WorkHandler : ApplicationComponent, IApplicationComponent, IDisposable, INamed, IOrdered

Constructors

WorkHandler(WorkDispatcher, IConfigSectionNode)

Declaration
protected WorkHandler(WorkDispatcher dispatcher, IConfigSectionNode confNode)
Parameters
Type Name Description
WorkDispatcher dispatcher
IConfigSectionNode confNode

WorkHandler(WorkDispatcher, String, Int32, WorkMatch)

Declaration
protected WorkHandler(WorkDispatcher dispatcher, string name, int order, WorkMatch match)
Parameters
Type Name Description
WorkDispatcher dispatcher
System.String name
System.Int32 order
WorkMatch match

Fields

CONFIG_HANDLER_SECTION

Declaration
public const string CONFIG_HANDLER_SECTION = "handler"
Field Value
Type Description
System.String

Properties

Dispatcher

Returns the dispatcher that this handler works under

Declaration
public WorkDispatcher Dispatcher { get; }
Property Value
Type Description
WorkDispatcher

Filters

Returns ordered registry of filters

Declaration
public IRegistry<WorkFilter> Filters { get; }
Property Value
Type Description
IRegistry<WorkFilter>

Matches

Returns matches used by this handler. May change the registry at runtime (inject/remove matches)

Declaration
public OrderedRegistry<WorkMatch> Matches { get; }
Property Value
Type Description
OrderedRegistry<WorkMatch>

Name

Returns the handler instance name

Declaration
public string Name { get; }
Property Value
Type Description
System.String

NetGate

Returns network gate that handler implementation may use to set business variables or null

Declaration
public INetGate NetGate { get; }
Property Value
Type Description
INetGate

Order

Returns the handler order in handler registry. Order is used for URI pattern matching

Declaration
public int Order { get; }
Property Value
Type Description
System.Int32

ParentHandler

Returns parent handler that this handler is under or null

Declaration
public WorkHandler ParentHandler { get; }
Property Value
Type Description
WorkHandler

Server

Returns the server that this handler works under

Declaration
public WaveServer Server { get; }
Property Value
Type Description
WaveServer

Methods

Destructor()

Declaration
protected override void Destructor()
Overrides
ApplicationComponent.Destructor()

DoHandleWork(WorkContext)

Override to handle the work - i.e. render a template page or call MVC controller method. Note: This method is re-entrant by multiple threads

Declaration
protected abstract void DoHandleWork(WorkContext work)
Parameters
Type Name Description
WorkContext work

FilterAndHandleWork(WorkContext)

Handles the work - first involes all filters then calls HandleWork to do actual processing Note: This method is re-entrant by multiple threads

Declaration
public void FilterAndHandleWork(WorkContext work)
Parameters
Type Name Description
WorkContext work

HandleWork(WorkContext)

Handles the work - i.e. renders a template page or calls MVC controller method. This method does not pass through handler's filters Note: This method is re-entrant by multiple threads

Declaration
public void HandleWork(WorkContext work)
Parameters
Type Name Description
WorkContext work

MakeMatch(WorkContext)

Returns true when the particular work request matches the pattern match of this handler. Also sets the WorkHandler's MatchedVars property filled with matched values

Declaration
public virtual bool MakeMatch(WorkContext work)
Parameters
Type Name Description
WorkContext work
Returns
Type Description
System.Boolean

RegisterFilter(WorkFilter)

Registers filter and returns true if the named instance has not been registered yet Note: it is possible to call this method on active server that is - inject filters while serving requests

Declaration
public bool RegisterFilter(WorkFilter filter)
Parameters
Type Name Description
WorkFilter filter
Returns
Type Description
System.Boolean

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

UnRegisterFilter(WorkFilter)

Unregisters filter and returns true if the named instance has been removed Note: it is possible to call this method on active server that is - remove filters while serving requests

Declaration
public bool UnRegisterFilter(WorkFilter filter)
Parameters
Type Name Description
WorkFilter filter
Returns
Type Description
System.Boolean

Implements

IApplicationComponent
System.IDisposable
INamed
IOrdered

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX