|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--NetworkHandler
NetworkHandler handles the XMLSocket and executes network actions The NetworkHandler handles both the network messages as well as message construction and message parsing. It will send events to the GUI to draw as well as accepts commands from the GUI layer.
Field Summary | |
static java.net.InetAddress |
currentHost
the host to connect to |
static int |
currentPort
the port to connect to |
Method Summary | |
void |
disconnect(Connection conn)
disconnect from the Connection conn Fully Disconnect a Connection. |
static java.net.InetAddress |
getCurrentHost()
Get's the current Host |
static int |
getCurrentPort()
gets the current port |
void |
getLastUpdateTime()
sends the get last update time message and returns value in a callback. |
void |
getLastUpdateTime(int lastTime)
sends the get last update time message and returns value in a callback. |
void |
getView()
sends the get last update time message and returns value in a callback. |
void |
messageHandle(XMLString value)
MessagesHandler, handles XML messages. |
static NetworkHandler |
networkHandler(ViewWindow view)
Singleton, returns a network handler handling view. |
void |
patch(Connection connIn,
Connection connOut)
Sends Connector a message to patch the connection represented by "connect1" to the connection represented by "connect2". |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange listener accepts messages from XMLSocket |
static void |
setCurrentHost(java.net.InetAddress i)
set the current host with address i |
static void |
setCurrentPort(int i)
set the current port with i |
void |
shutDown()
sends the shutdown message to the server |
void |
unPatch(Connection connIn,
Connection connOut)
Unpatches and patch between connections "connect1" and "connect2" |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.net.InetAddress currentHost
public static int currentPort
Method Detail |
public static void setCurrentHost(java.net.InetAddress i)
i
- the address of the host to connect topublic static void setCurrentPort(int i)
i
- the port of the host to connect topublic static java.net.InetAddress getCurrentHost()
public static int getCurrentPort()
public static NetworkHandler networkHandler(ViewWindow view)
view
- the ViewWindow which recieves events from the NetworkHandlerpublic void disconnect(Connection conn) throws java.io.IOException
conn
- the connection to disconnect
java.io.IOException
- if there is an IOException (e.g. can't send a message)public void unPatch(Connection connIn, Connection connOut) throws java.io.IOException
connIn
- the connection to unpatch FromconnOut
- the connection to unpatch To
java.io.IOException
- if there is an IOException (e.g. can't send a message)public void patch(Connection connIn, Connection connOut) throws java.io.IOException
connIn
- the connection to patch FromconnOut
- the connection to patch To
java.io.IOException
- if there is an IOException (e.g. can't send a message)public void getLastUpdateTime() throws java.io.IOException
java.io.IOException
- if there is an IOException (e.g. can't send a message)public void getLastUpdateTime(int lastTime) throws java.io.IOException
lastTime
- the lastTime we asked.
java.io.IOException
- if there is an IOException (e.g. can't send a message)public void getView() throws java.io.IOException
java.io.IOException
- if there is an IOException (e.g. can't send a message)public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
evt
- the eventpublic void shutDown() throws java.io.IOException
java.io.IOException
- if there is an IOException (e.g. can't send a message)public void messageHandle(XMLString value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |