Package org.apache.cayenne.access
Class ClientServerChannel
java.lang.Object
org.apache.cayenne.access.ClientServerChannel
- All Implemented Interfaces:
- DataChannel
public class ClientServerChannel extends Object implements DataChannel
A DataChannel that provides a server-side end of the bridge between client and server
 objects in a Remote Object Persistence stack.
- Since:
- 1.2
- 
Field SummaryFields Modifier and Type Field Description protected DataContextserverContextFields inherited from interface org.apache.cayenne.DataChannelFLUSH_CASCADE_SYNC, FLUSH_NOCASCADE_SYNC, GRAPH_CHANGED_SUBJECT, GRAPH_FLUSHED_SUBJECT, GRAPH_ROLLEDBACK_SUBJECT, ROLLBACK_CASCADE_SYNC
- 
Constructor SummaryConstructors Constructor Description ClientServerChannel(DataContext serverContext)Creates a ClientServerChannel that wraps a specified DataContext.
- 
Method SummaryModifier and Type Method Description EntityResolvergetEntityResolver()Returns an EntityResolver instance that contains runtime mapping information.EventManagergetEventManager()Returns an EventManager associated with this channel.DataChannelgetParentChannel()QueryResponseonQuery(ObjectContext context, Query query)Executes a query, using provided context to register persistent objects if query returns any objects.GraphDiffonSync(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.
- 
Field Details- 
serverContext
 
- 
- 
Constructor Details- 
ClientServerChannelCreates a ClientServerChannel that wraps a specified DataContext.- Since:
- 3.0
 
 
- 
- 
Method Details- 
onQueryDescription copied from interface:DataChannelExecutes a query, using provided context to register persistent objects if query returns any objects.- Specified by:
- onQueryin interface- DataChannel
- Parameters:
- context- an ObjectContext that originated the query, used to register result objects.
- Returns:
- a generic response object that encapsulates result of the execution.
 
- 
getParentChannel- Since:
- 3.1
 
- 
getEntityResolverDescription copied from interface:DataChannelReturns an EntityResolver instance that contains runtime mapping information.- Specified by:
- getEntityResolverin interface- DataChannel
 
- 
getEventManagerDescription copied from interface:DataChannelReturns an EventManager associated with this channel. Channel may return null if EventManager is not available for any reason.- Specified by:
- getEventManagerin interface- DataChannel
 
- 
onSyncDescription copied from interface:DataChannelProcesses synchronization request from a child ObjectContext, returning a GraphDiff that describes changes to objects made on the receiving end as a result of synchronization.- Specified by:
- onSyncin interface- DataChannel
- Parameters:
- originatingContext- 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.
 
 
-