|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.nukesoft.bot2.lineproc.DynamicLoadLPContext
The DynamicLoadLPContext provides an internal implementation of the LineProcContext interface. It handles loading of the external LineProc class, as well as context maintnance. For each conversational dialog, there exists exactly one DynamicLoadLPContext. The context will reload a different LineProc if asked to do so by the LineProc. This keeps LineProc manipulation out of the Dialog implementation.
Constructor Summary | |
DynamicLoadLPContext(String defaultLibBindID)
Createst a DynamicLoadLPContext object and register a callback and an initial LineProc. |
Method Summary | |
void |
bindCallback(LineProcContextCallback callback)
Binds a local callback. |
boolean |
bindConversation(String dialogID)
Executes a conversation bind. |
Set |
getComPortBindIDs()
Returns a set of comm port bind IDs. |
Set |
getConversations()
Returns a list of active conversations. |
String |
getIdentity()
Returns the dialog identity string. |
Set |
getLineProcBindIDs()
Returns a set of line proc bind IDs. |
String |
getRemoteScreenName()
Returns the foreign screen name attached to this context. |
String |
getWarningLevel()
Returns the current warning level. |
void |
handleIM(IM message)
Forewards an incomming IM to the LineProc. |
void |
handleWarn(String screenName)
Forewards an incomming warning to the LineProc. |
void |
initiateConversation(String commPortBindID,
String remoteScreenName,
String salutation)
Intitiates a conversation. |
void |
interject(String dialogID,
String interjection)
Interjects into another dialog. |
String |
lastLoadedLineProc()
Returns the bind ID to the last loaded line processor. |
boolean |
loadNewLineProc(String lineProcBindID)
Loads a new line processor. |
boolean |
loadNewLineProcOnPeer(String dialogID,
String lineProcBindID)
Tells a peer to load a new line processor. |
void |
sendIM(IM message)
Sends an IM. |
void |
sendWarning(String screenName,
boolean anonymous)
Sends a warning. |
void |
shutdown()
Shuts down the current loaded line processor. |
boolean |
unbindConversation(String dialogID)
Executes a conversation unbind. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DynamicLoadLPContext(String defaultLibBindID)
defaultLibBindID
- The initial line proc bind ID to load.Method Detail |
public void bindCallback(LineProcContextCallback callback)
callback
- The callback.public void sendIM(IM message)
sendIM
in interface LineProcContext
message
- The IM to send.LineProcContext.sendIM(org.nukesoft.bot2.core.IM)
public void sendWarning(String screenName, boolean anonymous)
sendWarning
in interface LineProcContext
screenName
- The sceen name to warn.anonymous
- If true, send an anonymous warning.LineProcContext.sendWarning(java.lang.String, boolean)
public void handleIM(IM message)
message
- The message to foreward.public void handleWarn(String screenName)
screenName
- The screen name that did the warning.public boolean loadNewLineProc(String lineProcBindID)
loadNewLineProc
in interface LineProcContext
lineProcBindID
- Bind ID of the line processor to load.
LineProcContext.loadNewLineProc(java.lang.String)
public boolean loadNewLineProcOnPeer(String dialogID, String lineProcBindID)
loadNewLineProcOnPeer
in interface LineProcContext
dialogID
- The peer to manipulate.lineProcBindID
- The line proc to load.
LineProcContext.loadNewLineProcOnPeer(java.lang.String, java.lang.String)
public String lastLoadedLineProc()
lastLoadedLineProc
in interface LineProcContext
LineProcContext.lastLoadedLineProc()
public String getWarningLevel()
getWarningLevel
in interface LineProcContext
LineProcContext.getWarningLevel()
public Set getConversations()
getConversations
in interface LineProcContext
LineProcContext.getConversations()
public boolean bindConversation(String dialogID)
bindConversation
in interface LineProcContext
dialogID
- The dialog to bind to.LineProcContext.bindConversation(java.lang.String)
public boolean unbindConversation(String dialogID)
unbindConversation
in interface LineProcContext
dialogID
- The dialog to unbind from.LineProcContext.unbindConversation(java.lang.String)
public String getIdentity()
getIdentity
in interface LineProcContext
LineProcContext.getIdentity()
public String getRemoteScreenName()
LineProcContext
getRemoteScreenName
in interface LineProcContext
public void shutdown()
public Set getComPortBindIDs()
getComPortBindIDs
in interface LineProcContext
LineProcContext.getComPortBindIDs()
public Set getLineProcBindIDs()
getLineProcBindIDs
in interface LineProcContext
LineProcContext.getLineProcBindIDs()
public void initiateConversation(String commPortBindID, String remoteScreenName, String salutation)
initiateConversation
in interface LineProcContext
commPortBindID
- The commPort to use for the dialog.remoteScreenName
- The screen name to initiate a conversation with.salutation
- The salutation to send them.LineProcContext.initiateConversation(java.lang.String, java.lang.String, java.lang.String)
public void interject(String dialogID, String interjection)
interject
in interface LineProcContext
dialogID
- The name of the dialog to interject into.interjection
- The text to interject with.LineProcContext.interject(java.lang.String, java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |