ODataSchemaDispatcher

Overview

The ODATA (see ) Schema Dispatcher is a class that exposes a Data Abstract service as an OData provider. OData is an open specification with standardized ways of accessing, updating, inserting and deleting data and exposing metadata. It has clients on multiple platforms including javascript, PHP, Java, Ruby and .NET. OData is ideal when you need to expose your Data Abstract service to external clients that are unable to use Data Abstract themselves.

Location


 

constructor

Creates a new instance of this class.

 

constructor

 

ODataSchemaDispatcher()

 

Sub New()

Activate    (declared in ExtendedHttpDispatcher)

 

method Activate

 

void Activate()

 

Sub Activate()

add_OnGetSchemaDataTable

 

method add_OnGetSchemaDataTable(value: EventHandler<RestGetSchemaDataTableEventArgs>)

 

void add_OnGetSchemaDataTable(EventHandler<RestGetSchemaDataTableEventArgs> value)

 

Sub add_OnGetSchemaDataTable(value As EventHandler<RestGetSchemaDataTableEventArgs>)

Parameters:

  • value:

add_OnGetServiceSchema

 

method add_OnGetServiceSchema(value: EventHandler<ODataGetServiceSchemaEventArgs>)

 

void add_OnGetServiceSchema(EventHandler<ODataGetServiceSchemaEventArgs> value)

 

Sub add_OnGetServiceSchema(value As EventHandler<ODataGetServiceSchemaEventArgs>)

Parameters:

  • value:

add_OnLoginNeeded

 

method add_OnLoginNeeded(value: EventHandler<RestLoginNeededEventArgs>)

 

void add_OnLoginNeeded(EventHandler<RestLoginNeededEventArgs> value)

 

Sub add_OnLoginNeeded(value As EventHandler<RestLoginNeededEventArgs>)

Parameters:

  • value:

add_OnProcessTargetUrl

 

method add_OnProcessTargetUrl(value: EventHandler<RestProcessTargetUrlEventArgs>)

 

void add_OnProcessTargetUrl(EventHandler<RestProcessTargetUrlEventArgs> value)

 

Sub add_OnProcessTargetUrl(value As EventHandler<RestProcessTargetUrlEventArgs>)

Parameters:

  • value:

add_OnUnknownRequest

 

method add_OnUnknownRequest(value: EventHandler<RestUnknownRequestEventArgs>)

 

void add_OnUnknownRequest(EventHandler<RestUnknownRequestEventArgs> value)

 

Sub add_OnUnknownRequest(value As EventHandler<RestUnknownRequestEventArgs>)

Parameters:

  • value:

CanHandlePath    (declared in ExtendedHttpDispatcher)

Checks if the provided relative HTTP request path can be processed by this dispatcher.

 

method CanHandlePath(path: String): Boolean

 

Boolean CanHandlePath(String path)

 

Function CanHandlePath(path As String) As Boolean

Parameters:

  • path:

Deactivate    (declared in ExtendedHttpDispatcher)

 

method Deactivate

 

void Deactivate()

 

Sub Deactivate()

Dispose  protected    (declared in ExtendedHttpDispatcher)

If the disposing parameter is set to true, this method unregisters this dispatcher instance from the server.

 

method Dispose(disposing: Boolean)

 

void Dispose(Boolean disposing)

 

Sub Dispose(disposing As Boolean)

Parameters:

  • disposing: If set to true, the current dispatcher instance will be unregistered from the server.

HttpAuthLoginServiceName

Name of the service to use for authentication. This can be unassigned in which case no authentication is required. When it's set, the name used should be the name of a SimpleLoginService descendant with a Login method implementation. The Login method is called and cached someone logs through plain HTTP authentication.

 

property HttpAuthLoginServiceName: String read write;

 

String HttpAuthLoginServiceName { get; set; }

 

Property HttpAuthLoginServiceName() As String

HttpAuthRealm

The realm to use during authentication. This is the string the user sees as the domain to which to login.

 

property HttpAuthRealm: String read write;

 

String HttpAuthRealm { get; set; }

 

Property HttpAuthRealm() As String

MaxRecords

Maximum number of records to send in a package. This can be 0 which means unlimited.

 

property MaxRecords: Int32 read write;

 

Int32 MaxRecords { get; set; }

 

Property MaxRecords() As Int32

Namespace

The namespace to use for OData. This could be any url that unique identifies this service.

 

property Namespace: String read write;

 

String Namespace { get; set; }

 

Property Namespace() As String

NotifyDispose    (declared in ExtendedHttpDispatcher)

This method is called when the ExtendedDispatcherList instance where the current instance is registered is disposed.

 

method NotifyDispose

 

void NotifyDispose()

 

Sub NotifyDispose()

OnGetSchemaDataTable

Called when the client requests the schema for a particular data table.

 

event OnGetSchemaDataTable: EventHandler<RestGetSchemaDataTableEventArgs>;

 

delegate EventHandler<RestGetSchemaDataTableEventArgs> OnGetSchemaDataTable()

 

Event OnGetSchemaDataTable As EventHandler<RestGetSchemaDataTableEventArgs>

OnGetServiceSchema

 

event OnGetServiceSchema: EventHandler<ODataGetServiceSchemaEventArgs>;

 

delegate EventHandler<ODataGetServiceSchemaEventArgs> OnGetServiceSchema()

 

Event OnGetServiceSchema As EventHandler<ODataGetServiceSchemaEventArgs>

OnLoginNeeded

 

event OnLoginNeeded: EventHandler<RestLoginNeededEventArgs>;

 

delegate EventHandler<RestLoginNeededEventArgs> OnLoginNeeded()

 

Event OnLoginNeeded As EventHandler<RestLoginNeededEventArgs>

OnProcessTargetUrl

 

event OnProcessTargetUrl: EventHandler<RestProcessTargetUrlEventArgs>;

 

delegate EventHandler<RestProcessTargetUrlEventArgs> OnProcessTargetUrl()

 

Event OnProcessTargetUrl As EventHandler<RestProcessTargetUrlEventArgs>

OnUnknownRequest

Called when a request that is not supported by the OData provider occurs.

 

event OnUnknownRequest: EventHandler<RestUnknownRequestEventArgs>;

 

delegate EventHandler<RestUnknownRequestEventArgs> OnUnknownRequest()

 

Event OnUnknownRequest As EventHandler<RestUnknownRequestEventArgs>

Path    (declared in ExtendedHttpDispatcher)

Gets or sets the relative HTTP path requests that will be processed by the current HttpDispatcher instance.

Path should begin with "/".

 

property Path: String read write;

 

String Path { get; set; }

 

Property Path() As String

Process (IHttpRequest, IHttpResponse, Stream, Stream)    (declared in ExtendedHttpDispatcher)

 

method Process(request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream)

 

void Process(IHttpRequest request, IHttpResponse response, Stream requestData, Stream responseData)

 

Sub Process(request As IHttpRequest, response As IHttpResponse, requestData As Stream, responseData As Stream)

Parameters:

  • request:
  • response:
  • requestData:
  • responseData:

Process (IHttpRequest, IHttpResponse, Stream, Stream)

 

method Process(request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream)

 

void Process(IHttpRequest request, IHttpResponse response, Stream requestData, Stream responseData)

 

Sub Process(request As IHttpRequest, response As IHttpResponse, requestData As Stream, responseData As Stream)

Parameters:

  • request:
  • response:
  • requestData:
  • responseData:

ReleaseSession  protected

 

method ReleaseSession(request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream; sessionId: Guid; releaseSession: Boolean)

 

void ReleaseSession(IHttpRequest request, IHttpResponse response, Stream requestData, Stream responseData, Guid sessionId, Boolean releaseSession)

 

Sub ReleaseSession(request As IHttpRequest, response As IHttpResponse, requestData As Stream, responseData As Stream, sessionId As Guid, releaseSession As Boolean)

Parameters:

  • request:
  • response:
  • requestData:
  • responseData:
  • sessionId:
  • releaseSession:

remove_OnGetSchemaDataTable

 

method remove_OnGetSchemaDataTable(value: EventHandler<RestGetSchemaDataTableEventArgs>)

 

void remove_OnGetSchemaDataTable(EventHandler<RestGetSchemaDataTableEventArgs> value)

 

Sub remove_OnGetSchemaDataTable(value As EventHandler<RestGetSchemaDataTableEventArgs>)

Parameters:

  • value:

remove_OnGetServiceSchema

 

method remove_OnGetServiceSchema(value: EventHandler<ODataGetServiceSchemaEventArgs>)

 

void remove_OnGetServiceSchema(EventHandler<ODataGetServiceSchemaEventArgs> value)

 

Sub remove_OnGetServiceSchema(value As EventHandler<ODataGetServiceSchemaEventArgs>)

Parameters:

  • value:

remove_OnLoginNeeded

 

method remove_OnLoginNeeded(value: EventHandler<RestLoginNeededEventArgs>)

 

void remove_OnLoginNeeded(EventHandler<RestLoginNeededEventArgs> value)

 

Sub remove_OnLoginNeeded(value As EventHandler<RestLoginNeededEventArgs>)

Parameters:

  • value:

remove_OnProcessTargetUrl

 

method remove_OnProcessTargetUrl(value: EventHandler<RestProcessTargetUrlEventArgs>)

 

void remove_OnProcessTargetUrl(EventHandler<RestProcessTargetUrlEventArgs> value)

 

Sub remove_OnProcessTargetUrl(value As EventHandler<RestProcessTargetUrlEventArgs>)

Parameters:

  • value:

remove_OnUnknownRequest

 

method remove_OnUnknownRequest(value: EventHandler<RestUnknownRequestEventArgs>)

 

void remove_OnUnknownRequest(EventHandler<RestUnknownRequestEventArgs> value)

 

Sub remove_OnUnknownRequest(value As EventHandler<RestUnknownRequestEventArgs>)

Parameters:

  • value:

RootUrl

Full url to where this service is or will be hosted. OData requires absolute urls to be placed in the xml and json results, so this is a required property.

 

property RootUrl: String read write;

 

String RootUrl { get; set; }

 

Property RootUrl() As String

Server    (declared in ExtendedHttpDispatcher)

The IHttpServer instance this dispatcher is registered in.

The ExtendedHttpDispatcher instance is automatically registered in the provided IHttpServer instance's extended dispatchers list when this property is set.

 

property Server: IHttpServer read write;

 

IHttpServer Server { get; set; }

 

Property Server() As IHttpServer

ServiceName

Data Abstract DataAbstractService descendant to use to access the data. This will be your main Data Abstract service that has the schema and business logic you want to expose through this OData schema dispatcher class.

 

property ServiceName: String read write;

 

String ServiceName { get; set; }

 

Property ServiceName() As String

SessionManager

 

property SessionManager: ISessionManager read write;

 

ISessionManager SessionManager { get; set; }

 

Property SessionManager() As ISessionManager

TryAcquireSesssion  protected

 

method TryAcquireSesssion(request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream; writeNotAuthorized: Action; writeGenericError: Action<String>; out sessionId: Guid; out releaseSession: Boolean): Boolean

 

Boolean TryAcquireSesssion(IHttpRequest request, IHttpResponse response, Stream requestData, Stream responseData, Action writeNotAuthorized, Action<String> writeGenericError, out Guid sessionId, out Boolean releaseSession)

 

Function TryAcquireSesssion(request As IHttpRequest, response As IHttpResponse, requestData As Stream, responseData As Stream, writeNotAuthorized As Action, writeGenericError As Action<String>, <OutAttribute> ByRef sessionId As Guid, <OutAttribute> ByRef releaseSession As Boolean) As Boolean

Parameters:

  • request:
  • response:
  • requestData:
  • responseData:
  • writeNotAuthorized:
  • writeGenericError:
  • sessionId:
  • releaseSession:

 

HttpAuthLoginServiceName

Name of the service to use for authentication. This can be unassigned in which case no authentication is required. When it's set, the name used should be the name of a SimpleLoginService descendant with a Login method implementation. The Login method is called and cached someone logs through plain HTTP authentication.

 

property HttpAuthLoginServiceName: String read write;

 

String HttpAuthLoginServiceName { get; set; }

 

Property HttpAuthLoginServiceName() As String

HttpAuthRealm

The realm to use during authentication. This is the string the user sees as the domain to which to login.

 

property HttpAuthRealm: String read write;

 

String HttpAuthRealm { get; set; }

 

Property HttpAuthRealm() As String

MaxRecords

Maximum number of records to send in a package. This can be 0 which means unlimited.

 

property MaxRecords: Int32 read write;

 

Int32 MaxRecords { get; set; }

 

Property MaxRecords() As Int32

Namespace

The namespace to use for OData. This could be any url that unique identifies this service.

 

property Namespace: String read write;

 

String Namespace { get; set; }

 

Property Namespace() As String

Path    (declared in ExtendedHttpDispatcher)

Gets or sets the relative HTTP path requests that will be processed by the current HttpDispatcher instance.

Path should begin with "/".

 

property Path: String read write;

 

String Path { get; set; }

 

Property Path() As String

RootUrl

Full url to where this service is or will be hosted. OData requires absolute urls to be placed in the xml and json results, so this is a required property.

 

property RootUrl: String read write;

 

String RootUrl { get; set; }

 

Property RootUrl() As String

Server    (declared in ExtendedHttpDispatcher)

The IHttpServer instance this dispatcher is registered in.

The ExtendedHttpDispatcher instance is automatically registered in the provided IHttpServer instance's extended dispatchers list when this property is set.

 

property Server: IHttpServer read write;

 

IHttpServer Server { get; set; }

 

Property Server() As IHttpServer

ServiceName

Data Abstract DataAbstractService descendant to use to access the data. This will be your main Data Abstract service that has the schema and business logic you want to expose through this OData schema dispatcher class.

 

property ServiceName: String read write;

 

String ServiceName { get; set; }

 

Property ServiceName() As String

SessionManager

 

property SessionManager: ISessionManager read write;

 

ISessionManager SessionManager { get; set; }

 

Property SessionManager() As ISessionManager

 

constructor

Creates a new instance of this class.

 

constructor

 

ODataSchemaDispatcher()

 

Sub New()

Activate    (declared in ExtendedHttpDispatcher)

 

method Activate

 

void Activate()

 

Sub Activate()

add_OnGetSchemaDataTable

 

method add_OnGetSchemaDataTable(value: EventHandler<RestGetSchemaDataTableEventArgs>)

 

void add_OnGetSchemaDataTable(EventHandler<RestGetSchemaDataTableEventArgs> value)

 

Sub add_OnGetSchemaDataTable(value As EventHandler<RestGetSchemaDataTableEventArgs>)

Parameters:

  • value:

add_OnGetServiceSchema

 

method add_OnGetServiceSchema(value: EventHandler<ODataGetServiceSchemaEventArgs>)

 

void add_OnGetServiceSchema(EventHandler<ODataGetServiceSchemaEventArgs> value)

 

Sub add_OnGetServiceSchema(value As EventHandler<ODataGetServiceSchemaEventArgs>)

Parameters:

  • value:

add_OnLoginNeeded

 

method add_OnLoginNeeded(value: EventHandler<RestLoginNeededEventArgs>)

 

void add_OnLoginNeeded(EventHandler<RestLoginNeededEventArgs> value)

 

Sub add_OnLoginNeeded(value As EventHandler<RestLoginNeededEventArgs>)

Parameters:

  • value:

add_OnProcessTargetUrl

 

method add_OnProcessTargetUrl(value: EventHandler<RestProcessTargetUrlEventArgs>)

 

void add_OnProcessTargetUrl(EventHandler<RestProcessTargetUrlEventArgs> value)

 

Sub add_OnProcessTargetUrl(value As EventHandler<RestProcessTargetUrlEventArgs>)

Parameters:

  • value:

add_OnUnknownRequest

 

method add_OnUnknownRequest(value: EventHandler<RestUnknownRequestEventArgs>)

 

void add_OnUnknownRequest(EventHandler<RestUnknownRequestEventArgs> value)

 

Sub add_OnUnknownRequest(value As EventHandler<RestUnknownRequestEventArgs>)

Parameters:

  • value:

CanHandlePath    (declared in ExtendedHttpDispatcher)

Checks if the provided relative HTTP request path can be processed by this dispatcher.

 

method CanHandlePath(path: String): Boolean

 

Boolean CanHandlePath(String path)

 

Function CanHandlePath(path As String) As Boolean

Parameters:

  • path:

Deactivate    (declared in ExtendedHttpDispatcher)

 

method Deactivate

 

void Deactivate()

 

Sub Deactivate()

Dispose  protected    (declared in ExtendedHttpDispatcher)

If the disposing parameter is set to true, this method unregisters this dispatcher instance from the server.

 

method Dispose(disposing: Boolean)

 

void Dispose(Boolean disposing)

 

Sub Dispose(disposing As Boolean)

Parameters:

  • disposing: If set to true, the current dispatcher instance will be unregistered from the server.

NotifyDispose    (declared in ExtendedHttpDispatcher)

This method is called when the ExtendedDispatcherList instance where the current instance is registered is disposed.

 

method NotifyDispose

 

void NotifyDispose()

 

Sub NotifyDispose()

Process (IHttpRequest, IHttpResponse, Stream, Stream)    (declared in ExtendedHttpDispatcher)

 

method Process(request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream)

 

void Process(IHttpRequest request, IHttpResponse response, Stream requestData, Stream responseData)

 

Sub Process(request As IHttpRequest, response As IHttpResponse, requestData As Stream, responseData As Stream)

Parameters:

  • request:
  • response:
  • requestData:
  • responseData:

Process (IHttpRequest, IHttpResponse, Stream, Stream)

 

method Process(request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream)

 

void Process(IHttpRequest request, IHttpResponse response, Stream requestData, Stream responseData)

 

Sub Process(request As IHttpRequest, response As IHttpResponse, requestData As Stream, responseData As Stream)

Parameters:

  • request:
  • response:
  • requestData:
  • responseData:

ReleaseSession  protected

 

method ReleaseSession(request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream; sessionId: Guid; releaseSession: Boolean)

 

void ReleaseSession(IHttpRequest request, IHttpResponse response, Stream requestData, Stream responseData, Guid sessionId, Boolean releaseSession)

 

Sub ReleaseSession(request As IHttpRequest, response As IHttpResponse, requestData As Stream, responseData As Stream, sessionId As Guid, releaseSession As Boolean)

Parameters:

  • request:
  • response:
  • requestData:
  • responseData:
  • sessionId:
  • releaseSession:

remove_OnGetSchemaDataTable

 

method remove_OnGetSchemaDataTable(value: EventHandler<RestGetSchemaDataTableEventArgs>)

 

void remove_OnGetSchemaDataTable(EventHandler<RestGetSchemaDataTableEventArgs> value)

 

Sub remove_OnGetSchemaDataTable(value As EventHandler<RestGetSchemaDataTableEventArgs>)

Parameters:

  • value:

remove_OnGetServiceSchema

 

method remove_OnGetServiceSchema(value: EventHandler<ODataGetServiceSchemaEventArgs>)

 

void remove_OnGetServiceSchema(EventHandler<ODataGetServiceSchemaEventArgs> value)

 

Sub remove_OnGetServiceSchema(value As EventHandler<ODataGetServiceSchemaEventArgs>)

Parameters:

  • value:

remove_OnLoginNeeded

 

method remove_OnLoginNeeded(value: EventHandler<RestLoginNeededEventArgs>)

 

void remove_OnLoginNeeded(EventHandler<RestLoginNeededEventArgs> value)

 

Sub remove_OnLoginNeeded(value As EventHandler<RestLoginNeededEventArgs>)

Parameters:

  • value:

remove_OnProcessTargetUrl

 

method remove_OnProcessTargetUrl(value: EventHandler<RestProcessTargetUrlEventArgs>)

 

void remove_OnProcessTargetUrl(EventHandler<RestProcessTargetUrlEventArgs> value)

 

Sub remove_OnProcessTargetUrl(value As EventHandler<RestProcessTargetUrlEventArgs>)

Parameters:

  • value:

remove_OnUnknownRequest

 

method remove_OnUnknownRequest(value: EventHandler<RestUnknownRequestEventArgs>)

 

void remove_OnUnknownRequest(EventHandler<RestUnknownRequestEventArgs> value)

 

Sub remove_OnUnknownRequest(value As EventHandler<RestUnknownRequestEventArgs>)

Parameters:

  • value:

TryAcquireSesssion  protected

 

method TryAcquireSesssion(request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream; writeNotAuthorized: Action; writeGenericError: Action<String>; out sessionId: Guid; out releaseSession: Boolean): Boolean

 

Boolean TryAcquireSesssion(IHttpRequest request, IHttpResponse response, Stream requestData, Stream responseData, Action writeNotAuthorized, Action<String> writeGenericError, out Guid sessionId, out Boolean releaseSession)

 

Function TryAcquireSesssion(request As IHttpRequest, response As IHttpResponse, requestData As Stream, responseData As Stream, writeNotAuthorized As Action, writeGenericError As Action<String>, <OutAttribute> ByRef sessionId As Guid, <OutAttribute> ByRef releaseSession As Boolean) As Boolean

Parameters:

  • request:
  • response:
  • requestData:
  • responseData:
  • writeNotAuthorized:
  • writeGenericError:
  • sessionId:
  • releaseSession:

 

OnGetSchemaDataTable

Called when the client requests the schema for a particular data table.

 

event OnGetSchemaDataTable: EventHandler<RestGetSchemaDataTableEventArgs>;

 

delegate EventHandler<RestGetSchemaDataTableEventArgs> OnGetSchemaDataTable()

 

Event OnGetSchemaDataTable As EventHandler<RestGetSchemaDataTableEventArgs>

OnGetServiceSchema

 

event OnGetServiceSchema: EventHandler<ODataGetServiceSchemaEventArgs>;

 

delegate EventHandler<ODataGetServiceSchemaEventArgs> OnGetServiceSchema()

 

Event OnGetServiceSchema As EventHandler<ODataGetServiceSchemaEventArgs>

OnLoginNeeded

 

event OnLoginNeeded: EventHandler<RestLoginNeededEventArgs>;

 

delegate EventHandler<RestLoginNeededEventArgs> OnLoginNeeded()

 

Event OnLoginNeeded As EventHandler<RestLoginNeededEventArgs>

OnProcessTargetUrl

 

event OnProcessTargetUrl: EventHandler<RestProcessTargetUrlEventArgs>;

 

delegate EventHandler<RestProcessTargetUrlEventArgs> OnProcessTargetUrl()

 

Event OnProcessTargetUrl As EventHandler<RestProcessTargetUrlEventArgs>

OnUnknownRequest

Called when a request that is not supported by the OData provider occurs.

 

event OnUnknownRequest: EventHandler<RestUnknownRequestEventArgs>;

 

delegate EventHandler<RestUnknownRequestEventArgs> OnUnknownRequest()

 

Event OnUnknownRequest As EventHandler<RestUnknownRequestEventArgs>