Package net.dona.doip.client
Class DoipClient
java.lang.Object
net.dona.doip.client.AbstractDoipClient
net.dona.doip.client.DoipClient
- All Implemented Interfaces:
AutoCloseable
,DoipClientInterface
A DOIP client for performing operations on objects. The client can be used to perform arbitrary operations on object, and also provides
specific methods for the basic DOIP operations.
In general handle resolution will be used to find the service information for accessing the object: the
target id is resolved, handle values of type DOIPService are references to service ids which are resolved,
handle values of type DOIPServiceInfo have service connection information.
It is also possible to explicitly supply the service through which the operation is to be performed.
The user should call
close()
to release all resources.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes all open connections and release all resources.performOperation
(DoipRequestHeaders headers, InDoipMessage input, ServiceInfo serviceInfo) Performs an operation at a specified service.Methods inherited from class net.dona.doip.client.AbstractDoipClient
create, create, delete, delete, delete, doipExceptionFromDoipResponse, hello, hello, listOperations, listOperations, listOperations, performOperation, performOperation, performOperation, performOperation, performOperation, performOperation, performOperation, performOperationWithJsonResponse, performOperationWithJsonResponse, performOperationWithJsonResponse, retrieve, retrieve, retrieve, retrieve, retrieve, retrieveElement, retrieveElement, retrieveElement, retrievePartialElement, retrievePartialElement, retrievePartialElement, search, search, searchIds, searchIds, update, update, update
-
Constructor Details
-
DoipClient
public DoipClient()Constructs a new DoipClient.
-
-
Method Details
-
close
public void close()Closes all open connections and release all resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceDoipClientInterface
- Overrides:
close
in classAbstractDoipClient
-
performOperation
public DoipClientResponse performOperation(DoipRequestHeaders headers, InDoipMessage input, ServiceInfo serviceInfo) throws DoipException Performs an operation at a specified service.- Specified by:
performOperation
in interfaceDoipClientInterface
- Specified by:
performOperation
in classAbstractDoipClient
- Parameters:
headers
- the content of the initial segment of the requestinput
- the input to the operation as an InDoipMessageserviceInfo
- the service at which to perform the operation- Returns:
- the response
- Throws:
DoipException
- if an operation with headers, a DOIP message to be read as input, and a connection and pool cannot be performed
-