org.nlogo.api
Interface HubNetInterface

All Superinterfaces:
ViewInterface

public interface HubNetInterface
extends ViewInterface


Method Summary
 boolean addNarrowcastPlot(String plotName)
           
 void broadcast(Object data)
           
 void broadcast(String variableName, Object data)
          Send a message to all clients
 void broadcastClearText()
           
 void broadcastUserMessage(String text)
           
 void broadcastView()
           
 void clearOverride(String client, Class<? extends Agent> agentClass, String varName, List<Long> overrides)
           
 void clearOverrideLists(String client)
           
 void clearPlot(String clientId)
           
 void clearText(List<String> nodes)
           
 Object clientEditor()
           
 void closeClientEditor()
           
 boolean connectionsExist()
           
 void disconnect()
           
 boolean enterMessage()
           
 boolean exitMessage()
           
 void fetchMessage()
           
 int getInQueueSize()
           
 int getInterfaceHeight()
           
 int getInterfaceWidth()
           
 Object getMessage()
           
 String getMessageSource()
           
 String getMessageTag()
           
 double getOutQueueSize()
           
 void importClientInterface(String path, boolean client)
           
 void incrementalUpdateFromEventThread()
           
 void load(String[] lines, String version)
           
 boolean messageWaiting()
           
 void newClient(boolean isRobo, int waitTime)
           
 void openClientEditor()
           
 void plot(String clientId, double y)
           
 void plot(String clientId, double x, double y)
           
 void plotPenDown(String clientId, boolean penDown)
           
 void reset()
           
 void save(StringBuilder buf)
           
 void send(List<String> nodes, String tag, Object message)
          Send a message to each node (client) in the list for the given tag
 boolean send(String node, String tag, Object message)
          Send message to a single client for the given tag
 void sendAgentPerspective(String client, int perspective, Class<? extends Agent> agentType, long id, double radius, boolean serverMode)
           
 void sendClear()
           
 void sendLine(double x0, double y0, double x1, double y1, Object color, double size, String mode)
           
 void sendOverrideList(String client, Class<? extends Agent> agentClass, String varName, Map<Long,Object> overrides)
           
 void sendStamp(Agent agent, boolean erase)
           
 void sendText(List<String> nodes, String text)
           
 void sendUserMessage(List<String> nodes, String text)
           
 void setClientInterface(String interfaceType, LogoList interfaceInfo)
           
 void setHistogramNumBars(String clientId, int num)
           
 void setPlotPenInterval(String clientId, double interval)
           
 void setPlotPenMode(String clientId, int plotPenMode)
           
 void setTitle(String title, String directory, ModelType type)
           
 void showControlCenter()
           
 
Methods inherited from interface org.nlogo.api.ViewInterface
applyNewFontSize, framesSkipped, isDead, mouseDown, mouseInside, mouseXCor, mouseYCor, paintImmediately, repaint, resetMouseCors, shapeChanged, viewIsVisible
 

Method Detail

messageWaiting

boolean messageWaiting()
                       throws LogoException
Throws:
LogoException

enterMessage

boolean enterMessage()
                     throws LogoException
Throws:
LogoException

exitMessage

boolean exitMessage()
                    throws LogoException
Throws:
LogoException

fetchMessage

void fetchMessage()
                  throws LogoException
Throws:
LogoException

getMessage

Object getMessage()
                  throws LogoException
Throws:
LogoException

getMessageSource

String getMessageSource()
                        throws LogoException
Throws:
LogoException

getMessageTag

String getMessageTag()
                     throws LogoException
Throws:
LogoException

broadcast

void broadcast(String variableName,
               Object data)
               throws LogoException
Send a message to all clients

Throws:
LogoException

broadcast

void broadcast(Object data)
               throws LogoException
Throws:
LogoException

sendText

void sendText(List<String> nodes,
              String text)

clearText

void clearText(List<String> nodes)

broadcastClearText

void broadcastClearText()
                        throws LogoException
Throws:
LogoException

sendUserMessage

void sendUserMessage(List<String> nodes,
                     String text)

broadcastUserMessage

void broadcastUserMessage(String text)
                          throws LogoException
Throws:
LogoException

send

void send(List<String> nodes,
          String tag,
          Object message)
          throws LogoException
Send a message to each node (client) in the list for the given tag

Throws:
LogoException

send

boolean send(String node,
             String tag,
             Object message)
             throws LogoException
Send message to a single client for the given tag

Throws:
LogoException

disconnect

void disconnect()

connectionsExist

boolean connectionsExist()

reset

void reset()
           throws LogoException
Throws:
LogoException

setClientInterface

void setClientInterface(String interfaceType,
                        LogoList interfaceInfo)
                        throws LogoException
Throws:
LogoException

newClient

void newClient(boolean isRobo,
               int waitTime)

sendOverrideList

void sendOverrideList(String client,
                      Class<? extends Agent> agentClass,
                      String varName,
                      Map<Long,Object> overrides)
                      throws LogoException
Throws:
LogoException

clearOverride

void clearOverride(String client,
                   Class<? extends Agent> agentClass,
                   String varName,
                   List<Long> overrides)
                   throws LogoException
Throws:
LogoException

clearOverrideLists

void clearOverrideLists(String client)

sendAgentPerspective

void sendAgentPerspective(String client,
                          int perspective,
                          Class<? extends Agent> agentType,
                          long id,
                          double radius,
                          boolean serverMode)

incrementalUpdateFromEventThread

void incrementalUpdateFromEventThread()
Specified by:
incrementalUpdateFromEventThread in interface ViewInterface

broadcastView

void broadcastView()
                   throws LogoException
Throws:
LogoException

sendLine

void sendLine(double x0,
              double y0,
              double x1,
              double y1,
              Object color,
              double size,
              String mode)

sendStamp

void sendStamp(Agent agent,
               boolean erase)

sendClear

void sendClear()

showControlCenter

void showControlCenter()

getOutQueueSize

double getOutQueueSize()
                       throws LogoException
Throws:
LogoException

getInQueueSize

int getInQueueSize()
                   throws LogoException
Throws:
LogoException

save

void save(StringBuilder buf)

closeClientEditor

void closeClientEditor()

openClientEditor

void openClientEditor()

clientEditor

Object clientEditor()

load

void load(String[] lines,
          String version)

importClientInterface

void importClientInterface(String path,
                           boolean client)
                           throws IOException
Throws:
IOException

setTitle

void setTitle(String title,
              String directory,
              ModelType type)

getInterfaceWidth

int getInterfaceWidth()

getInterfaceHeight

int getInterfaceHeight()

addNarrowcastPlot

boolean addNarrowcastPlot(String plotName)

plot

void plot(String clientId,
          double y)

plot

void plot(String clientId,
          double x,
          double y)

clearPlot

void clearPlot(String clientId)

plotPenDown

void plotPenDown(String clientId,
                 boolean penDown)

setPlotPenMode

void setPlotPenMode(String clientId,
                    int plotPenMode)

setHistogramNumBars

void setHistogramNumBars(String clientId,
                         int num)

setPlotPenInterval

void setPlotPenInterval(String clientId,
                        double interval)