Interface Connection
-
- All Superinterfaces:
- java.io.Serializable
public interface Connection extends java.io.Serializable
Represents a logical connection to a FileNet P8 domain. A domain connection is required to obtain a reference to any object stores within that domain. AConnection
object contains information, such as configuration options, needed to execute an operation on the Content Engine server that runs in the FileNet P8 domain.A
Connection
object contains enough information to establish communication with the Content Engine server. This information is carried in a URI and includes the transport protocol (connection type), host name, and port number that are used for server communication. An incorrect configuration, such as an incompatibility between the environment and the information in theConnection
object, is the most frequent cause of an exception related to a connection failure. For example, if the URI carried by theConnection
object specifies the Enterprise Java™Beans (EJB) transport protocol but an EJB .jar file is not in the classpath, the API throws an exception.You can create a
Connection
object by calling one of the staticgetConnection
methods on theFactory.Connection
class.Once you have obtained a
Connection
object, you can call its methods to retrieve information about the connection. All engine objects maintain a reference to the connection instance, which you can retrieve by calling the engine object'sgetConnection
method. TheConnection
object is also used as an input to factory methods that create other objects. Examples areFactory.Domain.getInstance(Connection conn, String name)
andFactory.EntireNetwork.getInstance(Connection conn)
.
-
-
Method Summary
Methods Modifier and Type Method and Description ConnectionType
getConnectionType()
Returns aConnectionType
object, which identifies the transport protocol associated with this connection.java.lang.Object
getParameter(ConfigurationParameter parameter)
Retrieves the specified configuration parameter.java.lang.String
getURI()
Returns the Universal Resource Identity (URI) for this connection.java.lang.Object
setParameter(ConfigurationParameter parameter, java.lang.Object value)
Sets a configuration parameter.void
setParameters(ConfigurationParameters parameters)
Sets the configuration parameters specified in theparameters
argument.
-
-
-
Method Detail
-
getURI
java.lang.String getURI()
Returns the Universal Resource Identity (URI) for this connection. The URI carries the information required to establish a connection to the Content Engine server, such as the transport protocol, host, and port used for server communication.- Returns:
- A
String
containing the URI.
-
getConnectionType
ConnectionType getConnectionType()
Returns aConnectionType
object, which identifies the transport protocol associated with this connection. Supported transport protocols are EJB and SOAP (that is, the web services interface to the Content Engine server, based on the SOAP protocol).- Returns:
- A
ConnectionType
object, which can be either EJB or SOAP.
-
getParameter
java.lang.Object getParameter(ConfigurationParameter parameter)
Retrieves the specified configuration parameter.- Parameters:
parameter
- Configuration parameter value to retrieve. See theConfigurationParameter
class.- Returns:
- Parameter value or
null
if not set.
-
setParameter
java.lang.Object setParameter(ConfigurationParameter parameter, java.lang.Object value)
Sets a configuration parameter. If the value of thevalue
argument isnull
, this method removes the value. Defaults are used for removed values.- Parameters:
parameter
- The configuration parameter to set. See theConfigurationParameter
class.value
- The value of the parameter to set, ornull
. See theConfigurationParameter
class.- Returns:
- The previous value.
- Throws:
EngineRuntimeException
- if the specified parameters are invalid.- See Also:
ExceptionCode.API_INVALID_CONNECTION_PARAMETER
-
setParameters
void setParameters(ConfigurationParameters parameters)
Sets the configuration parameters specified in theparameters
argument. Other configuration parameters are unchanged. This is equivalent to callingsetParameter(ConfigurationParameter parameter, Object value)
for each parameter with a non-null
value in itsparameter
argument.- Parameters:
parameters
- AConfigurationParameters
collection.- Throws:
EngineRuntimeException
- if one or more parameters are invalid.- See Also:
ExceptionCode.API_INVALID_CONNECTION_PARAMETER
-
-