com.businesslink.sgi.api
Interface StrategiEvent


public interface StrategiEvent

Defines a single Strategi Event. Strategi Event method calls must be made in proper order.


Method Summary
 java.io.InputStream getInputStream()
          Gets the input stream used to receive data from the event originator.
 java.io.InputStream getInputStream(int ccs)
          Gets the input stream used to receive data from the event originator.
 java.io.OutputStream getOutputStream()
          Gets the output stream used to send data back to the event originator.
 java.io.OutputStream getOutputStream(int ccs)
          Gets the output stream used to send data back to the event originator.
 java.util.Properties getProperties()
          Gets all properties associated with this event.
 java.lang.String getProperty(java.lang.String kwd)
          Gets the property value associated with the specified keyword in the event property list.
 java.lang.String getProperty(java.lang.String kwd, java.lang.String dftval)
          Gets the property value associated with the specified keyword in the event property list.
 java.io.Reader getReader()
          Gets the Reader used to receive data from the event originator.
 java.io.PrintWriter getTextWriter()
          Gets a text writer object useful for status/debug messages.
 java.io.Writer getWriter()
          Gets the Writer used to send data back to the event originator.
 boolean hasProperty(java.lang.String kwd)
          Determines if a property with the specified keyword is present in the event property list.
 void sendProperty(java.lang.String kwd, java.lang.String val)
          Sends a property back to the event originator.
 long writeDataTo(java.io.OutputStream out)
          Writes all input data to the specified output stream.
 long writeDataTo(java.io.OutputStream out, int ccs)
          Writes all input data to the specified output stream, translating to the specified CCSID.
 long writeDataTo(java.io.Writer wtr)
          Writes all input data to the specified Writer.
 

Method Detail

getTextWriter

public java.io.PrintWriter getTextWriter()
Gets a text writer object useful for status/debug messages.
Returns:
text writer object.

hasProperty

public boolean hasProperty(java.lang.String kwd)
Determines if a property with the specified keyword is present in the event property list.
Parameters:
kwd - property keyword.
Returns:
true if the property is present; false otherwise.

getProperty

public java.lang.String getProperty(java.lang.String kwd)
Gets the property value associated with the specified keyword in the event property list.
Parameters:
kwd - property keyword.
Returns:
the property value; null if the property is not found.

getProperty

public java.lang.String getProperty(java.lang.String kwd,
                                    java.lang.String dftval)
Gets the property value associated with the specified keyword in the event property list.
Parameters:
kwd - property keyword.
dftval - a default value.
Returns:
the property value or the specified default value if the property is not found.

getProperties

public java.util.Properties getProperties()
Gets all properties associated with this event.
Returns:
property object containing all event properties.

getInputStream

public java.io.InputStream getInputStream()
Gets the input stream used to receive data from the event originator. This input stream does no character translation.
Returns:
the event input stream.

getInputStream

public java.io.InputStream getInputStream(int ccs)
Gets the input stream used to receive data from the event originator. Whenever it is possible to do so, characters are translated to the specified CCSID.
Parameters:
ccs - the CCSID to receive data in.
Returns:
the event input stream.

getReader

public java.io.Reader getReader()
Gets the Reader used to receive data from the event originator.
Returns:
the event Reader.

writeDataTo

public long writeDataTo(java.io.OutputStream out)
Writes all input data to the specified output stream. No character translation of the input data is done during this process.
Parameters:
out - the output stream to write to.
Returns:
total number of bytes written.

writeDataTo

public long writeDataTo(java.io.OutputStream out,
                        int ccs)
Writes all input data to the specified output stream, translating to the specified CCSID.
Parameters:
out - the output stream to write to.
ccs - CCSID to translate input data to.
Returns:
total number of bytes written.

writeDataTo

public long writeDataTo(java.io.Writer wtr)
Writes all input data to the specified Writer.
Parameters:
wtr - the Writer to use for writing.
Returns:
total number of characters written.

sendProperty

public void sendProperty(java.lang.String kwd,
                         java.lang.String val)
Sends a property back to the event originator.
Parameters:
kwd - property keyword.
val - property value.

getOutputStream

public java.io.OutputStream getOutputStream()
Gets the output stream used to send data back to the event originator.
Returns:
the event output stream.

getOutputStream

public java.io.OutputStream getOutputStream(int ccs)
Gets the output stream used to send data back to the event originator. All output data is marked as being the specified CCSID, but no translation is done at this point.
Parameters:
ccs - CCSID used to mark this output stream.
Returns:
the event output stream.

getWriter

public java.io.Writer getWriter()
Gets the Writer used to send data back to the event originator. All data is automatically sent as Unicode characters.
Returns:
the event Writer.