public class File extends cMsgDomainAdapter
connected, debug, description, domain, host, name, receiving, shutdownHandler, UDL, UDLremainder| Constructor and Description |
|---|
File()
Constructor for File domain.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Opens a file.
|
void |
disconnect()
Closes file.
|
void |
flush(int timeout)
Flushes output.
|
void |
send(cMsgMessage msg)
Writes to file.
|
int |
syncSend(cMsgMessage message,
int timeout)
Calls send to write to file.
|
getCurrentUDL, getDebug, getDescription, getDomain, getHost, getInfo, getName, getServerHost, getServerPort, getShutdownHandler, getUDL, getUDLRemainder, isConnected, isReceiving, monitor, sendAndGet, setDebug, setDescription, setName, setShutdownHandler, setUDL, setUDLRemainder, shutdownClients, shutdownServers, start, stop, subscribe, subscribeAndGet, unsubscribepublic File()
UDL: cMsg:file//fileName?textOnly=value.
Default is to print entire message to file. If textOnly=true then only print timestamp and message text to file.
public void connect()
throws cMsgException
connect in interface cMsgDomainInterfaceconnect in class cMsgDomainAdaptercMsgException - if cannot open file or domain specific part of UDL is nullpublic void disconnect()
disconnect in interface cMsgDomainInterfacedisconnect in class cMsgDomainAdapterpublic void send(cMsgMessage msg) throws cMsgException
send in interface cMsgDomainInterfacesend in class cMsgDomainAdaptermsg - message to write to filecMsgException - if file is closed (connect was not called, or disconnect was called)public int syncSend(cMsgMessage message, int timeout) throws cMsgException
syncSend in interface cMsgDomainInterfacesyncSend in class cMsgDomainAdaptermessage - message to write to filetimeout - time in milliseconds to wait for a responsecMsgException - if file is closed (connect was not called, or disconnect was called)public void flush(int timeout)
throws cMsgException
flush in interface cMsgDomainInterfaceflush in class cMsgDomainAdaptertimeout - ignoredcMsgException - if file is closed (connect was not called, or disconnect was called)