|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.fosstrak.epcis.captureclient.CaptureClient
public class CaptureClient
This client provides access to the repository's Capture Operations Module through the capture interface. EPCISEvents will be sent to the module using HTTP POST requests.
Constructor Summary | |
---|---|
CaptureClient()
Constructs a new CaptureClient which connects to the Capture Operations Module listening at the default URL, with no authentication. |
|
CaptureClient(java.lang.String url)
Constructs a new CaptureClient which connects to the Capture Operations Module listening at the specified URL, with no authentication. |
|
CaptureClient(java.lang.String url,
java.lang.Object[] authOptions)
Constructs a new CaptureClient which connects to the Capture Operations Module listening at the given URL. |
Method Summary | |
---|---|
int |
capture(org.fosstrak.epcis.model.EPCISDocumentType epcisDoc)
Send the given EPCISDocumentType to the repository for capturing. |
int |
capture(java.io.InputStream xmlStream)
Send the XML available from the given InputStream to the repository for capturing. |
int |
capture(java.lang.String eventXml)
Send the given XML String to the repository for capturing. |
void |
checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
|
void |
checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
|
int |
dbReset()
Invokes the dbReset operation in the Capture Module deleting all event data in the EPCIS database. |
java.security.cert.X509Certificate[] |
getAcceptedIssuers()
|
java.lang.Object[] |
getAuthOptions()
|
java.lang.String |
getCaptureUrl()
|
boolean |
verify(java.lang.String arg0,
javax.net.ssl.SSLSession arg1)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CaptureClient()
public CaptureClient(java.lang.String url)
public CaptureClient(java.lang.String url, java.lang.Object[] authOptions)
url
- The URL at which the capture service listens.authOptions
- The authentication options:
authenticationOptions[0] |
[1] |
[2] |
AuthenticationType.BASIC |
username | password |
AuthenticationType.HTTPS_WITH_CLIENT_CERT |
keystore file | password |
Method Detail |
---|
public int capture(java.io.InputStream xmlStream) throws java.lang.Exception
xmlStream
- A stream providing an EPCISDocument which contains a list of
events inside the EPCISBody element.
java.io.IOException
- If an error sending the document occurred.
java.lang.Exception
public int capture(java.lang.String eventXml) throws java.lang.Exception
eventXml
- The XML String consisting of an EPCISDocument which in turn
contains a list of events inside the EPCISBody element.
java.io.IOException
- If an error sending the document occurred.
java.lang.Exception
public int capture(org.fosstrak.epcis.model.EPCISDocumentType epcisDoc) throws java.lang.Exception
epcisDoc
- The EPCISDocument containing a list of events inside the
EPCISBody element.
java.io.IOException
- If an error sending the document occurred.
javax.xml.bind.JAXBException
- If an error serializing the given document into XML occurred.
java.lang.Exception
public int dbReset() throws java.lang.Exception
java.io.IOException
- If a communication error occurred.
java.lang.Exception
public java.lang.String getCaptureUrl()
public java.lang.Object[] getAuthOptions()
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType) throws java.security.cert.CertificateException
checkClientTrusted
in interface javax.net.ssl.X509TrustManager
java.security.cert.CertificateException
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType) throws java.security.cert.CertificateException
checkServerTrusted
in interface javax.net.ssl.X509TrustManager
java.security.cert.CertificateException
public java.security.cert.X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers
in interface javax.net.ssl.X509TrustManager
public boolean verify(java.lang.String arg0, javax.net.ssl.SSLSession arg1)
verify
in interface javax.net.ssl.HostnameVerifier
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |