package com.sequencelogic; import java.util.Date; import com.sequencelogic.K2Client; import com.sequencelogic.K2ClientConstants; public class K2Client { public static final int PORT_DEFAULT = K2ClientConstants.DEFAULT_UDP_PORT; public static final String INFO_PREFIX = K2ClientConstants.MESSAGE_PREFIX_FROM_CLOUD; public static final String INT_PREFIX = K2ClientConstants.MESSAGE_PREFIX_INTERNAL; public static final String ERR_PREFIX = K2ClientConstants.MESSAGE_PREFIX_INTERNAL+K2ClientConstants.MESSAGE_2ND_PREFIX_FOR_ERRORS; public static final String STATUS_PREFIX = K2ClientConstants.MESSAGE_PREFIX_DEVICE_STATUS; /** * The supplied class must provide a static method that takes a single String which is the "info" * sent by the Daemon to this client. * E.g. initialize("localhost:32000", "SyncAndMessageDispatch", "k2dataReceived") * @param classLoader null or classLoader (Tomcat) * @param hosts bar delimited set of hosts with optional ports * @param urn device URN */ public native void initialize(Object classLoader, String callbackClassNameDotted, String hosts, String urn); public native void shutdown(); public native void login(); public native void logout(); public native String statistics(); /** * Get notified when an office in the provided list changes online/offline state. * Your callbackClassNameDotted.k2dataReceived method will be invoked with: *
* 'status:' -
*
*
*