Module: ModernTimes
- Defined in:
- lib/modern_times/jms/publisher.rb,
lib/modern_times.rb,
lib/modern_times/jms.rb,
lib/modern_times/manager.rb,
lib/modern_times/loggable.rb,
lib/modern_times/railsable.rb,
lib/modern_times/jms/worker.rb,
lib/modern_times/time_track.rb,
lib/modern_times/base/worker.rb,
lib/modern_times/manager_mbean.rb,
lib/modern_times/jms/connection.rb,
lib/modern_times/jms/supervisor.rb,
lib/modern_times/base/supervisor.rb,
lib/modern_times/marshal_strategy.rb,
lib/modern_times/remote_exception.rb,
lib/modern_times/jms/publish_handle.rb,
lib/modern_times/jms/request_worker.rb,
lib/modern_times/jms/supervisor_mbean.rb,
lib/modern_times/base/supervisor_mbean.rb,
lib/modern_times/marshal_strategy/bson.rb,
lib/modern_times/marshal_strategy/json.rb,
lib/modern_times/marshal_strategy/ruby.rb,
lib/modern_times/marshal_strategy/yaml.rb,
lib/modern_times/marshal_strategy/string.rb
Overview
Defines some default marshaling strategies for use in marshaling/unmarshaling objects written and read via jms. Implementing classes must define the following methods:
# Return symbol
# :text if session.create_text_message should be used to generate the JMS message
# :bytes if session.create_bytes_message should be used to generate the JMS message
def marshal_type
# Return either :text or :bytes
:text
end
# Defines the conversion to wire format by the publisher of the message
def marshal(object)
# Operate on object and convert to message format
end
# Defines the conversion from wire format by the consumer of the message
def unmarshal(msg)
# Operate on message to convert it from wire protocol back to object format
end
Defined Under Namespace
Modules: Base, JMS, Loggable, MarshalStrategy, Railsable Classes: Manager, ManagerMBean, RemoteException, TimeTrack
Constant Summary collapse
- DEFAULT_DOMAIN =
'ModernTimes'
Class Method Summary collapse
- .manager_mbean_name(domain) ⇒ Object
- .manager_mbean_object_name(domain) ⇒ Object
- .supervisor_mbean_object_name(domain, worker_name) ⇒ Object
Methods included from Loggable
default_logger, logger, logger=, rails_logger
Methods included from Railsable
config, create_rails_manager, init_rails, jms_enabled?, rails_workers
Class Method Details
.manager_mbean_name(domain) ⇒ Object
18 19 20 21 |
# File 'lib/modern_times.rb', line 18 def self.manager_mbean_name(domain) domain = DEFAULT_DOMAIN unless domain "#{domain}.Manager" end |
.manager_mbean_object_name(domain) ⇒ Object
23 24 25 26 |
# File 'lib/modern_times.rb', line 23 def self.manager_mbean_object_name(domain) domain = DEFAULT_DOMAIN unless domain "#{domain}:type=Manager" end |
.supervisor_mbean_object_name(domain, worker_name) ⇒ Object
28 29 30 31 |
# File 'lib/modern_times.rb', line 28 def self.supervisor_mbean_object_name(domain, worker_name) domain = DEFAULT_DOMAIN unless domain "#{domain}:worker=#{worker_name},type=Worker" end |