com.epam.fixengine.storage
Class FilesystemStorageFactory

java.lang.Object
  extended by com.epam.fixengine.storage.FilesystemStorageFactory
All Implemented Interfaces:
StorageFactory
Direct Known Subclasses:
MMFStorageFactory, SlicedFileStorageFactory

public class FilesystemStorageFactory
extends Object
implements StorageFactory

Provides ability to store messages in the file.


Field Summary
protected  LogFileLocator backupIncomingLogFileLocator
          Locator for backup files of incoming storage
protected  LogFileLocator backupOutgoingLogFileLocator
          Locator for backup files of outgoing storage
protected  com.epam.fixengine.session.util.ConfigurationAdaptor config
           
protected  LogFileLocator incomingLogFileLocator
          Locator for incoming storage file
protected  LogFileLocator outgoingLogFileLocator
          Locator for outgoing storage file
protected  LogFileLocator propertyFileLocator
          Locator for session property file
protected  LogFileLocator queueFileLocator
          Locator for outgoing queue
 
Constructor Summary
FilesystemStorageFactory()
          Deprecated. 
FilesystemStorageFactory(Configuration configuration)
          Creates the FilesystemStorageFactory storage.
 
Method Summary
 LogFileLocator getIncomingLogFileLocator()
           
 MessageStorage getIncomingMessageStorage(SessionParameters sessionParameters)
          Gets incoming message storage.
 LogFileLocator getOutgoingLogFileLocator()
           
 MessageStorage getOutgoingMessageStorage(SessionParameters sessionParameters)
          Gets outgoing message storage.
 Queue<FIXFieldListWithType> getQueue(SessionParameters sessionParameters)
          Gets queue for session.
 boolean loadSessionParameters(SessionParameters sessionParameters)
          Loads session parameters from file.
 void saveSessionParameters(SessionParameters sessionParameters)
          Stores session parameters to file.
 void setIncomingLogFileLocator(LogFileLocator incomingLogFileLocator)
           
 void setOutgoingLogFileLocator(LogFileLocator outgoingLogFileLocator)
           
 void setPropertyFileLocator(LogFileLocator propertyFileLocator)
           
 void setQueueFileLocator(LogFileLocator queueFileLocator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outgoingLogFileLocator

protected LogFileLocator outgoingLogFileLocator
Locator for outgoing storage file


incomingLogFileLocator

protected LogFileLocator incomingLogFileLocator
Locator for incoming storage file


backupOutgoingLogFileLocator

protected LogFileLocator backupOutgoingLogFileLocator
Locator for backup files of outgoing storage


backupIncomingLogFileLocator

protected LogFileLocator backupIncomingLogFileLocator
Locator for backup files of incoming storage


propertyFileLocator

protected LogFileLocator propertyFileLocator
Locator for session property file


queueFileLocator

protected LogFileLocator queueFileLocator
Locator for outgoing queue


config

protected com.epam.fixengine.session.util.ConfigurationAdaptor config
Constructor Detail

FilesystemStorageFactory

@Deprecated
public FilesystemStorageFactory()
Deprecated. 

Creates the FilesystemStorageFactory storage.


FilesystemStorageFactory

public FilesystemStorageFactory(Configuration configuration)
Creates the FilesystemStorageFactory storage.

Method Detail

getOutgoingLogFileLocator

public LogFileLocator getOutgoingLogFileLocator()

setPropertyFileLocator

public void setPropertyFileLocator(LogFileLocator propertyFileLocator)

setQueueFileLocator

public void setQueueFileLocator(LogFileLocator queueFileLocator)

setOutgoingLogFileLocator

public void setOutgoingLogFileLocator(LogFileLocator outgoingLogFileLocator)

getIncomingLogFileLocator

public LogFileLocator getIncomingLogFileLocator()

setIncomingLogFileLocator

public void setIncomingLogFileLocator(LogFileLocator incomingLogFileLocator)

getQueue

public Queue<FIXFieldListWithType> getQueue(SessionParameters sessionParameters)
Gets queue for session. If parameter inMemoryQueue configured, the queue will be InMemoryQueue, otherwise PersistentInMemoryQueue.

Specified by:
getQueue in interface StorageFactory
Parameters:
sessionParameters - the parameter for session
Returns:
the outgoing queue of messages

getIncomingMessageStorage

public MessageStorage getIncomingMessageStorage(SessionParameters sessionParameters)
Gets incoming message storage. Method returns FlatFileMessageStorage implementation.

Specified by:
getIncomingMessageStorage in interface StorageFactory
Parameters:
sessionParameters - the session parameters
Returns:
the incoming message storage
See Also:
StorageFactory, FlatFileMessageStorage

getOutgoingMessageStorage

public MessageStorage getOutgoingMessageStorage(SessionParameters sessionParameters)
Gets outgoing message storage. If parameter outgoingStorageIndexed configured, the message storage will be IndexedMessageStorage, otherwise FlatFileMessageStorage

Specified by:
getOutgoingMessageStorage in interface StorageFactory
Parameters:
sessionParameters - the session parameters
Returns:
the outgoing message storage

saveSessionParameters

public void saveSessionParameters(SessionParameters sessionParameters)
                           throws IOException
Stores session parameters to file.

Specified by:
saveSessionParameters in interface StorageFactory
Parameters:
sessionParameters - the session parameters
Throws:
IOException - - if I/O error occurred

loadSessionParameters

public boolean loadSessionParameters(SessionParameters sessionParameters)
Loads session parameters from file.

Specified by:
loadSessionParameters in interface StorageFactory
Parameters:
sessionParameters - the session parameters

return true if loaded

Returns:
true if parameters loaded


Copyright © 2000-2014 EPAM Systems. All Rights Reserved.