Source Classes

This section describes information that is specific to the Java API. See User-Defined Sourcefor general information about implementing the UDSource and SourceFactory classes.

UDSource API

The API provides the following methods for extension by subclasses:

public void setup (ServerInterface srvInterface) throws UdfException;
				
public abstract StreamState process (ServerInterface srvInterface, DataBuffer output) throws UdfException;
				
public void destroy (ServerInterface srvInterface) throws UdfException;
				
public Integer getSize ();
				
public String getUri ();
		

SourceFactory API

The API provides the following methods for extension by subclasses:

public void plan (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) 
	throws UdfException;

// must implement one overload of prepareUDSources()				
public ArrayList< UDSource > prepareUDSources (ServerInterface srvInterface, 
				NodeSpecifyingPlanContext planCtxt) 
	throws UdfException;
				
public ArrayList< UDSource > prepareUDSources (ServerInterface srvInterface, 
				ExecutorPlanContext planCtxt)
	throws UdfException;
				
public void getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes);
				
public boolean isSourceApportionable();
				
public int getDesiredThreads(ServerInterface srvInterface,
				ExecutorPlanContext planCtxt) 
	throws UdfException;