|
||||||||||
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.EIFConnector
public class EIFConnector
A connector for sending and receiving messages from/to IBM Tivoli Enterprise Console.
Field Summary |
---|
Fields inherited from class com.ibm.di.connector.Connector |
---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
Constructor Summary | |
---|---|
EIFConnector()
Constructs an instance of this connector. |
Method Summary | |
---|---|
Entry |
getNextEntry()
The returned entry has the following structure: |
java.lang.String |
getVersion()
Version information. |
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)
Sends an Entry to the remote server. |
java.lang.Object |
querySchema(java.lang.Object source)
Query the Schema. |
void |
selectEntries()
Prepare the Connector for sequential read. If necessary, create a result set to be used for getNextEntry(). When the Connector is used as an Iterator in an AssemblyLine, this method will be called. Default is an empty method. |
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. |
void |
updateSchemaFromMap(java.lang.String path,
java.util.Vector<java.lang.Object> schema)
This method updates the schema vector based on a mapping file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EIFConnector()
Method Detail |
---|
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 void selectEntries() throws java.lang.Exception
selectEntries
in interface ConnectorInterface
selectEntries
in class Connector
java.lang.Exception
- if an error occurs.public Entry getNextEntry() throws java.lang.Exception
Entry +-->className:String +-->{slotName}:String +-->{slotName}:String ...{moreSlots}...
getNextEntry
in interface ConnectorInterface
getNextEntry
in class Connector
java.lang.Exception
- if an error occurs.ConnectorInterface.selectEntries()
public void putEntry(Entry entry) throws java.lang.Exception
putEntry
in interface ConnectorInterface
putEntry
in class Connector
entry
- the event to send. The entry should comply with the following
structure. If the attribute event is present (not null) then
it will be sent to the remote server, otherwise the className
and slots attributes will be used to compile an event.
Entry +-->className:String +-->{slotName}:String +-->{slotName}:String ...{moreSlots}...
java.lang.Exception
- if an error occurs.public void terminate() throws java.lang.Exception
terminate
in interface ConnectorInterface
terminate
in class Connector
java.lang.Exception
- if an error occurs.public java.lang.Object querySchema(java.lang.Object source)
querySchema
in interface ConnectorInterface
querySchema
in class Connector
source
- The object on which to discover schema. This may be an Entry
or a string value
eifSchemaFile
file is null
,
returns the schema for the current Entry; else returns schema
containing destination field names from the mapping file used by
the Gateway for Tivoli EIF.Entry
,
Vector
public void updateSchemaFromMap(java.lang.String path, java.util.Vector<java.lang.Object> schema) throws java.lang.Exception
CREATE MAPPING StatusMap ( 'identifier' = '@Identifier', 'server_identifier'= '@ServerName' + " " + TO_STRING('@ServerSerial'), 'sub_source' = '@AlertKey' ON INSERT ONLY, 'sub_origin' = '@AlertGroup' ON INSERT ONLY, 'msg' = '@Summary' ON INSERT ONLY, 'origin' = '@Node' ON INSERT ONLY, 'node_alias' = '@NodeAlias' ON INSERT ONLY NOTNULL '@Node', 'manager' = '@Manager' ON INSERT ONLY, 'source' = '@Agent' ON INSERT ONLY, 'severity' = '@Severity', 'date' = '@LastOccurrence' ON INSERT ONLY, 'omnibus_last_modified_time' = '@InternalLast' ON INSERT ONLY );
path
- path to the file
java.lang.Exception
- if file could not be found, read or closed.public java.lang.String getVersion()
VersionInfoInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |