RW
- the Rewrite Machine instancepublic class CoMingleAndroidRuntime<RW extends comingle.rewrite.RewriteMachine>
extends comingle.comms.datapipe.DataPipeManager<comingle.facts.SerializedFact,java.lang.String>
implements comingle.comms.log.Logger
Constructor and Description |
---|
CoMingleAndroidRuntime(android.app.Activity activity,
java.lang.Class<RW> rwClass,
int adminPort,
int factPort,
java.lang.String defaultReqCode)
Basic Constructor
|
CoMingleAndroidRuntime(android.app.Activity activity,
java.lang.Class<RW> rwClass,
java.lang.String defaultReqCode)
Default constructor, setup runtime with admin port '8010' and data port '6565'.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close all operations of the rewrite machine.
|
void |
err(java.lang.String msg) |
CompositeDirectory |
getDirectory()
Returns the composite directory of this runtime.
|
int |
getLocation()
Get the location ID of this rewrite machine.
|
RW |
getRewriteMachine()
Returns the rewrite machine
|
void |
handleOnActivityResults(int requestCode)
Handling operation for returning from wifi-adapter setup.
|
void |
info(java.lang.String msg) |
boolean |
initRewriteMachine()
Initialize the rewrite machine
|
void |
initStandardDirectorySetup(int peer_list_row,
int peer_name,
int peer_loc,
int peer_ip)
Initialize standard directory setup dialog sequence, with directory chosen listener set to null.
|
void |
initStandardDirectorySetup(int peer_list_row,
int peer_name,
int peer_loc,
int peer_ip,
comingle.android.directory.ui.dialogsequences.DirectoryChosenListener<comingle.comms.message.Message> postDirChoiceListener)
Initialize standard directory setup dialog sequence
|
boolean |
isMember()
Returns true if this runtime is a member.
|
boolean |
isOwner()
Returns true if this runtime is an owner.
|
boolean |
isRewriteReady()
Returns true if rewrite runtime has been started.
|
void |
log(java.lang.String msg) |
void |
pauseNetworkNotifications()
Pause all network notifications.
|
void |
resumeNetworkNotifications()
Resume all network notifications.
|
boolean |
startRewriteMachine()
Start the rewrite machine
|
sendData, sendData, sendData, sendData, sendDataThreaded, sendDataThreaded
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public CoMingleAndroidRuntime(android.app.Activity activity, java.lang.Class<RW> rwClass, int adminPort, int factPort, java.lang.String defaultReqCode)
activity
- the activity that embeds this CoMingle runtime instance.rwClass
- the class of the CoMingle runtime.adminPort
- port number for administrative messages.factPort
- port number for actual payload data.defaultReqCode
- default request code of the application.public CoMingleAndroidRuntime(android.app.Activity activity, java.lang.Class<RW> rwClass, java.lang.String defaultReqCode)
activity
- the activity that embeds this CoMingle runtime instance.rwClass
- the class of the CoMingle runtime.defaultReqCode
- default request code of the application.public void initStandardDirectorySetup(int peer_list_row, int peer_name, int peer_loc, int peer_ip, comingle.android.directory.ui.dialogsequences.DirectoryChosenListener<comingle.comms.message.Message> postDirChoiceListener)
peer_list_row
- Resource ID of row view for each node entry.peer_name
- Resource ID of name field for a node.peer_loc
- Resource ID of location field for a node.peer_ip
- Resource ID of address field for a node.postDirChoiceListener
- the directory chosen listener to invoke after user has chosen directory.public void initStandardDirectorySetup(int peer_list_row, int peer_name, int peer_loc, int peer_ip)
peer_list_row
- Resource ID of row view for each node entry.peer_name
- Resource ID of name field for a node.peer_loc
- Resource ID of location field for a node.peer_ip
- Resource ID of address field for a node.public void handleOnActivityResults(int requestCode)
requestCode
- the request code of the activity result return.public void resumeNetworkNotifications()
public void pauseNetworkNotifications()
public CompositeDirectory getDirectory()
public boolean initRewriteMachine()
public boolean startRewriteMachine()
public RW getRewriteMachine()
public void close()
close
in class comingle.comms.datapipe.DataPipeManager<comingle.facts.SerializedFact,java.lang.String>
public int getLocation()
public boolean isOwner()
public boolean isMember()
public boolean isRewriteReady()
public void log(java.lang.String msg)
log
in interface comingle.comms.log.Logger
public void err(java.lang.String msg)
err
in interface comingle.comms.log.Logger
public void info(java.lang.String msg)
info
in interface comingle.comms.log.Logger