org.nukesoft.bot2.lineproc
Interface LineProc

All Known Implementing Classes:
GenericLineProc

public interface LineProc

The LineProc interface is the interface implemented by all external line processor libraries. A new line processor instance is loaded for each active conversation. Line processors need not be thread safe and can mantain internal state.

Author:
Ryan Michela

Method Summary
 void bindContext(LineProcContext context)
          Binds a context to the line processor.
 void handleIM(IM message)
          Handles an incomming IM.
 void handleWarn(String screenName)
          Handles an incomming warning.
 void init(String screenName)
          Called as soon as a line processor is loaded.
 void shutdown()
          Shuts down the line processor.
 

Method Detail

init

public void init(String screenName)
Called as soon as a line processor is loaded. Used to perform any necesary initialization. It is better to do initialization here because you have access to the remote screen name of the person doing the initialization.

Parameters:
screenName - The name of the dialog that is initializing the line processor.

bindContext

public void bindContext(LineProcContext context)
Binds a context to the line processor.

Parameters:
context - The context to bind.

handleIM

public void handleIM(IM message)
Handles an incomming IM. This method should generate a response IM, but that is not required.

Parameters:
message - The incomming message.

handleWarn

public void handleWarn(String screenName)
Handles an incomming warning.

Parameters:
screenName - The screen name doing the warning.

shutdown

public void shutdown()
Shuts down the line processor. Used to kill any started threads.