Package com.pi4j.io.serial

Source Code of com.pi4j.io.serial.SerialFactory

package com.pi4j.io.serial;

/*
* #%L
* **********************************************************************
* ORGANIZATION  :  Pi4J
* PROJECT       :  Pi4J :: Java Library (Core)
* FILENAME      :  SerialFactory.java 
*
* This file is part of the Pi4J project. More information about
* this project can be found here:  http://www.pi4j.com/
* **********************************************************************
* %%
* Copyright (C) 2012 - 2014 Pi4J
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/


import com.pi4j.io.serial.impl.SerialImpl;

/**
* <p> This factory class provide a static method to create new 'Serial' instances. </p>
*
* <p>
* Before using the Pi4J library, you need to ensure that the Java VM in configured with access to
* the following system libraries:
* <ul>
* <li>pi4j</li>
* <li>wiringPi</li>
* </ul>
* <blockquote> This library depends on the wiringPi native system library.</br> (developed by
* Gordon Henderson @ <a href="http://wiringpi.com/">http://wiringpi.com/</a>)
* </blockquote>
* </p>
*
* @see com.pi4j.io.serial.Serial
* @see com.pi4j.io.serial.SerialDataEvent
* @see com.pi4j.io.serial.SerialDataListener
*
* @see <a href="http://www.pi4j.com/">http://www.pi4j.com/</a>
* @author Robert Savage (<a
*         href="http://www.savagehomeautomation.com">http://www.savagehomeautomation.com</a>)
*/
public class SerialFactory {

    // private constructor
    private SerialFactory() {
        // forbid object construction
    }
   
    /**
     * Create New Serial instance
     *
     * @return Return a new Serial implementation instance.
     */
    public static Serial createInstance() {
        return new SerialImpl();
    }
}
TOP

Related Classes of com.pi4j.io.serial.SerialFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.