|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.admin.ads.ServerDescriptor
public class ServerDescriptor
The object of this class represent an OpenDS server.
Nested Class Summary | |
---|---|
static class |
ServerDescriptor.ServerProperty
Enumeration containing the different server properties that we can keep in the ServerProperty object. |
Method Summary | |
---|---|
static ServerDescriptor |
createStandalone(javax.naming.ldap.InitialLdapContext ctx,
TopologyCacheFilter filter)
Creates a ServerDescriptor object based on the configuration that we read using the provided InitialLdapContext. |
static ServerDescriptor |
createStandalone(java.util.Map<ADSContext.ServerProperty,java.lang.Object> adsProperties)
Creates a ServerDescriptor object based on some ADS properties provided. |
java.util.Map<ADSContext.ServerProperty,java.lang.Object> |
getAdsProperties()
Returns a Map containing the ADS properties of the server. |
java.lang.String |
getHostName()
Returns the host name of the server. |
java.lang.String |
getHostPort(boolean securePreferred)
Returns a String of type host-name:port-number for the server. |
java.lang.String |
getId()
Returns an Id that is unique for this server. |
byte[] |
getInstancePublicKeyCertificate()
Returns the instance-key public-key certificate retrieved from the truststore backend of the instance referenced through this descriptor. |
TopologyCacheException |
getLastException()
Returns the last exception that was encountered reading the configuration of the server. |
java.lang.String |
getLDAPsURL()
Returns the URL to access this server using LDAPS. |
java.lang.String |
getLDAPURL()
Returns the URL to access this server using LDAP. |
java.util.Set<ReplicaDescriptor> |
getReplicas()
Returns the replicas contained on the server. |
java.lang.String |
getReplicationServerHostPort()
Returns the String representation of this replication server based on the information we have ("hostname":"replication port") and null if this is not a replication server. |
int |
getReplicationServerId()
Returns the replication server ID of this server and -1 if this is not a replications server. |
int |
getReplicationServerPort()
Returns the replication port of this server and -1 if this is not a replications server. |
java.lang.String |
getSchemaReplicationID()
Returns the schema generation ID of the server. |
java.util.Map<ServerDescriptor.ServerProperty,java.lang.Object> |
getServerProperties()
Returns a Map containing the properties of the server. |
boolean |
isRegistered()
Tells whether this server is registered in the ADS or not. |
boolean |
isReplicationSecure()
Returns whether the communication with the replication port on the server is encrypted or not. |
boolean |
isReplicationServer()
Tells whether this server is a replication server or not. |
static void |
seedAdsTrustStore(javax.naming.ldap.InitialLdapContext ctx,
java.util.Map<java.lang.String,byte[]> keyEntryMap)
Seeds the bound instance's local ads-truststore with a set of instance key-pair public key certificates. |
void |
setAdsProperties(java.util.Map<ADSContext.ServerProperty,java.lang.Object> adsProperties)
Sets the ADS properties of the server. |
void |
setLastException(TopologyCacheException lastException)
Sets the last exception that occurred while reading the configuration of the server. |
void |
setReplicas(java.util.Set<ReplicaDescriptor> replicas)
Sets the replicas contained on the server. |
void |
updateAdsPropertiesWithServerProperties()
This methods updates the ADS properties (the ones that were read from the ADS) with the contents of the server properties (the ones that were read directly from the server). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.util.Set<ReplicaDescriptor> getReplicas()
public void setReplicas(java.util.Set<ReplicaDescriptor> replicas)
replicas
- the replicas contained on the server.public java.util.Map<ADSContext.ServerProperty,java.lang.Object> getAdsProperties()
public java.util.Map<ServerDescriptor.ServerProperty,java.lang.Object> getServerProperties()
public boolean isRegistered()
true
if the server is registered in the ADS and
false
otherwise.public boolean isReplicationServer()
true
if the server is a replication server and
false
otherwise.public java.lang.String getReplicationServerHostPort()
null
if this is not a replication server.
null
if this is not a replication server.public int getReplicationServerId()
public int getReplicationServerPort()
public boolean isReplicationSecure()
true
if the communication with the replication port on
the server is encrypted and false
otherwise.public void setAdsProperties(java.util.Map<ADSContext.ServerProperty,java.lang.Object> adsProperties)
adsProperties
- a Map containing the ADS properties of the server.public java.lang.String getHostName()
public java.lang.String getLDAPURL()
null
if the server is not configured to listen on an LDAP
port.
public java.lang.String getLDAPsURL()
null
if the server is not configured to listen on an LDAPS
port.
public java.lang.String getHostPort(boolean securePreferred)
securePreferred
- whether to try to use the secure port as part
of the returning String or not.
public java.lang.String getId()
public byte[] getInstancePublicKeyCertificate()
public java.lang.String getSchemaReplicationID()
public TopologyCacheException getLastException()
public void setLastException(TopologyCacheException lastException)
lastException
- the last exception that occurred while reading the
configuration of the server.public void updateAdsPropertiesWithServerProperties()
public static ServerDescriptor createStandalone(java.util.Map<ADSContext.ServerProperty,java.lang.Object> adsProperties)
adsProperties
- the ADS properties of the server.
public static ServerDescriptor createStandalone(javax.naming.ldap.InitialLdapContext ctx, TopologyCacheFilter filter) throws javax.naming.NamingException
ctx
- the InitialLdapContext that will be used to read the
configuration of the server.filter
- the topology cache filter describing the information that
must be retrieved.
javax.naming.NamingException
- if a problem occurred reading the server
configuration.public static void seedAdsTrustStore(javax.naming.ldap.InitialLdapContext ctx, java.util.Map<java.lang.String,byte[]> keyEntryMap) throws javax.naming.NamingException
ctx
- The bound instance.keyEntryMap
- The set of valid (i.e., not tagged as compromised)
instance key-pair public-key certificate entries in ADS represented as a map
from keyID to public-key certificate (binary).
javax.naming.NamingException
- in case an error occurs while updating the instance's
ads-truststore via LDAP.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |