Class: Qpid::Proton::Endpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/core/endpoint.rb

Overview

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.

Examples:


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}"

Direct Known Subclasses

Connection, Link, Session

Constant Summary

LOCAL_UNINIT =

The local connection is uninitialized.

Cproton::PN_LOCAL_UNINIT
LOCAL_ACTIVE =

The local connection is active.

Cproton::PN_LOCAL_ACTIVE
LOCAL_CLOSED =

The local connection is closed.

Cproton::PN_LOCAL_CLOSED
REMOTE_UNINIT =

The remote connection is unitialized.

Cproton::PN_REMOTE_UNINIT
REMOTE_ACTIVE =

The remote connection is active.

Cproton::PN_REMOTE_ACTIVE
REMOTE_CLOSED =

The remote connection is closed.

Cproton::PN_REMOTE_CLOSED
LOCAL_MASK =

Bitmask for the local-only flags.

Cproton::PN_LOCAL_UNINIT | Cproton::PN_LOCAL_ACTIVE | Cproton::PN_LOCAL_CLOSED
REMOTE_MASK =

Bitmask for the remote-only flags.

Cproton::PN_REMOTE_UNINIT | Cproton::PN_REMOTE_ACTIVE | Cproton::PN_REMOTE_CLOSED

Instance Method Summary collapse

Instance Method Details

#closed?Bool

Returns true if endpoint has sent and received a CLOSE frame

Returns:

  • (Bool)

    true if endpoint has sent and received a CLOSE frame



78
# File 'lib/core/endpoint.rb', line 78

def closed?() check_state(LOCAL_CLOSED | REMOTE_CLOSED); end

#local_closed?Boolean

Returns:

  • (Boolean)


91
92
93
# File 'lib/core/endpoint.rb', line 91

def local_closed?
  check_state(LOCAL_CLOSED)
end

#local_open?Boolean Also known as: local_active?

Returns:

  • (Boolean)


87
88
89
# File 'lib/core/endpoint.rb', line 87

def local_open?
  check_state(LOCAL_ACTIVE)
end

#local_uninit?Boolean

Returns:

  • (Boolean)


83
84
85
# File 'lib/core/endpoint.rb', line 83

def local_uninit?
  check_state(LOCAL_UNINIT)
end

#open?Bool

Returns true if endpoint has sent and received an OPEN frame

Returns:

  • (Bool)

    true if endpoint has sent and received an OPEN frame



81
# File 'lib/core/endpoint.rb', line 81

def open?() check_state(LOCAL_ACTIVE | REMOTE_ACTIVE); end

#remote_closed?Boolean

Returns:

  • (Boolean)


103
104
105
# File 'lib/core/endpoint.rb', line 103

def remote_closed?
  check_state(REMOTE_CLOSED)
end

#remote_open?Boolean Also known as: remote_active?

Returns:

  • (Boolean)


99
100
101
# File 'lib/core/endpoint.rb', line 99

def remote_open?
  check_state(REMOTE_ACTIVE)
end

#remote_uninit?Boolean

Returns:

  • (Boolean)


95
96
97
# File 'lib/core/endpoint.rb', line 95

def remote_uninit?
  check_state(REMOTE_UNINIT)
end

#transportTransport

Return the transport associated with this endpoint.

Returns:



66
67
68
# File 'lib/core/endpoint.rb', line 66

def transport
  self.connection.transport
end

#work_queueWorkQueue

Returns the work queue for work on this endpoint.

Returns:

  • (WorkQueue)

    the work queue for work on this endpoint.



71
# File 'lib/core/endpoint.rb', line 71

def work_queue() connection.work_queue; end