managers
Class NetworkManager

java.lang.Object
  extended by managers.NetworkManager

public class NetworkManager
extends Object

Responsible for networking.


Method Summary
 boolean isConnectionInitiated()
          Answers if the connection with the server is initialized.
 void remoteCall(Node remoteNode, ByteArray... arguments)
          Invokes a remote call to the server.
 void setGaugeToSynchronizeWith(Gauge gauge)
          The Gauge object set with this method will be used by the NetworkManager to report the progress of downloading data from the server.
 void stopDownloading()
          Forces the network connection to close.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isConnectionInitiated

public boolean isConnectionInitiated()
Answers if the connection with the server is initialized.

Returns:
true if the network connection has been initialized, false otherwise.
Usage examples:
     <blue:call manager="NetworkManager" 
                method="isConnectionInitiated 
                toVariable="isInitialized"/>
 

remoteCall

public void remoteCall(Node remoteNode,
                       ByteArray... arguments)
Invokes a remote call to the server. Any content returned from the server will be queued for procesing with ProcessingManager.

Parameters:
remoteNode - node to communicate with
arguments - ByteArray type arguments to transfer to the server
Usage examples:
This method can be invoked explicitly, like any other Bluelemon method:
     <blue:call manager="NetworkManager" method="remoteCall">
       <blue:argument type="node" location="network"
                      name="com/emarson/bluelemon/example"/>
       <blue:argument type="variable" name="byteArrVar"/>
       <blue:argument type="String" name="string"/>
       <blue:argument type="int" name="6"/>
     </blue:call>
 
However, in most cases it is more convenient to use the equivalent <call node='...' location='...'> syntax:
     <blue:call node="com/emarson/bluelemon/example"
                     location="network">
       <blue:argument type="variable" name="byteArrVar"/>
       <blue:argument type="String" name="string"/>
       <blue:argument type="int" name="6"/>
     </blue:call>
 

setGaugeToSynchronizeWith

public void setGaugeToSynchronizeWith(Gauge gauge)
The Gauge object set with this method will be used by the NetworkManager to report the progress of downloading data from the server.

Parameters:
gauge - the Gauge object to use for showing the progress of downloading the data
Usage examples:
     <blue:call manager="NetworkManager" 
                method="setGaugeToSynchronizeWith">
       <blue:argument type="variable" name="gauge"/>
     </blue:call>
 

stopDownloading

public void stopDownloading()
Forces the network connection to close.

Usage examples:
     <blue:call manager="NetworkManager" 
                method="stopDownloading"/>
 


Copyright © 2007 E-MARSON. All Rights Reserved.