SingleParamTransportUtil.java :  » Ajax » ItsNat » org » itsnat » impl » core » listener » trans » Java Open Source

Java Open Source » Ajax » ItsNat 
ItsNat » org » itsnat » impl » core » listener » trans » SingleParamTransportUtil.java
/*
  ItsNat Java Web Application Framework
  Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
  Author: Jose Maria Arranz Santamaria

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Affero General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version. See the GNU Affero General Public 
  License for more details. See the copy of the GNU Affero General Public License
  included in this program. If not, see <http://www.gnu.org/licenses/>.
*/

package org.itsnat.impl.core.listener.trans;

import org.itsnat.core.event.NodeAttributeTransport;
import org.itsnat.core.event.SingleParamTransport;
import org.itsnat.core.event.NodeInnerTransport;
import org.itsnat.core.event.CustomParamTransport;
import org.itsnat.core.event.NodePropertyTransport;
import org.itsnat.impl.core.event.client2serv.*;

/**
 *
 * @author jmarranz
 */
public abstract class SingleParamTransportUtil extends ParamTransportUtil
{
    
    /**
     * Creates a new instance of ParamTransportUtil
     */
    public SingleParamTransportUtil()
    {
    }

    public static SingleParamTransportUtil getSingleParamTransportUtilSingleton(SingleParamTransport param)
    {
        if (param instanceof NodeAttributeTransport)
            return NodeAttributeTransportUtil.SINGLETON;
        else if (param instanceof NodeInnerTransport)
            return NodeInnerTransportUtil.SINGLETON;        
        else if (param instanceof NodePropertyTransport)
            return NodePropertyTransportUtil.SINGLETON;        
        else if (param instanceof CustomParamTransport)
            return CustomParamTransportUtil.SINGLETON;         
        return null;
    }    

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.