FileDocCategorySizeDatePackage
BasicConnector.javaAPI DocJMF 2.1.1e3381Mon May 12 12:20:48 BST 2003com.sun.media

BasicConnector

public abstract class BasicConnector extends Object implements Connector
Defines implementation of the Connector interface.

Fields Summary
protected Module
module
the module which registered this connector
protected int
minSize
minimum number of data chunks this connector should allocate
protected Format
format
the format chosen for this connector. null if none
protected CircularBuffer
circularBuffer
the circularBuffer which is the connector memory
protected String
name
the name the module chose for this connector
protected int
protocol
the data transfer protocol chosen for this Connector.
either ProtocolPush, ProtocolSafe
Constructors Summary
Methods Summary
public java.lang.ObjectgetCircularBuffer()
returns the circular buffer

see
#circularBuffer


               
       
        return circularBuffer;
    
public javax.media.FormatgetFormat()
The selected format.

see
#format

      return format;
    
public com.sun.media.ModulegetModule()
Returns the Module which owns this Connector.

see
#module

        return module;
    
public java.lang.StringgetName()
returns the name of this Connector

see
#name

        return name;
    
public intgetProtocol()
returns the data transfer protocol used by this connector.

see
#protocol

        return protocol;
    
public intgetSize()
gets the minimum number of buffer objects this Connector should create.

see
#minSize

        return minSize;
    
public voidprint()

	circularBuffer.print();
    
public voidreset()
restores this Connector to its initial state

      circularBuffer.reset();
    
public voidsetCircularBuffer(java.lang.Object cicularBuffer)
sets the CircularBuffer of this Connector.

see
#circularBuffer

       this.circularBuffer = (CircularBuffer)cicularBuffer;
    
public voidsetFormat(javax.media.Format format)
Selects a format for this Connector. Delegates this call to its owning Module

see
#format

      module.setFormat((Connector)this,format);
      this.format=format;
    
public voidsetModule(com.sun.media.Module module)
sets the Module which owns this Connector.

see
#module

        this.module = module;
    
public voidsetName(java.lang.String name)
sets the name of this Connector

see
#name

        this.name=name;
    
public voidsetProtocol(int protocol)
sets the data transfer protocol used by this connector.

see
#protocol

        this.protocol=protocol;
    
public voidsetSize(int numOfBufferObjects)
sets the minimum number of buffer objects this Connector should create. The default value should be one buffer object.

see
#minSize

        minSize = numOfBufferObjects;