Sha256: f59d04fe76159daf389be3b9e4b2b729891c249cc7317465e2ccdd9fc72ece7f
Contents?: true
Size: 1.32 KB
Versions: 13
Compression:
Stored size: 1.32 KB
Contents
# # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # module Backstage class MessageProcessor include HasMBean include TorqueBoxManaged include Resource def self.filter "torquebox.messaging.processors:*" end def self.to_hash_attributes super + [:name, :app, :app_name, :status, :destination_name, :message_selector, :concurrency] end def name name = super name = $2 if name =~ %r{(/.*)*\.(.*)} name = $1 if name =~ %r{TorqueBox::Messaging::(.*)} name end def destination_name name = super name =~ /\[(.*)\]/ ? $1 : name end def start super self end def stop super self end def available_actions status == 'Started' ? %w{ stop } : %w{ start } end end end
Version data entries
13 entries across 13 versions & 1 rubygems