Package com.webobjects.eodistribution.common

Examples of com.webobjects.eodistribution.common._EONotificationCarrier


      }
      return "response: \n" + message.toString().trim();
    } else if (result.returnValue() instanceof EOEnterpriseObject) { // probably a fault
      return "response: \n" + result.returnValue().toString() + " | " + ((EOEnterpriseObject)result.returnValue()).snapshot();
    } else if (result.returnValue() instanceof _EONotificationCarrier) { // most often this is the EOObjectsChangedInObjectStoreNotification, which contains updated values for changed records
      _EONotificationCarrier notificationCarrier = (_EONotificationCarrier) result.returnValue();
      NSArray notifications = notificationCarrier.notifications();
      if (!notifications.isEmpty() && notificationCarrier.propertySnapshots() != null) {
        StringBuilder message = new StringBuilder();
        for (Object gid : notificationCarrier.propertySnapshots().keySet()) {
          NSArray snapshot = (NSArray) notificationCarrier.propertySnapshots().get(gid);
          message.append(gid.toString()).append(" = ").append(snapshot).append('\n');
        }
        message.append("This also contains GIDs for all the toMany relationship related to the objects.");
        return "response: " + result.returnValue().toString().replace("\n", "") + "\n" + message.toString().trim();
      } else {
View Full Code Here


  public ERDistributedObjectStore(EODistributionChannel channel) {
    super(channel);
   
    try {
      _EOReferenceRecordingCoder newCoder = new ERReferenceRecordingCoder(false);
      newCoder.setDelegate(this);
      Field coderField = EODistributedObjectStore.class.getDeclaredField("_coder");
      coderField.setAccessible(true);
      coderField.set(this, newCoder);
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

  public ERDistributionContext(WOSession session) {
    super(session);
   
    try {
      _EOReferenceRecordingCoder newCoder = new ERReferenceRecordingCoder(true);
      newCoder.setDelegate(this);
      Field coderField = EODistributionContext.class.getDeclaredField("_coder");
      coderField.setAccessible(true);
      coderField.set(this, newCoder);
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

  public NSArray<_EOServerReturnValue> _processClientRequest(@SuppressWarnings("rawtypes") NSArray invocations) {
    int count = invocations.count();
    NSMutableArray<_EOServerReturnValue> results = new NSMutableArray<_EOServerReturnValue>(count);

    for (int i = 0; i < count; ++i) {
      _EOServerInvocation invocation = (_EOServerInvocation)invocations.objectAtIndex(i);
     
      if (!"clientSideRequestGetNotifications".equals(ERDistributionUtils.method(invocation))) {
        log.debug("request:  " + ERDistributionUtils.invocationToString(invocation).replace("\n", ""));
      }
     
      _EOServerReturnValue result = null;
      try {
        result = invocation.doInvokeWithTarget(this);
        if (result == null) {
          log.error("result was null");
        } else if (result.holdsServerException()) {
          log.error(result.serverExceptionClassName() + ": " + result.serverExceptionMessage());
        } else if (log.isDebugEnabled()) {
View Full Code Here

     
      if (!"clientSideRequestGetNotifications".equals(ERDistributionUtils.method(invocation))) {
        log.debug("request:  " + ERDistributionUtils.invocationToString(invocation).replace("\n", ""));
      }
     
      _EOServerReturnValue result = null;
      try {
        result = invocation.doInvokeWithTarget(this);
        if (result == null) {
          log.error("result was null");
        } else if (result.holdsServerException()) {
          log.error(result.serverExceptionClassName() + ": " + result.serverExceptionMessage());
        } else if (log.isDebugEnabled()) {
          logReturnValue(result);
        }
      } catch (RuntimeException e) {
        log.error(e.getMessage(), e);
View Full Code Here

TOP

Related Classes of com.webobjects.eodistribution.common._EONotificationCarrier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.