Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.remoting.callback
Class NullCallbackStore

    java.lang.Object
      org.jboss.remoting.callback.NullCallbackStore

All Implemented Interfaces:
  java.io.Serializable, SerializableStore

    public class NullCallbackStore

extends java.lang.Object
implements SerializableStore, java.io.Serializable

This implementation does nothing other than throw away persisted objects and throw exceptions. This is to be use when don't have a proper store or don't care about throwing away callbacks when starting to run out of memory.

Author:
  Tom Elrod
See Also:
  Serialized Form

Nested Class Summary
`class` | `NullCallbackStore.FailedCallback`

Constructor Summary
`NullCallbackStore()`

Method Summary
`void` | `add(java.io.Serializable object)` Persists the serializable object passed to the directory specified.
`void` | `create()` This is a no op method, but needed in order to be used as a service within JBoss AS.
`void` | `destroy()` This is a no op method, but needed in order to be used as a service within JBoss AS.
`java.lang.Object` | `getNext()` Will look through the files in the store directory for the oldest object serialized to disk, load it, delete the file, and return the deserialized object.
`boolean` | `getPurgeOnShutdown()` Returns if store will clean up persisted files when shutdown (destroy()).
`void` | `purgeFiles()`
`void` | `setConfig(java.util.Map config)` No op
`void` | `setPurgeOnShutdown(boolean purgeOnShutdown)` Sets if store should clean up persisted files when shutdown (destroy()).
`int` | `size()` Getst the number of objects stored and available.
`void` | `start()` No op
`void` | `stop()` No op

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NullCallbackStore

    public NullCallbackStore()

Method Detail

### size

    public int size()

  Getst the number of objects stored and available.

  Specified by:
    `size` in interface `SerializableStore`
  Returns:

### getNext

    public java.lang.Object getNext()
                             throws java.io.IOException

  Will look through the files in the store directory for the oldest object serialized to disk, load it, delete the file, and return the deserialized object. Important to note that once this object is returned from this method, it is gone forever from this store and will not be able to retrieve it again without adding it back.

  Specified by:
    `getNext` in interface `SerializableStore`
  Returns:
  Throws:
    `java.io.IOException`

### add

    public void add(java.io.Serializable object)
             throws java.io.IOException

  Persists the serializable object passed to the directory specified. The file name will be the current time in milliseconds (vis System.currentTimeMillis()) with the specified suffix. This object can later be retrieved using the getNext() method, but objects will be returned in the order that they were added (FIFO).

  Specified by:
    `add` in interface `SerializableStore`
  Parameters:
    `object` -
  Throws:
    `java.io.IOException`

### setConfig

    public void setConfig(java.util.Map config)

  No op

  Specified by:
    `setConfig` in interface `SerializableStore`
  Parameters:
    `config` -

### start

    public void start()
               throws java.lang.Exception

  No op

  Specified by:
    `start` in interface `SerializableStore`
  Throws:
    `java.lang.Exception`

### stop

    public void stop()

  No op

  Specified by:
    `stop` in interface `SerializableStore`

### create

    public void create()
                throws java.lang.Exception

  This is a no op method, but needed in order to be used as a service within JBoss AS.

  Specified by:
    `create` in interface `SerializableStore`
  Throws:
    `java.lang.Exception`

### destroy

    public void destroy()

  This is a no op method, but needed in order to be used as a service within JBoss AS.

  Specified by:
    `destroy` in interface `SerializableStore`

### setPurgeOnShutdown

    public void setPurgeOnShutdown(boolean purgeOnShutdown)

  Sets if store should clean up persisted files when shutdown (destroy()).

  Specified by:
    `setPurgeOnShutdown` in interface `SerializableStore`
  Parameters:
    `purgeOnShutdown` -

### getPurgeOnShutdown

    public boolean getPurgeOnShutdown()

  Returns if store will clean up persisted files when shutdown (destroy()).

  Specified by:
    `getPurgeOnShutdown` in interface `SerializableStore`
  Returns:

### purgeFiles

    public void purgeFiles()

  Specified by:
    `purgeFiles` in interface `SerializableStore`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 1998-2005 JBoss Inc . All Rights Reserved.