Module org.firebirdsql.jaybird
Package org.firebirdsql.ds

# Class DataSourceFactory

java.lang.Object
org.firebirdsql.ds.DataSourceFactory

All Implemented Interfaces:
  `ObjectFactory`

public class DataSourceFactory extends Object implements ObjectFactory
ObjectFactory for the DataSources in org.firebirdsql.ds.

Since:
  2.2
Author:
  Mark Rotteveel

## Constructor Summary

Constructors
Constructor
Description
`DataSourceFactory()`

## Method Summary

Modifier and Type
Method
Description
`protected static Object`
`deserialize(byte[] data)`
`Object`
`getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)`
`protected static String`
`getRefAddr(Reference ref, String type)`
Retrieves the content of the given Reference address (type).
`protected static byte[]`
`serialize(Object obj)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DataSourceFactory

public DataSourceFactory()

## Method Details

### getObjectInstance

public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception

Specified by:
  `getObjectInstance` in interface `ObjectFactory`
Throws:
  `Exception`

### getRefAddr

protected static String getRefAddr(Reference ref, String type)
Retrieves the content of the given Reference address (type).

Parameters:
  `ref` - Reference
  `type` - Address or type
Returns:
  Content as String

### serialize

protected static byte[] serialize(Object obj) throws NamingException

Throws:
  `NamingException`

### deserialize

protected static Object deserialize(byte[] data)