public class TransportFactoryObject extends java.lang.Object implements TransportFactory
Title: Service Event Fabric Runtime
Description:
Copyright: Copyright (c) 2009
Company: StreamScape Technologies
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
URL_SEPARATOR |
Day, Hour, Minute, Second
Modifier and Type | Method and Description |
---|---|
TransportConnection |
createConnection()
Creates a connection using default credentials.
|
TransportConnection |
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 |
getConnectionCheckInterval()
Returns the number of milliseconds between checks of the connection's
state.
|
java.lang.String |
getConnectionFactoryClass()
Returns the name of the factory class that is the implementation of the underlying connection factory.
|
java.lang.String |
getConnectionStateValidatorClass()
Returns the name of the connection state validator class.
|
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 |
getDefaultUrl()
Returns the default URL.
|
java.lang.String |
getDefaultUser()
Gets the default user.
|
java.lang.String |
getDescription() |
FabricComponent |
getFabricComponent() |
java.lang.String |
getFactoryName()
Returns the name of the transport factory instance.
|
java.lang.String |
getFactoryType()
Returns the factory Type.
|
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.
|
long |
getReconnectInterval()
Returns the frequency at which to check the connection's state in milliseconds (when connection is in RECONNECT state).
|
javax.naming.Reference |
getReference()
Retrieves the Reference of this object.
|
int |
getTransportReconnectRetries()
Returns the number of times a connection will try to reconnect.
|
java.util.List |
getURLs()
Returns a list of one or more URls that comprise the URL list.
|
java.lang.String |
getVendorString()
Returns the complete version string.
|
boolean |
isLifeCycleManaged()
Returns
true if the factory's connection life cycle is to be
managed by the Service Context. |
boolean |
isReliableConnection()
Returns
true if the connection created by the factory is
reliable. |
boolean |
isTransient() |
java.util.Vector |
listConnections()
Returns a list (vector) of all connections in this factory's pool.
|
java.util.Vector |
listFactoryProperties()
Lists all the properties of this factory by loading the provider and
introspecting the getter/setter methods.
|
TransportConnection |
lookupConnection(java.lang.String connectionName)
Returns a connction from the pool specified by the name.
|
void |
pingConnection()
Tests the connection using the connection properties of this factory.
|
void |
removeConnection(java.lang.String connectionName)
Removes a connection from the factory pool.
|
void |
setConnectionCheckInterval(long millis)
Sets the frequencey at which ot check the connection's state in
milliseconds.
|
void |
setConnectionFactoryClass(java.lang.String factoryClassName)
Sets the name of the factory class that is the implementation of the underlying connection factory.
|
void |
setConnectionStateValidatorClass(java.lang.String validatorClassName)
Sets the connection state validator class.
|
void |
setConnectionTimeout(int seconds)
Sets the timeout for each connection retry.
|
void |
setDefaultPassword(java.lang.String password)
Sets the default password
|
void |
setDefaultUrl(java.lang.String dfltURL)
Sets the default URL for this factory.
|
void |
setDefaultUser(java.lang.String userName)
Sets the default user.
|
void |
setDescription(java.lang.String desc) |
void |
setFactoryName(java.lang.String name)
setName
|
void |
setFactoryType(java.lang.String type)
Sets the factory type name.
|
void |
setLifeCycleManaged(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 |
setReconnectInterval(long millis)
Sets the frequency at which to check the connection's state in milliseconds (when connection is in RECONNECT state).
|
void |
setReliableConnection(boolean reliable)
Specifies if the connection that is created will be reliable.
|
void |
setTransportReconnectRetries(int retries)
Sets the number of times that a reliable connection tries to reconnect.
|
void |
setURLs(java.util.List urls)
Sets URL list which is build out of all provided TransportURLs.
|
java.lang.String |
toString() |
public static final java.lang.String URL_SEPARATOR
public boolean isTransient()
public TransportConnection createConnection(java.lang.String connectionName, java.lang.String userName, java.lang.String password) throws TransportException
TransportFactory
TransportFactory.lookupConnection(java.lang.String)
method.createConnection
in interface TransportFactory
connectionName
- StringuserName
- Stringpassword
- StringTransportException
public TransportConnection createConnection() throws TransportException
TransportFactory
Sys$Default.[factoryType].[factoryName]
using the
TransportFactory.lookupConnection(java.lang.String)
method.createConnection
in interface TransportFactory
TransportException
public java.lang.String getDescription()
getDescription
in interface TransportFactory
public void setDescription(java.lang.String desc)
setDescription
in interface TransportFactory
public java.lang.String getDefaultPassword()
TransportFactory
getDefaultPassword
in interface TransportFactory
public void setDefaultPassword(java.lang.String password)
TransportFactory
setDefaultPassword
in interface TransportFactory
password
- Stringpublic java.lang.String getDefaultUser()
getDefaultUser
in interface TransportFactory
public int getMajorVersion()
getMajorVersion
in interface TransportFactory
public int getMinorVersion()
getMinorVersion
in interface TransportFactory
public java.lang.String getFactoryName()
getFactoryName
in interface TransportFactory
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 void setDefaultUrl(java.lang.String dfltURL)
setDefaultUrl
in interface TransportFactory
dfltURL
- Stringpublic java.lang.String getDefaultUrl()
getDefaultUrl
in interface TransportFactory
public int getTransportReconnectRetries()
getTransportReconnectRetries
in interface TransportFactory
public java.lang.String getVendorString()
getVendorString
in interface TransportFactory
public boolean isLifeCycleManaged()
true
if the factory's connection life cycle is to be
managed by the Service Context.isLifeCycleManaged
in interface TransportFactory
public boolean isReliableConnection()
true
if the connection created by the factory is
reliable.isReliableConnection
in interface TransportFactory
public void setDefaultUser(java.lang.String userName)
setDefaultUser
in interface TransportFactory
userName
- Stringpublic void setLifeCycleManaged(boolean isManaged)
setLifeCycleManaged
in interface TransportFactory
isManaged
- booleanpublic void setFactoryName(java.lang.String name)
setFactoryName
in interface TransportFactory
name
- Stringpublic void setReliableConnection(boolean reliable)
setReliableConnection
in interface TransportFactory
reliable
- booleanpublic void setTransportReconnectRetries(int retries)
setTransportReconnectRetries
in interface TransportFactory
retries
- intpublic void setConnectionTimeout(int seconds)
setConnectionTimeout
in interface TransportFactory
seconds
- intpublic java.lang.String getFactoryType()
TransportFactory
getFactoryType
in interface TransportFactory
public void setFactoryType(java.lang.String type)
TransportFactory
setFactoryType
in interface TransportFactory
type
- Stringpublic void pingConnection() throws TransportException
TransportFactory
pingConnection
in interface TransportFactory
TransportException
public void destroyAll() throws TransportConfigurationException
TransportFactory
destroyAll
in interface TransportFactory
TransportConfigurationException
public TransportConnection lookupConnection(java.lang.String connectionName) throws TransportConfigurationException
TransportFactory
lookupConnection
in interface TransportFactory
connectionName
- StringTransportConfigurationException
public void removeConnection(java.lang.String connectionName) throws TransportConfigurationException
TransportFactory
removeConnection
in interface TransportFactory
connectionName
- StringTransportConfigurationException
public java.lang.String getProperty(java.lang.String name) throws TransportConfigurationException
TransportFactory
getProperty
in interface TransportFactory
name
- StringTransportConfigurationException
public void setProperty(java.lang.String name, java.lang.String value) throws TransportConfigurationException
TransportFactory
setProperty
in interface TransportFactory
name
- Stringvalue
- StringTransportConfigurationException
public java.util.Properties getProperties()
getProperties
in interface TransportFactory
public long getConnectionCheckInterval()
TransportFactory
getConnectionCheckInterval
in interface TransportFactory
public void setConnectionCheckInterval(long millis)
TransportFactory
setConnectionCheckInterval
in interface TransportFactory
millis
- longpublic long getReconnectInterval()
TransportFactory
getReconnectInterval
in interface TransportFactory
public void setReconnectInterval(long millis)
TransportFactory
setReconnectInterval
in interface TransportFactory
millis
- longpublic int getConnectionTimeout()
TransportFactory
getConnectionTimeout
in interface TransportFactory
public java.lang.String getConnectionFactoryClass()
TransportFactory
getConnectionFactoryClass
in interface TransportFactory
public void setConnectionFactoryClass(java.lang.String factoryClassName)
TransportFactory
setConnectionFactoryClass
in interface TransportFactory
factoryClassName
- Stringpublic java.util.Vector listFactoryProperties() throws TransportConfigurationException
TransportFactory
listFactoryProperties
in interface TransportFactory
TransportConfigurationException
public java.util.Vector listConnections()
TransportFactory
listConnections
in interface TransportFactory
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getFullName()
public void setURLs(java.util.List urls)
TransportFactory
setURLs
in interface TransportFactory
public java.util.List getURLs()
TransportFactory
getURLs
in interface TransportFactory
public void setConnectionStateValidatorClass(java.lang.String validatorClassName)
TransportFactory
connect
operation.setConnectionStateValidatorClass
in interface TransportFactory
validatorClassName
- Stringpublic java.lang.String getConnectionStateValidatorClass()
TransportFactory
getConnectionStateValidatorClass
in interface TransportFactory
public FabricComponent getFabricComponent()
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.