|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--org.nukesoft.bot2.core.Dialog
A Dialog is the bridge between CommPort objects and LineProc objects. They serve to provide the internal glue that binds the two ends togeather. All Dialog objects are managed by the DialogManager class.
Constructor Summary | |
Dialog(DialogManager manager,
CommPort comm,
DynamicLoadLPContext lineProc,
String identity,
String adminEscapeSequence,
String adminLineProcBindID)
Creates a dialog binding. |
Method Summary | |
void |
addObserver(Observer o)
|
boolean |
bindConversation(String dialogID)
Binds this dialog to another. |
void |
deleteObserver(Observer o)
|
int |
getAge()
Gets the Dialog age. |
Set |
getComPortBindIDs()
Returns a set of comm port bind ids. |
Set |
getConversations()
Returns a list of active conversations. |
String |
getIdentity()
Returns this dialog's identity. |
Set |
getLineProcBindIDs()
Returns a set of line proc bind ids. |
String |
getLineProcLibPath(String lineProcBindID)
Returns the line proc lib path based on bind ID. |
String |
getWarningLevel()
Gets the warning level from the CommLib. |
void |
handleIM(IM message)
Handles incomming message from the CommLib. |
void |
handleWarn(String screenName)
Handles incomming warning from the CommLib. |
void |
initiateConversation(String commPortBindID,
String remoteScreenName,
String salutation)
Initiates a conversation. |
void |
interject(String dialogID,
String interjection)
Interjects text into a conversation. |
boolean |
loadNewLineProcOnPeer(String dialogID,
String lineProcBindID)
Tells a peer to load a new line proc. |
void |
sendIM(IM message)
Sends an outbound IM. |
void |
sendWarning(String screenName,
boolean anonymous)
Sends an outbound warning. |
void |
shutdown()
Cleanly shuts down the Dialog. |
void |
tickAge()
Incraments the age by one. |
boolean |
unbindConversation(String dialogID)
Unbinds this dialog from another. |
void |
update(Observable o,
Object arg)
Handles incomming message forewards. |
Methods inherited from class java.util.Observable |
clearChanged, countObservers, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Dialog(DialogManager manager, CommPort comm, DynamicLoadLPContext lineProc, String identity, String adminEscapeSequence, String adminLineProcBindID)
Method Detail |
public void handleIM(IM message)
message
- The message to foreward.public void handleWarn(String screenName)
screenName
- The screen name doing the warning.public Set getConversations()
getConversations
in interface LineProcContextCallback
LineProcContextCallback.getConversations()
public String getIdentity()
getIdentity
in interface LineProcContextCallback
LineProcContextCallback.getIdentity()
public String getWarningLevel()
getWarningLevel
in interface LineProcContextCallback
LineProcContextCallback.getWarningLevel()
public void sendIM(IM message)
sendIM
in interface LineProcContextCallback
message
- The IM to send.LineProcContextCallback.sendIM(org.nukesoft.bot2.core.IM)
public void sendWarning(String screenName, boolean anonymous)
sendWarning
in interface LineProcContextCallback
screenName
- The screen name to warn.anonymous
- If TRUE, warn anonymously.LineProcContextCallback.sendWarning(java.lang.String, boolean)
public boolean bindConversation(String dialogID)
bindConversation
in interface LineProcContextCallback
dialogID
- Dialog ID to bind to in the format
CommPortBindName~ForeignScreenName.LineProcContextCallback.bindConversation(java.lang.String)
public boolean unbindConversation(String dialogID)
unbindConversation
in interface LineProcContextCallback
dialogID
- Dialog ID to unbind from in the format
CommPortBindName~ForeignScreenName.LineProcContextCallback.unbindConversation(java.lang.String)
public void tickAge()
public int getAge()
public void shutdown()
public void update(Observable o, Object arg)
update
in interface Observer
arg
- The third party IMObserver.update(java.util.Observable, java.lang.Object)
public void addObserver(Observer o)
addObserver
in class Observable
Observable.addObserver(java.util.Observer)
public void deleteObserver(Observer o)
deleteObserver
in class Observable
Observable.deleteObserver(java.util.Observer)
public Set getComPortBindIDs()
getComPortBindIDs
in interface LineProcContextCallback
LineProcContextCallback.getComPortBindIDs()
public Set getLineProcBindIDs()
getLineProcBindIDs
in interface LineProcContextCallback
LineProcContextCallback.getLineProcBindIDs()
public void initiateConversation(String commPortBindID, String remoteScreenName, String salutation)
initiateConversation
in interface LineProcContextCallback
commPortBindID
- The commPort to use for the dialog.remoteScreenName
- The screen name to initiate a conversation with.salutation
- The salutation to send them.LineProcContextCallback.initiateConversation(java.lang.String, java.lang.String, java.lang.String)
public void interject(String dialogID, String interjection)
interject
in interface LineProcContextCallback
dialogID
- The name of the dialog to interject into.interjection
- The text to interject with.LineProcContextCallback.interject(java.lang.String, java.lang.String)
public String getLineProcLibPath(String lineProcBindID)
getLineProcLibPath
in interface LineProcContextCallback
lineProcBindID
- The bind ID to look up.
LineProcContextCallback.getLineProcLibPath(java.lang.String)
public boolean loadNewLineProcOnPeer(String dialogID, String lineProcBindID)
loadNewLineProcOnPeer
in interface LineProcContextCallback
dialogID
- The peer to manipulate.lineProcBindID
- The line proc to load.
LineProcContextCallback.loadNewLineProcOnPeer(java.lang.String, java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |