Sha256: 62e1d378891a6f26b61245868366b6eeffd05296b337464fff13cb63328e50ca

Contents?: true

Size: 961 Bytes

Versions: 13

Compression:

Stored size: 961 Bytes

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
  module TorqueBoxManaged
    def name
      return mbean.name if mbean.respond_to?( :name )
      $1 if full_name =~ /name=(.*?)(,|$)/
    end

    def app_name
      $1 if full_name =~ /app=(.*?)(,|$)/
    end

    def app
      App.find( "torquebox.apps:name=#{app_name}" )
    end
    
    def status
      mbean.status.downcase.capitalize
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
torquebox-backstage-1.1.2 lib/torquebox_managed.rb
torquebox-backstage-1.1.1 lib/torquebox_managed.rb
torquebox-backstage-1.1.0 lib/torquebox_managed.rb
torquebox-backstage-1.0.7 lib/torquebox_managed.rb
torquebox-backstage-1.0.6 lib/torquebox_managed.rb
torquebox-backstage-1.0.5 lib/torquebox_managed.rb
torquebox-backstage-1.0.4 lib/torquebox_managed.rb
torquebox-backstage-1.0.3 lib/torquebox_managed.rb
torquebox-backstage-1.0.2 lib/torquebox_managed.rb
torquebox-backstage-1.0.1 lib/torquebox_managed.rb
torquebox-backstage-1.0.0 lib/torquebox_managed.rb
torquebox-backstage-1.0.0.beta2 lib/torquebox_managed.rb
torquebox-backstage-1.0.0.beta1 lib/torquebox_managed.rb