FileDocCategorySizeDatePackage
InputPort.javaAPI DocAndroid 5.1 API2168Thu Mar 12 22:22:30 GMT 2015android.filterfw.core

InputPort

public abstract class InputPort extends FilterPort
hide

Fields Summary
protected OutputPort
mSourcePort
Constructors Summary
public InputPort(Filter filter, String name)

        super(filter, name);
    
Methods Summary
public booleanacceptsFrame()

        return !hasFrame();
    
public voidclose()

        if (mSourcePort != null && mSourcePort.isOpen()) {
            mSourcePort.close();
        }
        super.close();
    
public booleanfilterMustClose()

        return !isOpen() && isBlocking() && !hasFrame();
    
public FiltergetSourceFilter()

        return mSourcePort == null ? null : mSourcePort.getFilter();
    
public FrameFormatgetSourceFormat()

        return mSourcePort != null ? mSourcePort.getPortFormat() : getPortFormat();
    
public OutputPortgetSourcePort()

        return mSourcePort;
    
public java.lang.ObjectgetTarget()

        return null;
    
public booleanisConnected()

        return mSourcePort != null;
    
public booleanisReady()

        return hasFrame() || !isBlocking();
    
public voidopen()

        super.open();
        if (mSourcePort != null && !mSourcePort.isOpen()) {
            mSourcePort.open();
        }
    
public voidsetSourcePort(OutputPort source)

        if (mSourcePort != null) {
            throw new RuntimeException(this + " already connected to " + mSourcePort + "!");
        }
        mSourcePort = source;
    
public abstract voidtransfer(FilterContext context)