public class PDClient extends Object implements Closeable
| Constructor and Description |
|---|
PDClient(URI aPDHost)
Constructor with a direct PEPPOL Directory URL.
|
| Modifier and Type | Method and Description |
|---|---|
com.helger.commons.state.ESuccess |
addServiceGroupToIndex(com.helger.peppol.identifier.IParticipantIdentifier aParticipantID) |
void |
close() |
protected org.apache.http.impl.client.HttpClientBuilder |
createClientBuilder() |
static PDClient |
createDefaultClient() |
protected org.apache.http.client.config.RequestConfig |
createRequestConfig() |
com.helger.commons.state.ESuccess |
deleteServiceGroupFromIndex(com.helger.peppol.identifier.IParticipantIdentifier aParticipantID) |
protected org.apache.http.client.methods.CloseableHttpResponse |
executeRequest(org.apache.http.client.methods.HttpRequestBase aRequest)
The main execution routine.
|
String |
getPDHostURI() |
org.apache.http.HttpHost |
getProxy() |
org.apache.http.auth.Credentials |
getProxyCredentials() |
boolean |
isServiceGroupRegistered(com.helger.peppol.identifier.IParticipantIdentifier aParticipantID)
Gets a list of references to the CompleteServiceGroup's owned by the
specified userId.
|
void |
setProxy(org.apache.http.HttpHost aProxy)
Set the proxy to be used to access the PEPPOL Directory server.
|
void |
setProxyCredentials(org.apache.http.auth.Credentials aProxyCredentials)
Set the proxy Credentials to be used to access the PEPPOL Directory server.
|
@Nonnull public String getPDHostURI()
null . Always has a trailing "/".@Nullable public org.apache.http.HttpHost getProxy()
null by default.public void setProxy(@Nullable org.apache.http.HttpHost aProxy)
aProxy - May be null to indicate no proxy.@Nullable public org.apache.http.auth.Credentials getProxyCredentials()
null by default.public void setProxyCredentials(@Nullable org.apache.http.auth.Credentials aProxyCredentials)
aProxyCredentials - May be null to indicate no proxy credentials necessary.protected org.apache.http.impl.client.HttpClientBuilder createClientBuilder()
@Nonnull @OverrideOnDemand protected org.apache.http.client.config.RequestConfig createRequestConfig()
@Nonnull @OverrideOnDemand protected org.apache.http.client.methods.CloseableHttpResponse executeRequest(@Nonnull org.apache.http.client.methods.HttpRequestBase aRequest) throws IOException
aRequest - The request to be executed. Never null.null.IOException - On HTTP error@Nonnull public boolean isServiceGroupRegistered(@Nonnull com.helger.peppol.identifier.IParticipantIdentifier aParticipantID)
aParticipantID - Participant ID to query for existence. May not be null.true if the participant is in the index,
false otherwise.@Nonnull public com.helger.commons.state.ESuccess addServiceGroupToIndex(@Nonnull com.helger.peppol.identifier.IParticipantIdentifier aParticipantID)
@Nonnull public com.helger.commons.state.ESuccess deleteServiceGroupFromIndex(@Nonnull com.helger.peppol.identifier.IParticipantIdentifier aParticipantID)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2015–2016 Philip Helger. All rights reserved.