public class ClientFactoryObject extends java.lang.Object implements ClientFactory
Title: Service Event Fabric Runtime
Description: Object that stores a Client connection factory.
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
Day, Hour, Minute, Second
Modifier and Type | Method and Description |
---|---|
ClientConnection |
createConnection()
Creates a connection using default credentials.
|
ClientConnection |
createConnection(java.lang.String connectionName,
java.lang.String userName,
java.lang.String password)
Creates a named connection and loads it into the reference list.
|
void |
destroyAll()
Cleans up all transient objects and frees up all resources created by this factory.
|
long |
getCheckInterval()
Returns the number of milliseconds between checks of the connection's state.
|
java.lang.ClassLoader |
getClassLoader()
Returns the class loader for this factory.
|
java.lang.Class |
getClientConnectionClass() |
java.lang.String |
getConnectionClassName()
Returns the name of the connection implementing class name.
|
java.lang.String |
getConnectionStateValidatorClass() |
int |
getConnectionTimeout()
Gets the number of seconds the connection attempt will wait before throwing
an exception.
|
java.lang.String |
getDefaultPassword()
Gets the default password.
|
java.lang.String |
getDefaultUser()
Gets the default user.
|
java.lang.String |
getDescription()
Sets the description of this factory.
|
FabricComponent |
getFabricComponent() |
java.lang.String |
getFactoryName()
Returns the name of the client factory instance.
|
java.lang.String |
getFactoryType()
Returns the type of factory.
|
java.lang.String |
getFullName() |
int |
getMajorVersion()
Returns the major version of the factory.
|
int |
getMinorVersion()
Returns the minor version of the factory
|
java.util.Properties |
getProperties() |
java.lang.String |
getProperty(java.lang.String name)
Returns the value of a specified property.
|
int |
getReconnectRetries()
Returns the number of times a connection will try to reconnect.
|
javax.naming.Reference |
getReference()
Retrieves the Reference of this object.
|
java.lang.String |
getUrl()
Returns the default URL.
|
java.lang.String |
getVendorString()
Returns the complete version string.
|
boolean |
isManaged()
Returns
true if the factory's connection life cycle is to be
managed by the Service Context. |
boolean |
isReliable()
Returns
true if the connection created by the factory is
reliable. |
boolean |
isTransient() |
java.util.List |
listConnections()
Returns a list of all connections in this factory's pool.
|
java.util.List |
listProperties()
Lists all the properties of this factory.
|
ClientConnection |
lookupConnection(java.lang.String connectionName)
Returns a connection from the pool specified by the name.
|
int |
pingConnection(java.lang.String connectionName)
Tests the connection of the specified name.
|
void |
removeConnection(java.lang.String connectionName)
Removes a connection from the factory pool.
|
void |
setCheckInterval(long checkInterval)
Sets the frequency at which ot check the connection's state in milliseconds.
|
void |
setConnectionClassName(java.lang.String factoryClassName)
Sets the name of the connection implementing class.
|
void |
setConnectionStateValidatorClass(java.lang.String validatorClassName) |
void |
setConnectionTimeout(int connectionTimeout)
Sets the timeout for each connection retry.
|
void |
setDefaultPassword(java.lang.String password)
Sets the default password
|
void |
setDefaultUser(java.lang.String userName)
Sets the default user.
|
void |
setDescription(java.lang.String desc)
Gets the description of the factory.
|
void |
setFactoryName(java.lang.String factoryName)
Sets the name of the factory
|
void |
setFactoryType(java.lang.String type)
Sets the type of factory
|
void |
setManaged(boolean isManaged)
Sets wether this factory's connection life cycle is managed by the
container context or not.
|
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets the value of a property for this factory.
|
void |
setReconnectRetries(int reconnectRetries)
Sets the number of times that a reliable connection tries to reconnect.
|
void |
setReliable(boolean isReliable)
Specifies if the connection that is created will be reliable.
|
void |
setUrl(java.lang.String url)
Sets the default URL for this factory.
|
java.lang.String |
toString() |
public void setUrl(java.lang.String url)
setUrl
in interface ClientFactory
url
- Stringpublic java.lang.String getUrl()
getUrl
in interface ClientFactory
public java.lang.String getDefaultUser()
getDefaultUser
in interface ClientFactory
public void setDefaultUser(java.lang.String userName)
setDefaultUser
in interface ClientFactory
userName
- Stringpublic void setDefaultPassword(java.lang.String password)
setDefaultPassword
in interface ClientFactory
password
- Stringpublic java.lang.String getDefaultPassword()
getDefaultPassword
in interface ClientFactory
public long getCheckInterval()
ClientFactory
getCheckInterval
in interface ClientFactory
public void setCheckInterval(long checkInterval)
ClientFactory
setCheckInterval
in interface ClientFactory
checkInterval
- longpublic int getConnectionTimeout()
ClientFactory
getConnectionTimeout
in interface ClientFactory
public java.lang.String getConnectionClassName()
ClientFactory
getConnectionClassName
in interface ClientFactory
public void setConnectionClassName(java.lang.String factoryClassName)
ClientFactory
setConnectionClassName
in interface ClientFactory
factoryClassName
- Stringpublic int getReconnectRetries()
getReconnectRetries
in interface ClientFactory
public java.lang.String getVendorString()
getVendorString
in interface ClientFactory
public boolean isManaged()
true
if the factory's connection life cycle is to be
managed by the Service Context.isManaged
in interface ClientFactory
public boolean isReliable()
true
if the connection created by the factory is
reliable.isReliable
in interface ClientFactory
public void setManaged(boolean isManaged)
setManaged
in interface ClientFactory
isManaged
- booleanpublic void setReliable(boolean isReliable)
setReliable
in interface ClientFactory
isReliable
- booleanpublic void setReconnectRetries(int reconnectRetries)
setReconnectRetries
in interface ClientFactory
reconnectRetries
- intpublic void setConnectionTimeout(int connectionTimeout)
setConnectionTimeout
in interface ClientFactory
connectionTimeout
- intpublic void setFactoryName(java.lang.String factoryName)
setFactoryName
in interface ClientFactory
factoryName
- Stringpublic java.lang.String getFactoryName()
getFactoryName
in interface ClientFactory
public java.lang.String getFactoryType()
getFactoryType
in interface ClientFactory
public void setFactoryType(java.lang.String type)
setFactoryType
in interface ClientFactory
type
- Stringpublic java.lang.String getDescription()
ClientFactory
getDescription
in interface ClientFactory
public void setDescription(java.lang.String desc)
ClientFactory
setDescription
in interface ClientFactory
desc
- Stringpublic boolean isTransient()
public int getMajorVersion()
getMajorVersion
in interface ClientFactory
public int getMinorVersion()
getMinorVersion
in interface ClientFactory
public java.lang.ClassLoader getClassLoader()
ClientFactory
getClassLoader
in interface ClientFactory
public ClientConnection createConnection(java.lang.String connectionName, java.lang.String userName, java.lang.String password) throws ClientException
ClientFactory
ClientFactory.lookupConnection(java.lang.String)
method.createConnection
in interface ClientFactory
connectionName
- StringuserName
- Stringpassword
- StringClientException
public ClientConnection createConnection() throws ClientException
ClientFactory
Sys$Default.[factoryType].[factoryName]
using the ClientFactory.lookupConnection(java.lang.String)
method.createConnection
in interface ClientFactory
ClientException
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
javax.naming.NamingException
- If a naming exception was encountered while retrieving the
reference.public int pingConnection(java.lang.String connectionName) throws ClientException
ClientFactory
pingConnection
in interface ClientFactory
connectionName
- StringClientException
public java.lang.Class getClientConnectionClass()
public void destroyAll() throws ClientFactoryConfigurationException
ClientFactory
destroyAll
in interface ClientFactory
ClientFactoryConfigurationException
public ClientConnection lookupConnection(java.lang.String connectionName) throws ClientFactoryConfigurationException
ClientFactory
lookupConnection
in interface ClientFactory
connectionName
- StringClientFactoryConfigurationException
public void removeConnection(java.lang.String connectionName) throws ClientFactoryConfigurationException
ClientFactory
removeConnection
in interface ClientFactory
connectionName
- StringClientFactoryConfigurationException
public java.lang.String getProperty(java.lang.String name)
ClientFactory
getProperty
in interface ClientFactory
name
- Stringpublic void setProperty(java.lang.String name, java.lang.String value) throws ClientFactoryConfigurationException
ClientFactory
setProperty
in interface ClientFactory
name
- Stringvalue
- StringClientFactoryConfigurationException
public java.util.List listProperties()
ClientFactory
listProperties
in interface ClientFactory
public java.util.List listConnections()
ClientFactory
listConnections
in interface ClientFactory
public void setConnectionStateValidatorClass(java.lang.String validatorClassName)
public java.lang.String getConnectionStateValidatorClass()
public FabricComponent getFabricComponent()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getFullName()
public java.util.Properties getProperties()
getProperties
in interface ClientFactory
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.