C# 클래스 MSA.Zmq.JsonRpc.Worker

상속: JsonRpcZmqBase
파일 보기 프로젝트 열기: kadekcipta/ZmqJsonRpc

공개 메소드들

메소드 설명
AddRequestProcessor ( IRequestProcessor processor ) : void

Add the pre-processor for request, for example the authentication processor

AddTaskHandler ( TaskHandlerDescriptor taskHandlerDescriptor ) : void
AddTaskHandler ( object taskHandlerDescriptorInstance, string endpointPrefix ) : void
BeginSuspend ( ) : void
Create ( string address, uint servicePort, ZmqContext context = null ) : Worker
Create ( string address, uint servicePort, string workerId, ZmqContext context = null ) : Worker
EndSuspend ( ) : void
GetAvailableTasks ( ) : IList
RemoveAllResolvers ( ) : void
SetMethodCallAuthorizer ( IMethodCallAuthorizer methodCallAuthorizer ) : void
SetMethodCallLogger ( IMethodCallLogger methodCallLogger ) : void
Start ( ) : void

Loop threads for publisher and replyer

비공개 메소드들

메소드 설명
AuthorizeMethod ( JsonRpcRequestHeader requestHeader, JsonRpcRequest request, string requiredRoles ) : void
LogMethodCall ( JsonRpcRequestHeader requestHeader, JsonRpcRequest request ) : void

Logs method invocation

OnStarted ( ) : void

Dispatcher for started event

OnStopped ( ) : void

Dispatcher for stopped event

PreprocessRequest ( JsonRpcRequestHeader requestHeader, JsonRpcRequest request ) : void

Any preprocessing could be handled here. E.g decrypt, unzipped etc

ProcessRequest ( JsonRpcRequestHeader requestHeader, string requestJson ) : string

Process the request and all the responses (including errors) will be wrapped in json response The resolver will perform necessary checking against the request based on custom method attributes being requested and request information

StartHandleRequest ( uint port ) : void

Need framing here to separate the JSON data and the command/instruction | COMMAND | HEADER | JSON DATA |

ValidateRequest ( JsonRpcRequest request ) : void
Worker ( string address, uint servicePort, string workerId, ZmqContext context = null ) : System

메소드 상세

AddRequestProcessor() 공개 메소드

Add the pre-processor for request, for example the authentication processor
public AddRequestProcessor ( IRequestProcessor processor ) : void
processor IRequestProcessor
리턴 void

AddTaskHandler() 공개 메소드

public AddTaskHandler ( TaskHandlerDescriptor taskHandlerDescriptor ) : void
taskHandlerDescriptor TaskHandlerDescriptor
리턴 void

AddTaskHandler() 공개 메소드

public AddTaskHandler ( object taskHandlerDescriptorInstance, string endpointPrefix ) : void
taskHandlerDescriptorInstance object
endpointPrefix string
리턴 void

BeginSuspend() 공개 메소드

public BeginSuspend ( ) : void
리턴 void

Create() 공개 정적인 메소드

public static Create ( string address, uint servicePort, ZmqContext context = null ) : Worker
address string
servicePort uint
context ZmqContext
리턴 Worker

Create() 공개 정적인 메소드

public static Create ( string address, uint servicePort, string workerId, ZmqContext context = null ) : Worker
address string
servicePort uint
workerId string
context ZmqContext
리턴 Worker

EndSuspend() 공개 메소드

public EndSuspend ( ) : void
리턴 void

GetAvailableTasks() 공개 메소드

public GetAvailableTasks ( ) : IList
리턴 IList

RemoveAllResolvers() 공개 메소드

public RemoveAllResolvers ( ) : void
리턴 void

SetMethodCallAuthorizer() 공개 메소드

public SetMethodCallAuthorizer ( IMethodCallAuthorizer methodCallAuthorizer ) : void
methodCallAuthorizer IMethodCallAuthorizer
리턴 void

SetMethodCallLogger() 공개 메소드

public SetMethodCallLogger ( IMethodCallLogger methodCallLogger ) : void
methodCallLogger IMethodCallLogger
리턴 void

Start() 공개 메소드

Loop threads for publisher and replyer
public Start ( ) : void
리턴 void