|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.limitless.util.GeneralAnnotation
org.limitless.nmc.Client.MuConnector
public class MuConnector
This class provides an event-source and sink for MU connections. It is used to hide details of any _particular_ flavor of text-based VR system. It feeds us MessageEvents, which include responses to commands as well as unsolicited IO.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.limitless.util.Annotation |
|---|
Annotation.AnnotationNotFoundException |
| Field Summary | |
|---|---|
private java.util.LinkedList |
assemblyBuffer
|
private GeneralEventSource |
eventSource
|
(package private) MuLineEvent.Source |
muConnection
|
| Constructor Summary | |
|---|---|
MuConnector(MuLineEvent.Source source)
|
|
| Method Summary | |
|---|---|
void |
addMessageListener(MessageEvent.Listener aListener)
|
private void |
deliverDiscardedMessage(MessageEvent event)
This fulfills the "Deliver Discarded Message" contract. |
private void |
deliverMessage(MessageEvent messageIn)
This fulfills the "Deliver message to each listener" contract. |
private void |
deliverStatusMessage(MessageEvent event)
|
boolean |
equals(java.lang.Object o)
|
UriIdentifier |
getMuURI()
|
int |
hashCode()
|
void |
processConnect(MuLineEvent theEvent)
This is called when a connection is established to a MU |
void |
processDisconnect(MuLineEvent theEvent)
This is called when a connection is lost to the MU |
void |
processLoginFails(MuLineEvent theEvent)
This event occurs when a login fails |
void |
processPrefixLine(MuLineEvent theEvent)
This is a prefix line from the MU |
void |
processReset(MuLineEvent theEvent)
This is a command that was requested but not sent and therefore will never have data returned from it. |
void |
processShutdownOfSource(MuLineEvent theEvent)
This happens when a shutdown() occurs and no further messages will follow. |
void |
processSuffixLine(MuLineEvent theEvent)
This is a suffix line from the MU. |
void |
processTextLine(MuLineEvent theEvent)
This is given a line of text from the MU that is not a suffix or prefix. |
void |
removeMessageListener(MessageEvent.Listener aListener)
|
boolean |
sendRequestToMU(java.lang.String request)
This sends a single command to a MU and returns false if the command couldn't be delivered. |
void |
shutdown()
|
| Methods inherited from class org.limitless.util.GeneralAnnotation |
|---|
getAnnotation, removeAnnotation, setAnnotation |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.limitless.util.Annotation |
|---|
getAnnotation, removeAnnotation, setAnnotation |
| Field Detail |
|---|
MuLineEvent.Source muConnection
private java.util.LinkedList assemblyBuffer
private GeneralEventSource eventSource
| Constructor Detail |
|---|
public MuConnector(MuLineEvent.Source source)
| Method Detail |
|---|
public void shutdown()
shutdown in interface MessageEvent.Sourcepublic void processLoginFails(MuLineEvent theEvent)
MuLineEvent.Listener
processLoginFails in interface MuLineEvent.Listenerpublic void processShutdownOfSource(MuLineEvent theEvent)
MuLineEvent.Listener
processShutdownOfSource in interface MuLineEvent.Listenerpublic void processTextLine(MuLineEvent theEvent)
MuLineEvent.Listener
processTextLine in interface MuLineEvent.Listenerpublic void processConnect(MuLineEvent theEvent)
processConnect in interface MuLineEvent.Listenerpublic void processDisconnect(MuLineEvent theEvent)
processDisconnect in interface MuLineEvent.Listenerpublic void processPrefixLine(MuLineEvent theEvent)
MuLineEvent.Listener
processPrefixLine in interface MuLineEvent.Listenerpublic void processSuffixLine(MuLineEvent theEvent)
MuLineEvent.Listener
processSuffixLine in interface MuLineEvent.Listenerpublic void processReset(MuLineEvent theEvent)
MuLineEvent.Listener
processReset in interface MuLineEvent.Listenerpublic boolean sendRequestToMU(java.lang.String request)
MessageEvent.Source
sendRequestToMU in interface MessageEvent.Sourcepublic void addMessageListener(MessageEvent.Listener aListener)
addMessageListener in interface MessageEvent.Sourcepublic void removeMessageListener(MessageEvent.Listener aListener)
removeMessageListener in interface MessageEvent.Source
public UriIdentifier getMuURI()
throws java.net.MalformedURLException
getMuURI in interface MessageEvent.Sourcejava.net.MalformedURLExceptionprivate void deliverMessage(MessageEvent messageIn)
private void deliverDiscardedMessage(MessageEvent event)
private void deliverStatusMessage(MessageEvent event)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||