# class GxG::Communications::BridgeAdapter

Adapters

### Public Class Methods

abilities() click to toggle source

    # File lib/gxg/gxg_communications.rb, line 46
    def self.abilities()
        []
    end

limits() click to toggle source

    # File lib/gxg/gxg_communications.rb, line 50
    def self.limits()
        {}
    end

new(the_process=nil, the_url=nil, options=nil) click to toggle source

    # File lib/gxg/gxg_communications.rb, line 58
    def initialize(the_process=nil, the_url=nil, options=nil)
        if the_url.is_a?(::String)
            the_url = ::URI::parse(the_url)
        end
        unless the_url.is_a?(::URI::Generic)
            raise ArgumentError, "You MUST provide a valid URL as a String or URI."
        end
        unless the_process
            raise ArgumentError, "You MUST provide a Service or Application object to interact with."
        end
        @process = the_process
        @url = the_url
        @options = (options || {})
        unless @options.is_a?(::Hash)
            raise ArgumentError, "You must provide options as a Hash."
        end
        @active = false
        @connector = nil
        @thread_safety = ::Mutex.new
        #
        @uuid = ::GxG::uuid_generate.to_sym
        self
    end

protocol() click to toggle source

WARNING: Only instantiate subclasses

    # File lib/gxg/gxg_communications.rb, line 42
    def self.protocol()
        :unspecified
    end

templates() click to toggle source

    # File lib/gxg/gxg_communications.rb, line 54
    def self.templates()
        {}
    end

### Public Instance Methods

channels() click to toggle source

Basic Channel `Support`

    # File lib/gxg/gxg_communications.rb, line 129
    def channels()
        {}
    end

close() click to toggle source

    # File lib/gxg/gxg_communications.rb, line 108
    def close()
        if self.open?
            @connector.logout()
            @active = false
        end
        true
    end

entitiies() click to toggle source

Basic `Entity` `Support`

    # File lib/gxg/gxg_communications.rb, line 121
    def entitiies()
        []
    end

entity_status(the_address=nil) click to toggle source

    # File lib/gxg/gxg_communications.rb, line 125
    def entity_status(the_address=nil)
        :online
    end

my_id() click to toggle source

    # File lib/gxg/gxg_communications.rb, line 86
    def my_id()
        nil
    end

notify(details=nil) click to toggle source

Information Refresh

    # File lib/gxg/gxg_communications.rb, line 116
    def notify(details=nil)
        #
    end

open() click to toggle source

    # File lib/gxg/gxg_communications.rb, line 101
    def open()
        unless self.open?
            @active = @connector.login(@url, @options)
        end
        @active
    end

open?() click to toggle source

    # File lib/gxg/gxg_communications.rb, line 90
    def open?()
        if @connector
            if @connector.closed?
                @active = false
            else
                @active = true
            end
        end
        @active
    end

uuid() click to toggle source

    # File lib/gxg/gxg_communications.rb, line 82
    def uuid()
        @uuid
    end