class Hoodoo::Services::Middleware::InterResourceLocal
This is an endpoint which the middleware uses for inter-resource calls back calling back to that same middleware instance, for resources which exist within the same service application. The middleware manages all the inter-resource preparation and post processing.
Public Instance Methods
See Hoodoo::Client::Endpoint#create
.
# File lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb, line 85 def create( body_hash, query_hash = nil ) return @middleware.inter_resource_local( :source_interaction => self.interaction(), :discovery_result => @discovery_result, :endpoint => self, :action => :create, :body_hash => body_hash, :query_hash => query_hash ) end
See Hoodoo::Client::Endpoint#delete
.
# File lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb, line 116 def delete( ident, query_hash = nil ) return @middleware.inter_resource_local( :source_interaction => self.interaction(), :discovery_result => @discovery_result, :endpoint => self, :action => :delete, :ident => ident, :query_hash => query_hash ) end
See Hoodoo::Client::Endpoint#list
.
# File lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb, line 55 def list( query_hash = nil ) result = @middleware.inter_resource_local( :source_interaction => self.interaction(), :discovery_result => @discovery_result, :endpoint => self, :action => :list, :query_hash => query_hash ) return inject_enumeration_state( result, query_hash ) end
See Hoodoo::Client::Endpoint#show
.
# File lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb, line 70 def show( ident, query_hash = nil ) return @middleware.inter_resource_local( :source_interaction => self.interaction(), :discovery_result => @discovery_result, :endpoint => self, :action => :show, :ident => ident, :query_hash => query_hash ) end
See Hoodoo::Client::Endpoint#update
.
# File lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb, line 100 def update( ident, body_hash, query_hash = nil ) return @middleware.inter_resource_local( :source_interaction => self.interaction(), :discovery_result => @discovery_result, :endpoint => self, :action => :update, :ident => ident, :body_hash => body_hash, :query_hash => query_hash ) end
Protected Instance Methods
See Hoodoo::Client::Endpoint#configure_with
.
It isn’t expected that anyone will ever need to use this class beyond Hoodoo::Services::Middleware
, but you never know…
Configuration option keys which must be supplied are:
interaction
-
A
Hoodoo::Services::Middleware::Interaction
instance which describes the source interaction at hand. This is a middleware concept; the middleware is handling some API call which the source interaction data describes, but the resource which is handling the call needs to make a local inter-resource call, which is why this Endpoint subclass instance is needed. discovery_result
-
A
Hoodoo::Services::Discovery::ForLocal
instance describing the locally available resource endpoint.
# File lib/hoodoo/services/middleware/endpoints/inter_resource_local.rb, line 47 def configure_with( resource, version, options ) @middleware = self.interaction().owning_middleware_instance end