|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.commons.connector.ManagedConnectionFactoryBase
org.jcoderz.commons.connector.file.FsManagedConnectionFactoryImpl
public class FsManagedConnectionFactoryImpl
Implements the ManagedConnectionFactory interface.
| Field Summary | |
|---|---|
static long |
FILE_TRANSFER_CHUNK_SIZE_MAX_VALUE
Max value for chunk size, just Integer.MAX_VALUE. |
static long |
FILE_TRANSFER_CHUNK_SIZE_MIN_VALUE
Min value for chunk size, just 1KByte. |
| Constructor Summary | |
|---|---|
FsManagedConnectionFactoryImpl()
|
|
| Method Summary | |
|---|---|
protected Object |
createConnectionFactoryImpl(ConnectionManager cm)
Creates a new FsConnectionFactoryImpl instance. |
protected ManagedConnection |
createManagedConnectionImpl(UserPassword up,
ConnectionRequestInfo cri)
|
protected boolean |
isMatchingManagedConnection(ManagedConnection mc,
UserPassword up,
ConnectionRequestInfo cri)
Tests whether the given managed connection mc matchs for
handling the connection allocation request. |
void |
setFileTransferChunkSize(Long size)
Sets the chunk size used while file transfering. |
void |
setTempDir(String dir)
Defines the temporary directory to be used by this connector. |
| Methods inherited from class org.jcoderz.commons.connector.ManagedConnectionFactoryBase |
|---|
createConnectionFactory, createConnectionFactory, createManagedConnection, equals, getLogWriter, getUserPassword, hashCode, matchManagedConnections, setLogWriter, setPassword, setUserName |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long FILE_TRANSFER_CHUNK_SIZE_MIN_VALUE
public static final long FILE_TRANSFER_CHUNK_SIZE_MAX_VALUE
Integer.MAX_VALUE.
| Constructor Detail |
|---|
public FsManagedConnectionFactoryImpl()
| Method Detail |
|---|
protected ManagedConnection createManagedConnectionImpl(UserPassword up,
ConnectionRequestInfo cri)
createManagedConnectionImpl in class ManagedConnectionFactoryBase
protected boolean isMatchingManagedConnection(ManagedConnection mc,
UserPassword up,
ConnectionRequestInfo cri)
throws ResourceException
ManagedConnectionFactoryBasemc matchs for
handling the connection allocation request.
isMatchingManagedConnection in class ManagedConnectionFactoryBasemc - The managed connection to be tested.up - The caller's security information.cri - A resource adapter specific connection request information.
mc matchs for
handling the connection allocation request. Otherwise false.
ResourceException - thrown in error cases.
protected Object createConnectionFactoryImpl(ConnectionManager cm)
throws ResourceException
createConnectionFactoryImpl in class ManagedConnectionFactoryBasecm - The ConectionManager to use.
ResourceException - thrown in error cases.ManagedConnectionFactoryBase.createConnectionFactoryImpl(javax.resource.spi.ConnectionManager)public void setFileTransferChunkSize(Long size)
FILE_TRANSFER_CHUNK_SIZE_MIN_VALUE,
the Max value is
FILE_TRANSFER_CHUNK_SIZE_MAX_VALUE.
If this property is not defined in the deployment descriptor the file
connector will use the default value
FsConnectionFactory.FILE_TRANSFER_CHUNK_SIZE_DEF_VALUE.
Too small value will probably slow the performance down, and too large
value may cause a resource's allocation problem. The value of this
property should be adjusted to the underlying os, file system and
available memory.
A connection client can overwrite this value by passing a property
object while retrieving a connection by calling the method
FsConnectionFactory.getConnection(Properties).
size - the new chunk size to set.public void setTempDir(String dir)
FsConnectionFactory.getConnection(Properties).
dir - temp dir to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||