class Qpid::Proton::Endpoint

Endpoint is the parent classes for Link and Session.

It provides a namespace for constant values that relate to the current state of both links and sessions.

@example

conn = Qpid::Proton::Connection.new
puts "Local connection flags : #{conn.state || Qpid::Proton::Endpoint::LOCAL_MASK}"
puts "Remote connection flags: #{conn.state || Qpid::Proton::Endpoint::REMOTE_MASK}"

Constants

LOCAL_ACTIVE

The local connection is active.

LOCAL_CLOSED

The local connection is closed.

LOCAL_MASK

Bitmask for the local-only flags.

LOCAL_UNINIT

The local connection is uninitialized.

REMOTE_ACTIVE

The remote connection is active.

REMOTE_CLOSED

The remote connection is closed.

REMOTE_MASK

Bitmask for the remote-only flags.

REMOTE_UNINIT

The remote connection is unitialized.

Public Instance Methods

check_state(mask) click to toggle source

@private @return [Bool] true if {#state} has all the bits of `mask` set

# File lib/core/endpoint.rb, line 75
def check_state(mask) (self.state & mask) == mask; end
closed?() click to toggle source

@return [Bool] true if endpoint has sent and received a CLOSE frame

# File lib/core/endpoint.rb, line 78
def closed?() check_state(LOCAL_CLOSED | REMOTE_CLOSED); end
condition() click to toggle source

@private

# File lib/core/endpoint.rb, line 56
def condition; remote_condition || local_condition; end
local_active?()
Alias for: local_open?
local_closed?() click to toggle source
# File lib/core/endpoint.rb, line 91
def local_closed?
  check_state(LOCAL_CLOSED)
end
local_condition() click to toggle source

@private

# File lib/core/endpoint.rb, line 60
def local_condition; Condition.convert(_local_condition); end
local_open?() click to toggle source
# File lib/core/endpoint.rb, line 87
def local_open?
  check_state(LOCAL_ACTIVE)
end
Also aliased as: local_active?
local_uninit?() click to toggle source
# File lib/core/endpoint.rb, line 83
def local_uninit?
  check_state(LOCAL_UNINIT)
end
open?() click to toggle source

@return [Bool] true if endpoint has sent and received an OPEN frame

# File lib/core/endpoint.rb, line 81
def open?() check_state(LOCAL_ACTIVE | REMOTE_ACTIVE); end
remote_active?()
Alias for: remote_open?
remote_closed?() click to toggle source
# File lib/core/endpoint.rb, line 103
def remote_closed?
  check_state(REMOTE_CLOSED)
end
remote_condition() click to toggle source

@private

# File lib/core/endpoint.rb, line 58
def remote_condition; Condition.convert(_remote_condition); end
remote_open?() click to toggle source
# File lib/core/endpoint.rb, line 99
def remote_open?
  check_state(REMOTE_ACTIVE)
end
Also aliased as: remote_active?
remote_uninit?() click to toggle source
# File lib/core/endpoint.rb, line 95
def remote_uninit?
  check_state(REMOTE_UNINIT)
end
transport() click to toggle source

Return the transport associated with this endpoint.

@return [Transport] The transport.

# File lib/core/endpoint.rb, line 66
def transport
  self.connection.transport
end
work_queue() click to toggle source

@return [WorkQueue] the work queue for work on this endpoint.

# File lib/core/endpoint.rb, line 71
def work_queue() connection.work_queue; end