net.sf.farrago.runtime
Class NativeRuntimeContext

java.lang.Object
  extended by net.sf.farrago.runtime.NativeRuntimeContext

 class NativeRuntimeContext
extends Object

NativeRuntimeContext integrates Fennel with FarragoRuntimeContext. Currently, it supports Fennel errors.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/runtime/NativeRuntimeContext.java#6 $
Author:
John Pham

Nested Class Summary
private  class NativeRuntimeContext.StreamDescriptor
          StreamDescriptor represents a unique Fennel error source.
 
Field Summary
private  FarragoRuntimeContext context
           
static int ROW_ERROR
          ErrorLevel.
static int ROW_WARNING
           
private  Map<String,NativeRuntimeContext.StreamDescriptor> streamMap
           
 
Constructor Summary
NativeRuntimeContext(FarragoRuntimeContext context)
          Creates a new NativeRuntimeContext instance as a wrapper around a FarragoRuntimeContext.
 
Method Summary
 Object handleRowError(String source, boolean isWarning, String msg, ByteBuffer byteBuffer, int index)
          Handles a Fennel row exception by converting Fennel data into Farrago data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROW_ERROR

public static final int ROW_ERROR
ErrorLevel. Keep this consistent with fennel/exec/ErrorTarget.h

See Also:
Constant Field Values

ROW_WARNING

public static final int ROW_WARNING
See Also:
Constant Field Values

context

private FarragoRuntimeContext context

streamMap

private Map<String,NativeRuntimeContext.StreamDescriptor> streamMap
Constructor Detail

NativeRuntimeContext

public NativeRuntimeContext(FarragoRuntimeContext context)
Creates a new NativeRuntimeContext instance as a wrapper around a FarragoRuntimeContext.

Method Detail

handleRowError

public Object handleRowError(String source,
                             boolean isWarning,
                             String msg,
                             ByteBuffer byteBuffer,
                             int index)
Handles a Fennel row exception by converting Fennel data into Farrago data. Delegates to NativeRuntimeContext.StreamDescriptor.

See Also:
for a description of the parameters