Class: ThriftHelpers::Connection::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/thrift_client/connection/base.rb

Direct Known Subclasses

HTTP, Socket

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transport, transport_wrapper, server, timeout) ⇒ Base

Returns a new instance of Base.



6
7
8
9
10
11
# File 'lib/thrift_client/connection/base.rb', line 6

def initialize(transport, transport_wrapper, server, timeout)
  @transport = transport
  @transport_wrapper = transport_wrapper
  @server = server
  @timeout = timeout
end

Instance Attribute Details

#serverObject

Returns the value of attribute server.



4
5
6
# File 'lib/thrift_client/connection/base.rb', line 4

def server
  @server
end

#transportObject

Returns the value of attribute transport.



4
5
6
# File 'lib/thrift_client/connection/base.rb', line 4

def transport
  @transport
end

Instance Method Details

#closeObject



21
22
# File 'lib/thrift_client/connection/base.rb', line 21

def close
end

#connect!Object

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/thrift_client/connection/base.rb', line 13

def connect!
  raise NotImplementedError
end

#open?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/thrift_client/connection/base.rb', line 17

def open?
  @transport.open?
end