-###*
-* @name Remote
-* @module Remote
-* @description
-*
-* Remotes let you remotely use Contexts
-###
 class Remote
+
+  @ALLOWED_RPC_OPERATIONS: [
+    'command'
+    'query'
+    'findAllDomainEvents'
+    'findDomainEventsByName'
+    'findDomainEventsByAggregateId'
+    'findDomainEventsByAggregateName'
+    'findDomainEventsByNameAndAggregateId'
+  ]
 
   constructor: (@_contextName, @_eventric) ->
     @name = @_contextName

    @projectionService.initializeInstance projectionName, @_projectionClasses[projectionName], params, @


  ###*
  * @name getProjectionInstance
  * @module Remote
  * @description Get a Projection Instance
  *
  * @param {String} projectionId ProjectionId
  ###
  getProjectionInstance: (projectionId) ->
    @projectionService.getInstance projectionId


  ###*
  * @name destroyProjectionInstance
  * @module Remote
  * @description Destroy a ProjectionInstance
  *
  * @param {String} projectionId ProjectionId
  ###

  destroyProjectionInstance: (projectionId) ->
    @projectionService.destroyInstance projectionId, @

      params: Array.prototype.slice.call params


  addClient: (clientName, client) ->
    @_clients[clientName] = client
    @


  getClient: (clientName) ->
    @_clients[clientName]


  addProjection: (projectionName, projectionClass) ->
    @_projectionClasses[projectionName] = projectionClass
    @


  initializeProjection: (projectionObject, params) ->
    @projectionService.initializeInstance '', projectionObject, params, @


  initializeProjectionInstance: (projectionName, params) ->
    if not @_projectionClasses[projectionName]
      err = "Given projection #{projectionName} not registered on remote"
