Remote System Explorer DataStore
Release 3.3

org.eclipse.dstore.core.model
Class ByteStreamHandlerRegistry

java.lang.Object
  extended by org.eclipse.dstore.core.model.ByteStreamHandlerRegistry

public class ByteStreamHandlerRegistry
extends Object

Stores the set of registered byte stream handlers using the handler id as the key. Whenever a bytestream operation is required (i.e. for a save of bytes) The appropriate byte stream handler is retrieved via the specified id. If no such handler exists, then the default byte stream handler is returned.


Constructor Summary
ByteStreamHandlerRegistry()
           
 
Method Summary
 IByteStreamHandler getByteStreamHandler(String id)
          Returns the byte stream handler with the specified id.
 IByteStreamHandler getDefault()
          Returns the default byte stream handler
 void registerByteStreamHandler(IByteStreamHandler handler)
          Registers a byte stream handler.
 void setDefaultByteStreamHandler(IByteStreamHandler handler)
          Registers the default byte stream handler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteStreamHandlerRegistry

public ByteStreamHandlerRegistry()
Method Detail

setDefaultByteStreamHandler

public void setDefaultByteStreamHandler(IByteStreamHandler handler)
Registers the default byte stream handler

Parameters:
handler - the default byte stream handler

registerByteStreamHandler

public void registerByteStreamHandler(IByteStreamHandler handler)
Registers a byte stream handler.

Parameters:
handler - the handler to register

getByteStreamHandler

public IByteStreamHandler getByteStreamHandler(String id)
Returns the byte stream handler with the specified id. If "default" is specified or no such id has been registered, the default byte stream handler is returned.

Parameters:
id - the id of the byte stream handler
Returns:
the byte stream handler

getDefault

public IByteStreamHandler getDefault()
Returns the default byte stream handler

Returns:
the default

Remote System Explorer DataStore
Release 3.3

Copyright (c) IBM Corporation and others 2000, 2011. All Rights Reserved.