Module: Stomp11Common

### Home Classes Methods

### In Files

- examples/stomp11_common.rb

### Methods

- #get_connection
- #host
- #login
- #nmsgs
- #passcode
- #port
- #virt_host

### Files

- CHANGELOG.rdoc
- LICENSE

### Class/Module Index

Quicksearch

- Stomp
- Stomp::Client
- Stomp::Connection
- Stomp::Error
- Stomp::Error::ConnectReadTimeout
- Stomp::Error::DuplicateSubscription
- Stomp::Error::InvalidFormat
- Stomp::Error::InvalidHeartBeatHeaderError
- Stomp::Error::InvalidMessageLength
- Stomp::Error::InvalidServerCommand
- Stomp::Error::LoggerConnectionError
- Stomp::Error::MalformedFailoverOptionsError
- Stomp::Error::MaxReconnectAttempts
- Stomp::Error::MessageIDRequiredError
- Stomp::Error::NilMessageError
- Stomp::Error::NoCurrentConnection
- Stomp::Error::PacketParsingTimeout
- Stomp::Error::ProtocolError11p
- Stomp::Error::ProtocolErrorConnect
- Stomp::Error::SSLClientParamsError
- Stomp::Error::SSLNoCertFileError
- Stomp::Error::SSLNoKeyFileError
- Stomp::Error::SSLNoTruststoreFileError
- Stomp::Error::SSLUnreadableCertFileError
- Stomp::Error::SSLUnreadableKeyFileError
- Stomp::Error::SSLUnreadableTruststoreFileError
- Stomp::Error::SocketOpenTimeout
- Stomp::Error::StompServerError
- Stomp::Error::SubscriptionRequiredError
- Stomp::Error::UTF8ValidationError
- Stomp::Error::UnsupportedProtocolError
- Stomp::HeaderCodec
- Stomp::Message
- Stomp::SSLParams
- Client11Example1
- Client11PutGet1
- Connection11Example1
- Connection11Example2
- ExampleConsumer
- ExamplePublisher
- ExampleRubyCiphers
- ExampleSSL1
- ExampleSSL1C
- ExampleSSL2
- ExampleSSL2C
- ExampleSSL3
- ExampleSSL3C
- ExampleSSL4
- ExampleSSL4C
- ExampleTopicConsumer
- ExampleTopicPublisher
- Hash
- HeartBeatExample1
- LoggerExample
- Object
- Publish11Example1
- Receive11Example1
- Receive11Example2
- RepeatedHeadersExample
- SSLLoggerExample
- Slogger
- Stomp11Common
- TestBase
- TestClient
- TestConnection
- TestConnection1P
- TestMessage
- TestSSL
- TestURLLogins
- Tlogger

No matching classes.

# Stomp11Common

### Public Instance Methods

get_connection() click to toggle source

Create a 1.1 commection

    # File examples/stomp11_common.rb, line 30
    def get_connection()
      conn_hdrs = {"accept-version" => "1.1",    # 1.1 only
        "host" => virt_host,                     # the vhost
      }
      conn_hash = { :hosts => [
        {:login => login, :passcode => passcode, :host => host, :port => port},
        ],
        :connect_headers => conn_hdrs,
      }
      conn = Stomp::Connection.new(conn_hash)
    end

host() click to toggle source

Server host

    # File examples/stomp11_common.rb, line 18
    def host()
      ENV['STOMP_HOST'] || "localhost" # The connect host name
    end

login() click to toggle source

User id

    # File examples/stomp11_common.rb, line 10
    def login()
      ENV['STOMP_USER'] || 'guest'
    end

nmsgs() click to toggle source

Number of messages

    # File examples/stomp11_common.rb, line 43
    def nmsgs()
      (ENV['STOMP_NMSGS'] || 1).to_i # Number of messages
    end

passcode() click to toggle source

Password

    # File examples/stomp11_common.rb, line 14
    def passcode()
      ENV['STOMP_PASSCODE'] || 'guest'
    end

port() click to toggle source

Server port

    # File examples/stomp11_common.rb, line 22
    def port()
      (ENV['STOMP_PORT'] || 62613).to_i # !! The author runs Apollo listening here
    end

virt_host() click to toggle source

Required vhost name

    # File examples/stomp11_common.rb, line 26
    def virt_host()
      ENV['STOMP_VHOST'] || "localhost" # The 1.1 virtual host name
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.