The constructor establishes a connection to the Message Feed server.
To avoid memory leaks, the Mfp object must be disconnected from the Message Feed server, using the method close
, before being finalized.
core.mfp.Mfp
constructor
public Mfp(String host, String service, int timeout) throws Exception, MfpException
host
– Name of the TCP/IP host on which the Message Feed server is located.service
– Name of the TCP/IP service to which the Message Feed server listens to.timeout
– Timeout, in seconds, for socket access to the Message Feed server.Mfp.constructor throws an Exception
when system resources are exhausted, or an MfpException
in when the connection to the Message Feed server fails.
Use the MfpException.toString
method to get a textual description of the exception.
import core.mfp.*; ... Mfp mfp = new Mfp("localhost", "12345", 60); ... mfp.close(); ... |