Exception: Net::TNS::Exceptions::RedirectMessageReceived

Inherits:
TNSException
  • Object
show all
Defined in:
lib/net/tns/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ RedirectMessageReceived

Returns a new instance of RedirectMessageReceived.



23
24
25
26
27
28
29
30
31
# File 'lib/net/tns/exceptions.rb', line 23

def initialize( message )
  super( message )

  host_matches = /\(HOST=([^\)]+)\)/.match( self.message )
  @new_host = host_matches[1] unless host_matches.nil?

  port_matches = /\(PORT=(\d{1,5})\)/.match( self.message )
  @new_port = port_matches[1] unless port_matches.nil?
end

Instance Attribute Details

#new_hostObject (readonly)

Returns the value of attribute new_host.



21
22
23
# File 'lib/net/tns/exceptions.rb', line 21

def new_host
  @new_host
end

#new_portObject (readonly)

Returns the value of attribute new_port.



20
21
22
# File 'lib/net/tns/exceptions.rb', line 20

def new_port
  @new_port
end