Sha256: e5e752ef8a56395cb8c0882cff73ade0314c69609b073d54949298a62f62570e
Contents?: true
Size: 1011 Bytes
Versions: 10
Compression:
Stored size: 1011 Bytes
Contents
# -*- encoding: utf-8 -*- # Subclasses of URI::Generic to ease working with Stomp URIs. module OnStomp::Components::URI # A URI class for representing URIs with a 'stomp' scheme. class STOMP < ::URI::Generic # The default port to use for these kinds of URI objects when none has # been specified. DEFAULT_PORT = 61613 # The type of socket to use with these kinds of URI objects. # @return [:tcp] def onstomp_socket_type; :tcp; end end # A URI class for representing URIs with a `stomp+ssl` scheme. class STOMP_SSL < STOMP # The default port to use for these kinds of URI objects when none has # been specified. DEFAULT_PORT = 61612 # The type of socket to use with these kinds of URI objects. # @return [:ssl] def onstomp_socket_type; :ssl; end end end # Add the new URI classes to `URI`'s set of known schemes. module ::URI @@schemes['STOMP'] = OnStomp::Components::URI::STOMP @@schemes['STOMP+SSL'] = OnStomp::Components::URI::STOMP_SSL end
Version data entries
10 entries across 10 versions & 1 rubygems