|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.TCPConnector
public class TCPConnector
The TCP Connector is a transport Connector using TCP sockets for transport. You can use the TCP Connector in Iterator and AddOnly mode only.
Field Summary | |
---|---|
static java.lang.String |
PARAM_SYSTEM_TCP_BACKLOG
name of the backlog in the global properties file |
static java.lang.String |
PARAM_TCP_BACKLOG
name of backlog parameter |
Fields inherited from class com.ibm.di.connector.Connector |
---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
Constructor Summary | |
---|---|
TCPConnector()
Class constructor |
Method Summary | |
---|---|
java.security.cert.Certificate[] |
getCertificates()
Returns the Certificates of the peer. |
Entry |
getNextEntry()
Returns the next Entry from the connector. |
java.io.Reader |
getReader()
Returns a reader object for the socket |
java.net.Socket |
getSocket()
Returns the Socket we are reading from or writing to |
java.lang.String |
getVersion()
Return version information |
java.io.Writer |
getWriter()
Returns a writer object for the socket |
void |
initialize(java.lang.Object o)
Initialize the connector. The connector may be passed a parameter of any kind by the user. It is up to the connector to determine whether this object can be used or not. The parameter is typically provided by a user script. When an AssemblyLine initializes it's Connectors, they are passed a ConnectorMode object. |
void |
putEntry(Entry entry)
Adds a new entry to the data source Example: var ctor = write.getConnector(); for (i = 0; i < 10; i++) { var entry = system.newEntry(); entry.setAttribute("linenumber", i); entry.setAttribute("line", i + " line of text..."); main.logmsg("Writes entry to output..."); main.dumpEntry(entry); ctor.putEntry(entry); } |
void |
selectEntries()
default implementation |
void |
terminate()
Terminate the connector. This function closes all connection and releases all resources used by the connector. This function also calls the parser's closeParser() method if a parser is active. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.di.connector.ConnectorInterface |
---|
deleteEntry, findEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer |
Field Detail |
---|
public static final java.lang.String PARAM_TCP_BACKLOG
public static final java.lang.String PARAM_SYSTEM_TCP_BACKLOG
Constructor Detail |
---|
public TCPConnector()
Method Detail |
---|
public void selectEntries() throws java.lang.Exception
selectEntries
in interface ConnectorInterface
selectEntries
in class Connector
java.lang.Exception
- neverpublic void terminate()
terminate
in interface ConnectorInterface
terminate
in class Connector
public void initialize(java.lang.Object o) throws java.lang.Exception
initialize
in interface ConnectorInterface
initialize
in class Connector
o
- User provided parameter
java.lang.Exception
- if the initialization of this connector fails.public Entry getNextEntry() throws java.lang.Exception
getNextEntry
in interface ConnectorInterface
getNextEntry
in class Connector
java.lang.Exception
- if an error occursselectEntries()
public void putEntry(Entry entry) throws java.lang.Exception
Example:
var ctor = write.getConnector(); for (i = 0; i < 10; i++) { var entry = system.newEntry(); entry.setAttribute("linenumber", i); entry.setAttribute("line", i + " line of text..."); main.logmsg("Writes entry to output..."); main.dumpEntry(entry); ctor.putEntry(entry); }
putEntry
in interface ConnectorInterface
putEntry
in class Connector
entry
- The entry data to add
java.lang.Exception
- if an error occurs.public java.io.Reader getReader() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic java.io.Writer getWriter() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic java.net.Socket getSocket()
public java.security.cert.Certificate[] getCertificates() throws javax.net.ssl.SSLPeerUnverifiedException
getSocket().getSession().getPeerCertificates();
javax.net.ssl.SSLPeerUnverifiedException
- if the peer's identity has not been verifiedpublic java.lang.String getVersion()
getVersion
in interface VersionInfoInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |