public final class MDMConnectionFactory extends Object
Static methods are provided to create IMDMConnection
instances that
are used to communicate with a remote Convergence for MDM instance.
The most common way to create a connection is to use
connect(String, String, String)
which allows to
create a connection to a Convergence For MDM instance for a given url, username
and password. Usage:
// Establish the connection IMDMConnection mdmConnection = MDMConnectionFactory.connect("http://localhost:8080/semarchy/", "semadmin", "semadmin") // Use the connection to obtain remote information String version = mdmConnection.getPlatformVersion(); String authenticatedUserName = mdmConnection.getUsername(); ...
Modifier and Type | Method and Description |
---|---|
static IMDMConnection |
connect(ICacheResolver pCacheResolver,
ConnectionConfig pConfig,
IMDMCredential pCredentials)
Similar to
connect(String, IMDMCredential) except that the
ICacheResolver parameter allows to control the scope of client
side caching. |
static IMDMConnection |
connect(String pSemarchyBaseURL,
IMDMCredential pCredentials)
Similar to
connect(String, String, String) except that the
client will be authenticated with the provided IMDMCredential . |
static IMDMConnection |
connect(String pConvergenceForMDMBaseURL,
String pUsername,
String pPassword)
Creates a connection to a Convergence for MDM instance.
|
public static final IMDMConnection connect(String pConvergenceForMDMBaseURL, String pUsername, String pPassword)
pConvergenceForMDMBaseURL
- the base URL of the Semarchy Convergence For MDM instance
something like http://<host-name>/semarchy/
pUsername
- pPassword
- public static final IMDMConnection connect(String pSemarchyBaseURL, IMDMCredential pCredentials)
connect(String, String, String)
except that the
client will be authenticated with the provided IMDMCredential
.pSemarchyBaseURL
- pCredentials
- CookieCredential
,
UsernamePassword
public static final IMDMConnection connect(ICacheResolver pCacheResolver, ConnectionConfig pConfig, IMDMCredential pCredentials)
connect(String, IMDMCredential)
except that the
ICacheResolver
parameter allows to control the scope of client
side caching. The client side cache allows to share some static elements
across several IMDMConnection
connection improving performance
and reduce memory footprint when a lot of connections are used.pCacheResolver
- if null the StaticCacheResolver.instance()
) will be
used which is a good for most use casespConfig
- pCredentials
- Copyright © 2019. All rights reserved.