public class ClientServerChannel extends Object implements DataChannel
| Modifier and Type | Field and Description |
|---|---|
protected DataContext |
serverContext |
FLUSH_CASCADE_SYNC, FLUSH_NOCASCADE_SYNC, GRAPH_CHANGED_SUBJECT, GRAPH_FLUSHED_SUBJECT, GRAPH_ROLLEDBACK_SUBJECT, ROLLBACK_CASCADE_SYNC| Constructor and Description |
|---|
ClientServerChannel(DataContext serverContext)
Creates a ClientServerChannel that wraps a specified DataContext.
|
| Modifier and Type | Method and Description |
|---|---|
EntityResolver |
getEntityResolver()
Returns an EntityResolver instance that contains runtime mapping information.
|
EventManager |
getEventManager()
Returns an EventManager associated with this channel.
|
DataChannel |
getParentChannel() |
QueryResponse |
onQuery(ObjectContext context,
Query query)
Executes a query, using provided context to register persistent objects if
query returns any objects.
|
GraphDiff |
onSync(ObjectContext originatingContext,
GraphDiff changes,
int syncType)
Processes synchronization request from a child ObjectContext, returning a GraphDiff
that describes changes to objects made on the receiving end as a result of
synchronization.
|
protected DataContext serverContext
public ClientServerChannel(DataContext serverContext)
public QueryResponse onQuery(ObjectContext context, Query query)
DataChannelonQuery in interface DataChannelcontext - an ObjectContext that originated the query, used to
register result objects.public DataChannel getParentChannel()
public EntityResolver getEntityResolver()
DataChannelgetEntityResolver in interface DataChannelpublic EventManager getEventManager()
DataChannelgetEventManager in interface DataChannelpublic GraphDiff onSync(ObjectContext originatingContext, GraphDiff changes, int syncType)
DataChannelonSync in interface DataChanneloriginatingContext - an ObjectContext that initiated the sync. Can be null.changes - diff from the context that initiated the sync.syncType - One of DataChannel.FLUSH_NOCASCADE_SYNC, DataChannel.FLUSH_CASCADE_SYNC,
DataChannel.ROLLBACK_CASCADE_SYNC.Copyright © 2001–2023 Apache Cayenne. All rights reserved.