Package java.io

Examples of java.io.Serializable


    }

    switch (packetType) {
    case MESSAGE:
      {
        Serializable value = (Serializable) in.readObject(payloadClass);
        in.endPacket();

        if (log.isLoggable(Level.FINER)) {
          log.finer(this + " message " + value
                    + " {to:" + to + ", from:" + from + "}");
        }

        actorStream.message(to, from, value);

        break;
      }

    case MESSAGE_ERROR:
      {
        Serializable value = (Serializable) in.readObject();
        BamError error = (BamError) in.readObject(BamError.class);
        in.endPacket();

        if (log.isLoggable(Level.FINER)) {
          log.finer(this + " messageError " + error + " " + value
                    + " {to:" + to + ", from:" + from + "}");
        }

        actorStream.messageError(to, from, value, error);

        break;
      }

    case QUERY:
      {
        long id = in.readLong();
        Serializable value = (Serializable) in.readObject();
        in.endPacket();

        if (log.isLoggable(Level.FINER)) {
          log.finer(this + " query " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }

        actorStream.query(id, to, from, value);

        break;
      }

    case QUERY_RESULT:
      {
        long id = in.readLong();
        Serializable value = (Serializable) in.readObject();
        in.endPacket();

        if (log.isLoggable(Level.FINER)) {
          log.finer(this + " queryResult " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }

        actorStream.queryResult(id, to, from, value);

        break;
      }

    case QUERY_ERROR:
      {
        long id = in.readLong();
        Serializable value = (Serializable) in.readObject();
        BamError error = (BamError) in.readObject(BamError.class);
        in.endPacket();

        if (log.isLoggable(Level.FINER)) {
          log.finer(this + " queryError " + error + " " + value
View Full Code Here


          .l("Timer duration must not be negative."));
    }

    long expiration = Alarm.getCurrentTime() + duration;

    Serializable info = null;

    if (timerConfig != null)
      info = timerConfig.getInfo();

    return createOneTimeTimer(expiration, info);
View Full Code Here

          .l("Timer interval duration must not be negative."));
    }

    Date expiration = new Date(Alarm.getCurrentTime() + initialDuration);

    Serializable info = null;

    if (timerConfig != null)
      info = timerConfig.getInfo();

    return createRepeatingTimer(expiration, intervalDuration, info);
View Full Code Here

    if (expiration.getTime() < 0) {
      throw new IllegalArgumentException(L
          .l("Timer expiration must not be negative."));
    }

    Serializable info = null;

    if (timerConfig != null)
      info = timerConfig.getInfo();

    return createOneTimeTimer(expiration.getTime(), info);
View Full Code Here

    if (intervalDuration < 0) {
      throw new IllegalArgumentException(L
          .l("Timer interval duration must not be negative."));
    }

    Serializable info = null;

    if (timerConfig != null)
      info = timerConfig.getInfo();

    return createRepeatingTimer(initialExpiration, intervalDuration, info);
View Full Code Here

  @Override
  public Timer createCalendarTimer(ScheduleExpression schedule,
      TimerConfig timerConfig) throws IllegalArgumentException,
      IllegalStateException, EJBException
  {
    Serializable info = null;

    if (timerConfig != null)
      info = timerConfig.getInfo();

    return createScheduledTimer(schedule, info);
View Full Code Here

    String from = readAddress(hIn);
   
    switch (HmtpPacketType.TYPES[type]) {
    case MESSAGE:
      {
        Serializable value = (Serializable) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " message " + value
                    + " {to:" + to + ", from:" + from + "}");
        }

        actorStream.message(to, from, value);

        break;
      }

    case MESSAGE_ERROR:
      {
        Serializable value = (Serializable) hIn.readObject();
        BamError error = (BamError) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " messageError " + error + " " + value
                    + " {to:" + to + ", from:" + from + "}");
        }

        actorStream.messageError(to, from, value, error);

        break;
      }

    case QUERY:
      {
        long id = hIn.readLong();
        Serializable value = (Serializable) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " query " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }

        actorStream.query(id, to, from, value);

        break;
      }

    case QUERY_RESULT:
      {
        long id = hIn.readLong();
        Serializable value = (Serializable) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " queryResult " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }

        actorStream.queryResult(id, to, from, value);

        break;
      }

    case QUERY_ERROR:
      {
        long id = hIn.readLong();
        Serializable value = (Serializable) hIn.readObject();
        BamError error = (BamError) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " queryError " + error + " " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
View Full Code Here

     */
    private static Test suiteSerializableElements() throws Exception {
        TestSuite suite = new TestSuite("SerializableElements");
        Iterator<Object> iter = getObjects(Serializable.class).iterator();
        while (iter.hasNext()) {
            Serializable serObj = (Serializable) iter.next();
            if (serObj.getClass().getName().endsWith("_Stub")) {
                continue;
            }
            TestSuite ts = new TestSuite(serObj.getClass().getName());
            ts.addTest(new JMeterTest("runSerialTest", serObj));
            suite.addTest(ts);
        }
        return suite;
    }
View Full Code Here

  public Serializable doValidateApplyAndMap(TransactionController tc,
                       String key, Serializable value,
                       Dictionary d, boolean dbOnlyProperty)
     throws StandardException
  {
    Serializable mappedValue = null;
     if (notifyOnSet != null) {
      synchronized (this) {

        for (int i = 0; i < notifyOnSet.size() ; i++) {
          PropertySetCallback psc = (PropertySetCallback) notifyOnSet.get(i);
View Full Code Here

  public Serializable doMap(String key,
               Serializable value,
               Dictionary set)
     throws StandardException
  {
    Serializable mappedValue = null;
     if (notifyOnSet != null) {
      for (int i = 0; i < notifyOnSet.size() && mappedValue == null; i++) {
        PropertySetCallback psc = (PropertySetCallback) notifyOnSet.get(i);
        mappedValue = psc.map(key, value, set);
      }
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.