|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.uiuc.ge.illigal.gale.io.FileIOFactory
Implements a simple IO factory with multiple channels onto a file system.
Field Summary | |
protected java.io.FileOutputStream[] |
fosa
The FileOutputStream array references |
protected java.util.Hashtable |
htTrans
Translation for channel ids |
protected java.io.PrintStream[] |
psa
The PrintStream array references |
Constructor Summary | |
FileIOFactory(int iMax)
Builds an IOFactory mapped onto a file system. |
Method Summary | |
void |
closeAllChannels()
Closes all IO channels. |
void |
closeChannel(int iDesc)
Closes an IO channel. |
void |
closeChannel(java.lang.String sName)
Closes an IO channel. |
int |
openChannel(java.lang.String sName,
java.lang.String sURL)
Opens a new IO channel. |
void |
push(int iDesc,
java.lang.Object obj)
Pushes the information into the given channel. |
void |
push(java.lang.String sName,
java.lang.Object obj)
Pushes the information into the given channel. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.FileOutputStream[] fosa
protected java.io.PrintStream[] psa
protected java.util.Hashtable htTrans
Constructor Detail |
public FileIOFactory(int iMax)
iMax
- Maximum number of concurrent channelsMethod Detail |
public int openChannel(java.lang.String sName, java.lang.String sURL) throws IOFactoryException
IOFactory
openChannel
in interface IOFactory
sName
- The channel namesURL
- The channel URL
IOFactoryException
- The channel could not be openedpublic void closeChannel(int iDesc) throws IOFactoryException
IOFactory
closeChannel
in interface IOFactory
iDesc
- The channel descriptor
IOFactoryException
- The channel could not be closedpublic void closeChannel(java.lang.String sName) throws IOFactoryException
IOFactory
closeChannel
in interface IOFactory
sName
- The channel name
IOFactoryException
- The channel could not be closedpublic void closeAllChannels() throws IOFactoryException
IOFactory
closeAllChannels
in interface IOFactory
IOFactoryException
- The channel could not be closedpublic void push(int iDesc, java.lang.Object obj) throws IOFactoryException
IOFactory
push
in interface IOFactory
iDesc
- The channel descriptorobj
- The object to be pushed
IOFactoryException
- The failure in channelpublic void push(java.lang.String sName, java.lang.Object obj) throws IOFactoryException
IOFactory
push
in interface IOFactory
obj
- The object to be pushed
IOFactoryException
- The failure in channel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |