applications.proxy.main
Class MooCommunicator


public class MooCommunicator

Description of the Class

Author:
igasp
created January 25, 2001

Inner Class Summary
 (package private) classMooCommunicator.MooListener
          Description of the Class

Field Summary
 (package private) static CategoryLog
           
 protected booleanm_connected
          Description of the Field
 private booleanm_currentlyReadingMamMessage
           
 private booleanm_exporting
           
 private StringBufferm_incomingMamMessage
           
 protected booleanm_initialConnectFinished
          Description of the Field
 private booleanm_isGuest
           
 protected MooListenerm_listener
          Description of the Field
 private final static Stringm_mamMessageEndFlag
           
 private final static Stringm_mamMessageStartFlag
           
 protected booleanm_mapHTML
          Description of the Field
 protected booleanm_mapVRML
          Description of the Field
 protected BufferedReaderm_mooInput
          Description of the Field
 protected PrintWriterm_mooOutput
          Description of the Field
 protected Socketm_mooSocket
          Description of the Field
 protected MooOutputInterfacem_output
          Description of the Field
 private Stringm_transOption
           
 private StringPROXYTRANS
           

Constructor Summary
MooCommunicator(MooOutputInterface outputTarget)
          Constructor for the MooCommunicator object
MooCommunicator(MooOutputInterface outputTarget, String userName, String password)
          Constructor for the MooCommunicator object

Method Summary
 protected voidaddMooShutdownHook()
           
 booleancanHandleCommand(String commandString)
          Description of the Method
 protected voidconnectToMoo(String hostName, int hostPort, String username, String password)
          Description of the Method
 protected booleangetExporting()
           
 voidhandleCommand(String commandString)
          Description of the Method
 private voidhandleMooConnect()
          Description of the Method
 voidhandleMooQuit()
          Description of the Method
 private voidhandleSilentTranslate(String commandString)
          Description of the Method
 private voidhandleTranslate(String commandString)
          Description of the Method
 booleanisCurrentlyConnected()
          Gets the CurrentlyConnected attribute of the MooCommunicator object
 booleanisGuest()
           
 voidlogin(String userName, String password)
          Description of the Method
 private voidmapHTMLOn()
          Description of the Method
 private voidmappingOff()
          Description of the Method
 private voidmapVRMLOn()
          Description of the Method
 protected voidprocessConnectCommand(String connectString)
          Expected format of string:
 protected voidsetExporting(boolean exporting)
           
 voidsetGuest(boolean b)
           
 private voidupdateTranslation(String commandString)
          Description of the Method

Field Detail

Log

static Category Log

m_connected

protected boolean m_connected
Description of the Field
Since:

m_currentlyReadingMamMessage

private boolean m_currentlyReadingMamMessage

m_exporting

private boolean m_exporting

m_incomingMamMessage

private StringBuffer m_incomingMamMessage

m_initialConnectFinished

protected boolean m_initialConnectFinished
Description of the Field
Since:

m_isGuest

private boolean m_isGuest

m_listener

protected MooListener m_listener
Description of the Field
Since:

m_mamMessageEndFlag

private final static String m_mamMessageEndFlag

m_mamMessageStartFlag

private final static String m_mamMessageStartFlag

m_mapHTML

protected boolean m_mapHTML
Description of the Field
Since:

m_mapVRML

protected boolean m_mapVRML
Description of the Field
Since:

m_mooInput

protected BufferedReader m_mooInput
Description of the Field
Since:

m_mooOutput

protected PrintWriter m_mooOutput
Description of the Field
Since:

m_mooSocket

protected Socket m_mooSocket
Description of the Field
Since:

m_output

protected MooOutputInterface m_output
Description of the Field
Since:

m_transOption

private String m_transOption

PROXYTRANS

private String PROXYTRANS
Constructor Detail

MooCommunicator

public MooCommunicator(MooOutputInterface outputTarget)
Constructor for the MooCommunicator object
Parameters:
outputTarget - Description of Parameter
Since:

MooCommunicator

public MooCommunicator(MooOutputInterface outputTarget, String userName, String password)
throws MooLoginException
Constructor for the MooCommunicator object
Parameters:
outputTarget - Description of Parameter
userName - Description of Parameter
password - Description of Parameter
Throws:
MooLoginException - Description of Exception
Since:
Method Detail

addMooShutdownHook

protected void addMooShutdownHook()

canHandleCommand

public boolean canHandleCommand(String commandString)
Description of the Method
Parameters:
commandString - Description of Parameter
Returns: Description of the Returned Value
Since:

connectToMoo

protected void connectToMoo(String hostName, int hostPort, String username, String password)
throws java.io.IOException,
MooLoginException
Description of the Method
Parameters:
hostName - Description of Parameter
hostPort - Description of Parameter
username - Description of Parameter
password - Description of Parameter
Throws:
IOException - Description of Exception
MooLoginException - Description of Exception
Since:

getExporting

protected boolean getExporting()

handleCommand

public void handleCommand(String commandString)
Description of the Method
Parameters:
commandString - Description of Parameter
Since:

handleMooConnect

private void handleMooConnect()
Description of the Method
Since:

handleMooQuit

public void handleMooQuit()
Description of the Method
Since:

handleSilentTranslate

private void handleSilentTranslate(String commandString)
Description of the Method
Parameters:
commandString - Description of Parameter
Since:

handleTranslate

private void handleTranslate(String commandString)
Description of the Method
Parameters:
commandString - Description of Parameter
Since:

isCurrentlyConnected

public boolean isCurrentlyConnected()
Gets the CurrentlyConnected attribute of the MooCommunicator object
Returns: The CurrentlyConnected value
Since:

isGuest

public boolean isGuest()

login

public void login(String userName, String password)
throws java.lang.Exception
Description of the Method
Parameters:
userName - Description of Parameter
password - Description of Parameter
Throws:
Exception - Description of Exception
Since:

mapHTMLOn

private void mapHTMLOn()
Description of the Method
Since:

mappingOff

private void mappingOff()
Description of the Method
Since:

mapVRMLOn

private void mapVRMLOn()
Description of the Method
Since:

processConnectCommand

protected void processConnectCommand(String connectString)
throws MooLoginException
Expected format of string:
Parameters:
connectString - Description of Parameter
Throws:
MooLoginException - Description of Exception
Since:

setExporting

protected void setExporting(boolean exporting)

setGuest

public void setGuest(boolean b)

updateTranslation

private void updateTranslation(String commandString)
Description of the Method
Parameters:
commandString - Description of Parameter
Since: