public class RemoteConnection extends java.lang.Object implements DataConsumer, java.io.Serializable
GReportWriter
is invoked with the -l option.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
legalCopyright |
Modifier | Constructor and Description |
---|---|
protected |
RemoteConnection()
Creates a RemoteConnection object.
|
|
RemoteConnection(DataConsumer consumer)
Creates a RemoteConnection object that outputs to the given
consumer object.
|
Modifier and Type | Method and Description |
---|---|
GreContentHandler |
createContentHandler()
Creates a content handler into which the input document can be
streamed thru the rendering pipe.
|
java.lang.Integer |
getDebugLevel()
Returns the debug level.
|
java.io.File |
getInputLogFile() |
void |
logInputToFile(java.io.File logFile,
boolean logOnly)
Specifies to log the input to an XML file.
|
boolean |
logOnly() |
void |
runFromJAXBObject(java.lang.Object data)
Uses
JAXB to stream the object
data thru the rendering pipe. |
void |
runFromXML(java.lang.String fileName)
Streams the specified file thru the rendering pipe.
|
void |
setConsumer(DataConsumer consumer)
Sets the DataConsumer that receives the output.
|
void |
setDebugLevel(java.lang.Integer level)
Sets the debug level as determined by the
level . |
void |
setFGLDIR(java.lang.String fGLDIR)
Sets the value of the FGLDIR property on the remote server.
|
void |
setFGLPROFILE(java.lang.String fGLPROFILE) |
void |
setFGLRESOURCEPATH(java.lang.String fGLRESOURCEPATH)
Sets the value of the FGLRESOURCEPATH property on the remote server.
|
void |
setHost(java.lang.String hostName)
Sets the host name of the remote GRE server.
|
void |
setPort(java.lang.Integer port) |
public static final java.lang.String legalCopyright
protected RemoteConnection()
public RemoteConnection(DataConsumer consumer)
consumer
- A DataConsumerpublic java.lang.Integer getDebugLevel()
getDebugLevel
in interface DataConsumer
setDebugLevel(java.lang.Integer)
public void setDebugLevel(java.lang.Integer level)
level
.
Only Messages with a message level lower or equal to level
will be displayed and logged.
There following six message levels are defined:
server
.setDebugLevel
in interface DataConsumer
level
- Messages with a level higher than this value will not be displayed or logged.java.lang.IllegalArgumentException
- if the level
is not in the range 0..9public void setConsumer(DataConsumer consumer)
consumer
- A DataConsumerpublic void setHost(java.lang.String hostName)
hostName
- the host name of the remote serversetPort(Integer port)
public void setPort(java.lang.Integer port)
public void setFGLDIR(java.lang.String fGLDIR)
fGLDIR
- the value of the FGLDIR propertypublic void setFGLPROFILE(java.lang.String fGLPROFILE)
public void setFGLRESOURCEPATH(java.lang.String fGLRESOURCEPATH)
FourRpProcessor
for finding report template files
that are specified with a relative path (See {link FourRpProcessor#setReportFile}).fGLRESOURCEPATH
- the value of the RESOURCEPATH propertypublic GreContentHandler createContentHandler() throws org.xml.sax.SAXException
createContentHandler
in interface DataConsumer
org.xml.sax.SAXException
- if the handler can't be obtained due to an errorpublic void runFromJAXBObject(java.lang.Object data) throws javax.xml.bind.JAXBException, org.xml.sax.SAXException
JAXB
to stream the object
data
thru the rendering pipe.runFromJAXBObject
in interface DataConsumer
data
- A Java object annotated for JAXP processingjavax.xml.bind.JAXBException
- if the serialization of the object failsorg.xml.sax.SAXException
- if processing the object's data failspublic void runFromXML(java.lang.String fileName) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException
runFromXML
in interface DataConsumer
fileName
- The XML input documentjava.io.IOException
- if reading the data failsorg.xml.sax.SAXException
- if processing data failsjavax.xml.parsers.ParserConfigurationException
- if parsing the data failspublic void logInputToFile(java.io.File logFile, boolean logOnly)
logInputToFile
in interface DataConsumer
logFile
- The location of the output filelogOnly
- Specifies to suppress any further processing of the inputpublic java.io.File getInputLogFile()
getInputLogFile
in interface DataConsumer
public boolean logOnly()
logOnly
in interface DataConsumer