Package java.io

Examples of java.io.Serializable


  private void receivedMessage(Object packet) {
    log.log(Level.FINE, "reading packet"); //$NON-NLS-1$
        if (packet instanceof Message) {
          Message messagePacket = (Message)packet;
          Serializable messageKey = messagePacket.getMessageKey();
            log.log(Level.FINE, "read asynch message:" + messageKey); //$NON-NLS-1$
            ResultsReceiver<Object> listener = asynchronousListeners.remove(messageKey);
            if (listener != null) {
                listener.receiveResults(messagePacket.getContents());
            }
View Full Code Here


     @param timeout Max number of msecs until the call returns - if timeout elapses
     null will be returned
     @param max_tries Max number of attempts to fetch the cache from the coordinator (will be set to 1 if < 1)
     */
    public Serializable getCacheFromMember(Address mbr, long timeout, int max_tries) {
        Serializable cache=null;
        int num_tries=0;
        Info info;
        Message msg;
        Address dst=mbr;  // member from which to fetch the cache

View Full Code Here

        return v != null ? (Address) v.elementAt(0) : null;
    }


    void handleCacheRequest(Address sender) throws ChannelException {
        Serializable cache=null;
        Message msg;
        Info info;

        if(sender == null) {
            // +++ remove
View Full Code Here

        return _sched;
    }

    public <T extends Serializable> T execute(Request request, ReturnType returnType) throws RemoteException {
        assert (_sched != null);
        final Serializable result;
        final int sign = request.getSignature();
        switch (sign) {
            case QueryRequest.SIGNATURE:
                final String query = ((QueryRequest) request).getQuery();
                BackendProcessor proc = _sched.dispatchRequest(request);
View Full Code Here

    }


    public void _set(String fqn, Serializable element) {
        Node n;
        Serializable old_el=null;

        if(fqn == null || element == null) return;
        n=findNode(fqn);
        if(n == null) {
            if(log.isErrorEnabled()) log.error("node " + fqn + " not found");
View Full Code Here

    }

    /** similar to set, but does not error if node does not exist, but rather does an add instead */
    public void _reset(String fqn, Serializable element) {
        Node n;
        Serializable old_el=null;

        if(fqn == null || element == null) return;
        n=findNode(fqn);
        if(n == null) {
            _add(fqn, element);
View Full Code Here

        if ( taskData.getDocumentAccessType() == AccessType.Inline ) {
            content = em.find( Content.class,
                               taskData.getDocumentContentId() );
        }
        ExpressionCompiler compiler = new ExpressionCompiler( new String( content.getContent() ) );
        Serializable expr = compiler.compile();
        Object object = MVEL.executeExpression( expr );
       
        Map<String, Object> vars = new HashMap<String, Object>();
        vars.put( docVar, object );
        // for now will have to assume the recipient is a User, we need to figure out if Groups have an alias
View Full Code Here

      pconf.addPackageImport("java.util");
      for(String entry : getInputs().keySet()){
        pconf.addImport(entry, getInputs().get(entry));
        }
      ParserContext context = new ParserContext(pconf);
        Serializable s = MVEL.compileExpression(str.trim(), context);
        return MVEL.executeExpression(s, vars);
    }
View Full Code Here

            simpleValueSupport.setValue(null);
            return;
        }
        // String value is non-null, so we can massage it into the proper type for the SimpleMetaValue's inner value.
        SimpleMetaType simpleMetaType = simpleValueSupport.getMetaType();
        Serializable innerValue;
        if (simpleMetaType.equals(SimpleMetaType.STRING) || simpleMetaType.equals(SimpleMetaType.NAMEDOBJECT))
            innerValue = propSimpleValue;
        else if (simpleMetaType.equals(SimpleMetaType.BOOLEAN) || simpleMetaType.equals(SimpleMetaType.BOOLEAN_PRIMITIVE))
            innerValue = Boolean.valueOf(propSimpleValue);
        else if (simpleMetaType.equals(SimpleMetaType.BYTE) || simpleMetaType.equals(SimpleMetaType.BYTE_PRIMITIVE))
View Full Code Here

      return context.getVdbName();
    }

    // ================= Function - COMMANDPAYLOAD ========================
    public static Object commandPayload(CommandContext context) {
        Serializable payload = context.getCommandPayload();
        if(payload == null) {
            return null;
        }
        // 0-arg form - just return payload as a string if it exists
        return payload.toString();
    }
View Full Code Here

TOP

Related Classes of java.io.Serializable

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.