|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.content.Context
android.content.ContextWrapper
android.app.Service
com.j256.ormlite.android.apptools.OrmLiteBaseService<DatabaseHelper>
de.msponer.android.yac.services.impl.YConnectionService
public class YConnectionService
Android service encapsulating communication processes between YAC and YAWL. Two sync modes are implemented (complete and live).
Nested Class Summary | |
---|---|
class |
YConnectionService.YConnectionServiceBinder
The connection binder class. |
Field Summary | |
---|---|
static String |
SYNC_ACTION_ACCEPT_OFFER
Sync-Action: Accept work item. |
static String |
SYNC_ACTION_COMPLETE
Sync-Action: Complete work item. |
static String |
SYNC_ACTION_DEALLOCATE
Sync-Action: Deallocate work item. |
static String |
SYNC_ACTION_PILE
Sync-Action: Pile work item. |
static String |
SYNC_ACTION_SAVE
Sync-Action: Save work item. |
static String |
SYNC_ACTION_SKIP
Sync-Action: Skip work item. |
static String |
SYNC_ACTION_START
Sync-Action: Start work item. |
static String |
SYNC_ACTION_SUSPEND
Sync-Action: Suspend work item. |
static String |
SYNC_ACTION_UNSUSPEND
Sync-Action: Unsuspend work item. |
Fields inherited from class android.app.Service |
---|
START_CONTINUATION_MASK, START_FLAG_REDELIVERY, START_FLAG_RETRY, START_NOT_STICKY, START_REDELIVER_INTENT, START_STICKY, START_STICKY_COMPATIBILITY |
Constructor Summary | |
---|---|
YConnectionService()
|
Method Summary | |
---|---|
boolean |
areAllInterfacesConnected()
Returns true if all interfaces are connected. |
void |
doSync()
Performs a complete sync between YAC and YAWL. |
String |
getCurrentRGHandle()
Returns the current resource gateway handle. |
String |
getCurrentWQGHandle()
Returns the current work queue gateway handle. |
org.yawlfoundation.yawl.resourcing.resource.Participant |
getParticipant()
Returns the current participant. |
String |
getPassword()
Returns the participant's password. |
org.yawlfoundation.yawl.resourcing.rsInterface.ResourceGatewayClient |
getResourceGateway()
Returns the resource gateway. |
String |
getResourceGatewayUrl()
Returns the resource gateway url. |
String |
getUsername()
Returns the participant's username. |
org.yawlfoundation.yawl.resourcing.rsInterface.WorkQueueGatewayClient |
getWorkQueueGateway()
Returns the work queue gatway. |
String |
getWorkQueueGatewayUrl()
Returns the work queue gateway url. |
boolean |
isRgConnected()
true if resource gateway is connected. |
boolean |
isWqgConnected()
true if work queue gateway is connected. |
int |
liveSyncWorkitem(MobileWorkItem wi)
Performs a live sync for a specified work item. |
IBinder |
onBind(Intent intent)
|
void |
onCreate()
|
void |
onDestroy()
|
void |
resetDb()
Resets the DB, all mobile work items are dropped. |
void |
setParticipant(org.yawlfoundation.yawl.resourcing.resource.Participant participant)
Sets the current participant. |
void |
setPassword(String password)
Sets the participant's password. |
void |
setResourceGateway(org.yawlfoundation.yawl.resourcing.rsInterface.ResourceGatewayClient resourceGateway)
Sets the resource gateway. |
void |
setResourceGatewayUrl(String resourceGatewayUrl)
Sets the resource gateway url. |
void |
setRgConnected(boolean rgConnected)
Sets the resource gateway connection flag. |
void |
setUsername(String username)
Sets the participant's username. |
void |
setWorkQueueGateway(org.yawlfoundation.yawl.resourcing.rsInterface.WorkQueueGatewayClient workQueueGateway)
Sets the work queue gatway. |
void |
setWorkQueueGatewayUrl(String workQueueGatewayUrl)
Sets the work queue gateway url. |
void |
setWqgConnected(boolean wqgConnected)
Sets the work queue gateway connection flag. |
void |
yConnect()
Initializes the connections to the resource and work queue gateway and passes participant's user credentials. |
void |
yDisconnect()
Disconnects the YAWL gateways. |
Methods inherited from class com.j256.ormlite.android.apptools.OrmLiteBaseService |
---|
getConnectionSource, getHelper, getHelperInternal, releaseHelper |
Methods inherited from class android.app.Service |
---|
dump, finalize, getApplication, onConfigurationChanged, onLowMemory, onRebind, onStart, onStartCommand, onUnbind, setForeground, startForeground, stopForeground, stopSelf, stopSelf, stopSelfResult |
Methods inherited from class android.content.Context |
---|
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SYNC_ACTION_ACCEPT_OFFER
public static final String SYNC_ACTION_DEALLOCATE
public static final String SYNC_ACTION_SKIP
public static final String SYNC_ACTION_PILE
public static final String SYNC_ACTION_START
public static final String SYNC_ACTION_SAVE
public static final String SYNC_ACTION_COMPLETE
public static final String SYNC_ACTION_SUSPEND
public static final String SYNC_ACTION_UNSUSPEND
Constructor Detail |
---|
public YConnectionService()
Method Detail |
---|
public void onCreate()
onCreate
in class Service
public void onDestroy()
onDestroy
in class com.j256.ormlite.android.apptools.OrmLiteBaseService<DatabaseHelper>
public IBinder onBind(Intent intent)
onBind
in class Service
public void yConnect()
public void yDisconnect()
public void doSync()
public int liveSyncWorkitem(MobileWorkItem wi)
wi
- The work item to sync.
public void resetDb()
public void setResourceGateway(org.yawlfoundation.yawl.resourcing.rsInterface.ResourceGatewayClient resourceGateway)
resourceGateway
- The resource gateway to set.public org.yawlfoundation.yawl.resourcing.rsInterface.ResourceGatewayClient getResourceGateway()
public void setWorkQueueGateway(org.yawlfoundation.yawl.resourcing.rsInterface.WorkQueueGatewayClient workQueueGateway)
workQueueGateway
- the work queue gatway.public org.yawlfoundation.yawl.resourcing.rsInterface.WorkQueueGatewayClient getWorkQueueGateway()
public String getUsername()
public void setUsername(String username)
username
- the participant's usernamepublic String getPassword()
public void setPassword(String password)
password
- the participant's passwordpublic void setResourceGatewayUrl(String resourceGatewayUrl)
resourceGatewayUrl
- the resource gateway url.public String getResourceGatewayUrl()
public void setWorkQueueGatewayUrl(String workQueueGatewayUrl)
workQueueGatewayUrl
- the work queue gateway url.public String getWorkQueueGatewayUrl()
public boolean isRgConnected()
public void setRgConnected(boolean rgConnected)
rgConnected
- the resource gateway connection flagpublic boolean isWqgConnected()
public void setWqgConnected(boolean wqgConnected)
wqgConnected
- the work queue gateway connection flagpublic String getCurrentRGHandle()
public String getCurrentWQGHandle()
public boolean areAllInterfacesConnected()
public void setParticipant(org.yawlfoundation.yawl.resourcing.resource.Participant participant)
participant
- the current participantpublic org.yawlfoundation.yawl.resourcing.resource.Participant getParticipant()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |