new PromiseServer()
        Constructor for a Jayson Promise Server
    
    
    
    
    
    
    
- Source:
- See:
Returns:
- Type
- PromiseServer
Extends
Methods
- 
    _resolveRouter(method, params)
- 
    
    Invoke the routerParameters:Name Type Description methodString Method to resolve paramsArray | Object Request params - Inherited From:
- Source:
 Returns:- Type
- Method
 
- 
    call(request [, context] [, originalCallback])
- 
    
    Calls a method on the serverParameters:Name Type Argument Description requestObject | Array | String A JSON-RPC request object. Object for single request, Array for batches and String for automatic parsing (using the reviver option) contextObject <optional> 
 Optional context object passed to methods originalCallbackfunction <optional> 
 Callback that receives one of two arguments: first is an error and the second a response - Inherited From:
- Source:
 
- 
    error( [code] [, message] [, data])
- 
    
    Returns a JSON-RPC compatible error propertyParameters:Name Type Argument Default Description codeNumber <optional> 
 -32603 Error code messageString <optional> 
 "Internal error" Error message dataObject <optional> 
 Additional data that should be provided - Inherited From:
- Source:
 Returns:- Type
- Object
 
- 
    getMethod(name)
- 
    
    Gets a method from the serverParameters:Name Type Description nameString - Inherited From:
- Source:
 Returns:- Type
- Method
 
- 
    hasMethod(name)
- 
    
    Checks if a method is registered with the serverParameters:Name Type Description nameString Name of method - Inherited From:
- Source:
 Returns:- Type
- Boolean
 
- 
    method(name, definition)
- 
    
    Adds a single method to the serverParameters:Name Type Description nameString Name of method to add definitionfunction | Client Function or Client for a relayed method - Inherited From:
- Source:
 Throws:- 
        Invalid parameters
- Type
- TypeError
 
- 
    methods(methods)
- 
    
    Adds a batch of methods to the serverParameters:Name Type Description methodsObject Methods to add - Inherited From:
- Source:
 
- 
    removeMethod(name)
- 
    
    Removes a method from the serverParameters:Name Type Description nameString - Inherited From:
- Source: