Package org.apache.isis.runtimes.dflt.remoting.common

Examples of org.apache.isis.runtimes.dflt.remoting.common.IsisRemoteException


        final Object response = marshaller.request(request);

        if (response instanceof ConcurrencyException) {
            throw (ConcurrencyException) response;
        } else if (response instanceof Exception) {
            throw new IsisRemoteException("Exception occurred on server", (Throwable) response);
        } else {
            return (ResponseEnvelope) response;
        }
    }
View Full Code Here


    }

    private PersistenceQueryEncoder findPersistenceQueryEncoder(final Class<?> persistenceQueryClass) {
        final PersistenceQueryEncoder encoder = persistenceEncoderByClass.get(persistenceQueryClass);
        if (encoder == null) {
            throw new IsisRemoteException("No encoder for " + persistenceQueryClass.getName());
        }
        return encoder;
    }
View Full Code Here

     */
    @Override
    public ObjectData encodeForUpdate(final ObjectAdapter object) {
        final ResolveState resolveState = object.getResolveState();
        if (resolveState.isSerializing() || resolveState.isGhost()) {
            throw new IsisRemoteException("Illegal resolve state: " + object);
        }
        return encode(object, serverSideTouchedObjectGraphDepth);
    }
View Full Code Here

    private void execute(final Request request) {
        synchronized (connection) {
            final ResponseEnvelope response = connection.executeRemotely(request);
            if (request.getId() != response.getId()) {
                throw new IsisRemoteException("Response out of sequence with respect to the request: " + request.getId() + " & " + response.getId() + " respectively");
            }
            if (LOG.isDebugEnabled()) {
                LOG.debug("response " + response);
            }
            request.setResponse(response.getObject());
View Full Code Here

    private void setUpFields(final ObjectAdapter adapter, final ObjectData adapterData, final KnownObjectsRequest knownObjects) {
        final Data[] fieldContent = adapterData.getFieldContent();
        if (fieldContent != null && fieldContent.length > 0) {
            final ObjectAssociation[] fields = fieldOrderCache.getFields(adapter.getSpecification());
            if (fields.length != fieldContent.length) {
                throw new IsisRemoteException("Data received for different number of fields; expected " + fields.length + ", but was " + fieldContent.length);
            }
            for (int i = 0; i < fields.length; i++) {
                final ObjectAssociation field = fields[i];
                final Data fieldData = fieldContent[i];
                if (fieldData == null || field.isNotPersisted()) {
View Full Code Here

        final ObjectAction action = targetAdapter.getSpecification().getObjectAction(actionType, actionIdentifier);
        final ObjectAdapter[] parameters = decodeParameters(session, parameterData, knownObjects);

        if (action == null) {
            throw new IsisRemoteException("Could not find method " + actionIdentifier);
        }

        final ObjectAdapter resultAdapter = action.execute(targetAdapter, parameters);

        ObjectData persistedTargetData;
View Full Code Here

    }

    private ObjectAdapter decodeTargetAdapter(final AuthenticationSession session, final ReferenceData targetData, final KnownObjectsRequest knownObjects) {
        ObjectAdapter targetAdapter;
        if (targetData == null) {
            throw new IsisRemoteException("No target specified");
        } else if (targetData instanceof IdentityData) {
            targetAdapter = getPersistentObjectAdapter(session, (IdentityData) targetData);
        } else if (targetData instanceof ObjectData) {
            targetAdapter = encoderDecoder.decode(targetData, knownObjects);
        } else {
View Full Code Here

        final String serviceId = request.getServiceId();

        final ObjectAdapter serviceAdapter = getPersistenceSession().getService(serviceId);
        if (serviceAdapter == null) {
            throw new IsisRemoteException("Failed to find service " + serviceId);
        }
        return new OidForServiceResponse(encoderDecoder.encodeIdentityData(serviceAdapter));
    }
View Full Code Here

        final Object response = marshaller.request(request);

        if (response instanceof ConcurrencyException) {
            throw (ConcurrencyException) response;
        } else if (response instanceof Exception) {
            throw new IsisRemoteException("Exception occurred on server", (Throwable) response);
        } else {
            return (ResponseEnvelope) response;
        }
    }
View Full Code Here

    private void execute(final Request request) {
        synchronized (connection) {
            final ResponseEnvelope response = connection.executeRemotely(request);
            if (request.getId() != response.getId()) {
                throw new IsisRemoteException("Response out of sequence with respect to the request: "
                    + request.getId() + " & " + response.getId() + " respectively");
            }
            if (LOG.isDebugEnabled()) {
                LOG.debug("response " + response);
            }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.remoting.common.IsisRemoteException

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.