function handle = sf_server_handle_map(key, varargin)
    persistent queueTextHandles;
    persistent fig;
    persistent processText;
    persistent sendText;
    
    if(isempty(queueTextHandles))
        queueTextHandles = zeros(1, 10);
    end
    
    if(isempty(fig))
        fig = 0;
    end
    
    if(isempty(processText))
        processText = 0;
    end
    
    if(isempty(sendText))
        sendText = 0;
    end
    
    handle = [];
    
    switch(key)
        case 'fig'
            if(nargin == 1)
                handle = fig;
            else
                fig = varargin{1};
            end            
        case 'processText'
            if(nargin == 1)
                handle = processText;
            else
                processText = varargin{1};
            end
        case 'sendText'
            if(nargin == 1)
                handle = sendText;
            else
                sendText = varargin{1};
            end
        case 'queueText'
            index = varargin{1};
            if(nargin == 2)
                handle = queueTextHandles(index);
            else
                value = varargin{2};
                queueTextHandles(index) = value;
            end
            
    end    
end