com.ibm.di.connector
Class HTTPServerConnector

java.lang.Object
  extended by com.ibm.di.connector.Connector
      extended by com.ibm.di.connector.HTTPServerConnector
All Implemented Interfaces:
ConnectorInterface, VersionInfoInterface

public class HTTPServerConnector
extends Connector
implements ConnectorInterface


Field Summary
static String ATTR_NAME_HTTP_AUTH_ENTRY
           
static String ATTR_NAME_HTTP_BODY
           
static String ATTR_NAME_HTTP_CHARACTER_SET
           
static String ATTR_NAME_HTTP_CONNECTION
           
static String ATTR_NAME_HTTP_CONTENT_TYPE
           
static String ATTR_NAME_HTTP_REMOTE_PASSWORD
           
static String ATTR_NAME_HTTP_REMOTE_USER
           
static String HTTP_BAD_REQUEST
           
static String PARAM_SYSTEM_TCP_BACKLOG
           
static String PARAM_TCP_BACKLOG
           
static String PARAMETER_AUTH_CONN
           
static String PARAMETER_AUTH_REALM
           
static String PARAMETER_CONTENT_TYPE
           
static String PARAMETER_HEADERS_AS_PROPS
           
static String PARAMETER_HTTP_BASIC_AUTH
           
static String PARAMETER_REQUIRE_CLIENT_AUTH
           
static String PARAMETER_TCP_DATA_AS_PROPS
           
static String PARAMETER_TCP_PORT
           
static String PARAMETER_USE_CHUNKS
           
static String PARAMETER_USE_SSL
           
 
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
 
Constructor Summary
HTTPServerConnector()
           
 
Method Summary
 ConnectorInterface getNextClient()
          Server mode - return a clone of self that handles the next client instance when running in server mode.
 Entry getNextEntry()
          Returns the next Entry from the connector.
 String getPassword()
           
 HTTPServerConnector getServerConnector()
          Returns the server connector if this connector is handling an LDAP client session.
 String getUserName()
           
 String getVersion()
          Return version information
 void initialize(Object aObject)
          Initialize the connector.
 boolean isAccepting()
          Returns true if this connector is currently waiting for a client connection.
 boolean isTerminating()
          Returns true if this connector has the termination flag set.
 void putEntry(Entry aEntry)
          Adds a new entry to the data source
 void rejectClientAuthentication()
           
 void replyEntry(Entry aEntry)
          Send a reply to the connector.
 void setProperty(Entry aEntry, String aProperty, Object aValue, boolean aTcpDataAsProps)
           
 void setServerConnector(HTTPServerConnector aServerConnector)
          Sets the server connector for this connector.
 void terminate()
          Terminate the connector.
 void terminateServer()
          This method tries to terminate the server by setting the termination flag for the connector returned by getServerConnector and immediatly connecting to its port (which should fail).
 
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, deleteEntry, findEntry, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logmsg, modEntry, modEntry, pushback, queryOperations, queryReply, querySchema, queryTables, reconnect, reconnect, registerScriptBeans, selectEntries, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface
 
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, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, selectEntries, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface
 

Field Detail

PARAMETER_TCP_PORT

public static final String PARAMETER_TCP_PORT
See Also:
Constant Field Values

PARAM_TCP_BACKLOG

public static final String PARAM_TCP_BACKLOG
See Also:
Constant Field Values

PARAM_SYSTEM_TCP_BACKLOG

public static final String PARAM_SYSTEM_TCP_BACKLOG
See Also:
Constant Field Values

PARAMETER_HEADERS_AS_PROPS

public static final String PARAMETER_HEADERS_AS_PROPS
See Also:
Constant Field Values

PARAMETER_TCP_DATA_AS_PROPS

public static final String PARAMETER_TCP_DATA_AS_PROPS
See Also:
Constant Field Values

PARAMETER_AUTH_CONN

public static final String PARAMETER_AUTH_CONN
See Also:
Constant Field Values

PARAMETER_HTTP_BASIC_AUTH

public static final String PARAMETER_HTTP_BASIC_AUTH
See Also:
Constant Field Values

PARAMETER_AUTH_REALM

public static final String PARAMETER_AUTH_REALM
See Also:
Constant Field Values

PARAMETER_USE_SSL

public static final String PARAMETER_USE_SSL
See Also:
Constant Field Values

PARAMETER_REQUIRE_CLIENT_AUTH

public static final String PARAMETER_REQUIRE_CLIENT_AUTH
See Also:
Constant Field Values

PARAMETER_CONTENT_TYPE

public static final String PARAMETER_CONTENT_TYPE
See Also:
Constant Field Values

PARAMETER_USE_CHUNKS

public static final String PARAMETER_USE_CHUNKS
See Also:
Constant Field Values

ATTR_NAME_HTTP_REMOTE_USER

public static final String ATTR_NAME_HTTP_REMOTE_USER
See Also:
Constant Field Values

ATTR_NAME_HTTP_REMOTE_PASSWORD

public static final String ATTR_NAME_HTTP_REMOTE_PASSWORD
See Also:
Constant Field Values

ATTR_NAME_HTTP_BODY

public static final String ATTR_NAME_HTTP_BODY
See Also:
Constant Field Values

ATTR_NAME_HTTP_CONTENT_TYPE

public static final String ATTR_NAME_HTTP_CONTENT_TYPE
See Also:
Constant Field Values

ATTR_NAME_HTTP_CHARACTER_SET

public static final String ATTR_NAME_HTTP_CHARACTER_SET
See Also:
Constant Field Values

ATTR_NAME_HTTP_CONNECTION

public static final String ATTR_NAME_HTTP_CONNECTION
See Also:
Constant Field Values

ATTR_NAME_HTTP_AUTH_ENTRY

public static final String ATTR_NAME_HTTP_AUTH_ENTRY
See Also:
Constant Field Values

HTTP_BAD_REQUEST

public static final String HTTP_BAD_REQUEST
See Also:
Constant Field Values
Constructor Detail

HTTPServerConnector

public HTTPServerConnector()
Method Detail

initialize

public void initialize(Object aObject)
                throws Exception
Description copied from class: Connector
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.

Specified by:
initialize in interface ConnectorInterface
Overrides:
initialize in class Connector
Parameters:
aObject - User provided parameter
Throws:
Exception

getNextClient

public ConnectorInterface getNextClient()
                                 throws Exception
Description copied from class: Connector
Server mode - return a clone of self that handles the next client instance when running in server mode. The returned connector may be used in its own thread to handle a "client" request so if the returned instance is returned more than once it must be thread safe.

Specified by:
getNextClient in interface ConnectorInterface
Overrides:
getNextClient in class Connector
Throws:
Exception

getServerConnector

public HTTPServerConnector getServerConnector()
Returns the server connector if this connector is handling an LDAP client session.


setServerConnector

public void setServerConnector(HTTPServerConnector aServerConnector)
Sets the server connector for this connector.


isAccepting

public boolean isAccepting()
Returns true if this connector is currently waiting for a client connection.


isTerminating

public boolean isTerminating()
Returns true if this connector has the termination flag set.


terminateServer

public void terminateServer()
                     throws Exception
This method tries to terminate the server by setting the termination flag for the connector returned by getServerConnector and immediatly connecting to its port (which should fail).

Specified by:
terminateServer in interface ConnectorInterface
Overrides:
terminateServer in class Connector
Throws:
Exception

terminate

public void terminate()
               throws Exception
Description copied from class: Connector
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.

Specified by:
terminate in interface ConnectorInterface
Overrides:
terminate in class Connector
Throws:
Exception

getNextEntry

public Entry getNextEntry()
                   throws Exception
Description copied from class: Connector
Returns the next Entry from the connector. The entry is populated with attributes and values from the next entry in the input set.

Specified by:
getNextEntry in interface ConnectorInterface
Overrides:
getNextEntry in class Connector
Returns:
- the next Entry, or null if no more data
Throws:
Exception
See Also:
Connector.selectEntries()

putEntry

public void putEntry(Entry aEntry)
              throws Exception
Description copied from class: Connector
Adds a new entry to the data source

Specified by:
putEntry in interface ConnectorInterface
Overrides:
putEntry in class Connector
Parameters:
aEntry - The entry data to add
Throws:
Exception - Any exceptions thrown by the connector's underlying classes

replyEntry

public void replyEntry(Entry aEntry)
                throws Exception
Description copied from class: Connector
Send a reply to the connector.

Specified by:
replyEntry in interface ConnectorInterface
Overrides:
replyEntry in class Connector
Throws:
Exception

getUserName

public String getUserName()

getPassword

public String getPassword()

rejectClientAuthentication

public void rejectClientAuthentication()
                                throws Exception
Throws:
Exception

setProperty

public void setProperty(Entry aEntry,
                        String aProperty,
                        Object aValue,
                        boolean aTcpDataAsProps)

getVersion

public String getVersion()
Return version information

Specified by:
getVersion in interface VersionInfoInterface