org.cruxframework.crux.core.clientoffline
Class Network

java.lang.Object
  extended by org.cruxframework.crux.core.clientoffline.Network
All Implemented Interfaces:
HasNetworkHandlers

public class Network
extends Object
implements HasNetworkHandlers

A Network detection tool.

Author:
Thiago da Rosa de Bustamante

Nested Class Summary
static class Network.CacheManifestImpl
           
static class Network.Impl
           
static class Network.SafariImpl
           
static class Network.UnsupportedImpl
           
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addNetworkHandler(NetworkEvent.Handler handler)
          Add a network events handler
static Network get()
          Retrieve the Network instance
 boolean isOnLine()
          Returns true if the application has network connection
 boolean isSupported()
          Check if this browser support Crux offLine working.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static Network get()
Retrieve the Network instance

Returns:

isOnLine

public boolean isOnLine()
Returns true if the application has network connection

Specified by:
isOnLine in interface HasNetworkHandlers
Returns:
true if onLine, false otherwise

addNetworkHandler

public com.google.gwt.event.shared.HandlerRegistration addNetworkHandler(NetworkEvent.Handler handler)
Add a network events handler

Specified by:
addNetworkHandler in interface HasNetworkHandlers
Parameters:
handler - the handler
Returns:
the handler registration

isSupported

public boolean isSupported()
Check if this browser support Crux offLine working.

Returns:
true if offLine is supported.


Copyright © 2014. All rights reserved.