public class EtpSession extends Object
All messages that can be sent from an ETP client are implemented as public methods in this class. All messages that can be received from the ETP server are captured through methods in the EtpServerListener interface that can be added to this class.
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(EtpProtocol protocol)
Send an Acknowledge message to the ETP server.
|
void |
cancelNotification(String uri)
Send a CancelNotification message to the ETP server.
|
EtpLogSet |
channelDescribe(EtpResource resource)
Send a ChannelDescribe message to the ETP server.
|
EtpLogSet |
channelDescribe(String uri) |
void |
channelRangeRequest(EtpLogSet logSet,
Number startIndex,
Number endIndex)
Send a ChannelRangeRequest message to the ETP server.
|
void |
channelStreamingStart(EtpLogSet logSet,
Object index)
Send a ChannelStreamingStart message to the ETP server.
|
void |
channelStreamingStop(EtpLogSet logSet)
Send a ChannelStreamingStop message to the ETP server.
|
void |
closeSession()
Send a CloseSession message to the ETP server.
|
void |
deleteObject(String uri)
Send a DeleteObject message to the ETP server.
|
boolean |
equals(Object object) |
List<List<Object>> |
getDataArray(String uri)
Send a GetDataArray message to the ETP server.
|
List<List<Object>> |
getDataArraySlice(String uri,
long[] start,
long[] count)
Send a GetDataArraySlice message to the ETP server.
|
EtpServer |
getEtpServer()
Return the back-end server specification of this session.
|
String |
getId()
Return ID of this session.
|
EtpObject |
getObject(EtpResource resource)
Send a GetObject message to the ETP server.
|
List<EtpResource> |
getResources(EtpResource parent)
Send a GetResources message to the ETP server.
|
List<EtpResource> |
getResources(String parentUri)
Testing.
|
void |
growingObjectDelete(String parentUri,
String uid)
Send a GrowingObjectDelete message to the ETP server.
|
void |
growingObjectDeleteRange(String uri,
GrowingObjectIndex startIndex,
GrowingObjectIndex endIndex)
Send a GrowingObjectDeleteRange message to the ETP server.
|
void |
growingObjectGet(String parentUri,
String uid)
Send a GrowingObjectGet message to the ETP server.
|
void |
growingObjectGetRange(String parentUri,
GrowingObjectIndex startIndex,
GrowingObjectIndex endIndex,
String indexUnit,
String depthDatum)
Send a GrowingObjectGetRange message to the ETP server.
|
void |
growingObjectPut(String parentUri,
String contentType,
byte[] data)
Send a GrowingObjectPut message to the ETP server.
|
int |
hashCode() |
void |
notificationRequest(String uri,
EtpStoreNotificationListener listener)
Send a NotificationRequest message to the ETP server.
|
void |
putDataArray(String uri,
List<List<Object>> data)
Send a PutDataArray message to the ETP server.
|
void |
putDataArraySlice(String uri,
List<List<Object>> data,
long[] start)
Send a PutDataArraySlice message to the ETP server.
|
void |
putObject(EtpObject etpObject)
Send a PutObject message to the ETP server.
|
void |
renewSecurityToken(String securityToken)
Send a RenewSecurityToken message to the ETP server.
|
EtpLogSet |
requestChannelData(EtpResource resource,
Long fromIndex,
Long toIndex)
Send a RequestChannelData message to the ETP server.
|
String |
toString() |
long |
wmlsAddToStore(String wmlType,
String addXml) |
long |
wmlsDeleteFromStore(String wmlType,
String deleteXml) |
long |
wmlsGetBaseMsg(int statusCode) |
long |
wmlsGetCap(String version) |
long |
wmlsGetFromStore(String wmlType,
String queryXml) |
String |
wmlsGetVersion()
Send a WMLS_GetVersion message to the ETP server.
|
long |
wmlsUpdateInStore(String wmlType,
String updateXml) |
public String getId()
public EtpServer getEtpServer()
public void acknowledge(EtpProtocol protocol)
This method is defined by the ETP protocol 0 (Core).
protocol
- The originating protocol. Non-null.IllegalArgumentException
- If protocol is null.public void closeSession()
This method is defined by the ETP protocol 0 (Core).
Note that this call will not be follwed by a onCloseSession() call from the server.
public void renewSecurityToken(String securityToken)
This method is defined by the ETP protocol 0 (Core).
securityToken
- The security toen to renew. Non-null.IllegalArgumentException
- If securityToken is null.public EtpLogSet channelDescribe(EtpResource resource) throws EtpException
This method is defined by the ETP protocol 1 (ChannelStreaming).
resource
- Resource (log set or log curve) to describe. Non-null.IllegalArgumentException
- If resource is null.EtpException
- If the operation fails for some reason.public EtpLogSet channelDescribe(String uri) throws EtpException
EtpException
public void channelStreamingStart(EtpLogSet logSet, Object index)
This method is defined by the ETP protocol 1 (ChannelStreaming).
logSet
- Log set to start streaming to. Non-null.index
- null to indicate streaming from latest value.
Integer to indicate streaming from the n'ta latest value-
Long to indicate streaming from a specific index.IllegalArgumentException
- If logSet is null.public void channelStreamingStop(EtpLogSet logSet)
This method is defined by the ETP protocol 1 (ChannelStreaming).
logSet
- Log set to stop streaming. Non-null.IllegalArgumentException
- If channelIds is null.public void channelRangeRequest(EtpLogSet logSet, Number startIndex, Number endIndex)
This method is defined by the ETP protocol 1 (ChannelStreaming).
The specified log set will be updated, possibly in many stages. The client program pick up the updates through the log set listener.
logSet
- Log set to update. Non-null.startIndex
- First value along index axis to include. User space. Non-null.endIndex
- End value along index axis to include. User space. Non-null.IllegalArgumentException
- If any of the arguments are null.public EtpLogSet requestChannelData(EtpResource resource, Long fromIndex, Long toIndex) throws EtpException
This method is defined by the ETP protocol 2 (ChannelDataFrame).
resource
- The log resource to get get data for. Non-null.fromIndex
- From index.toIndex
- To index.IllegalArgumentException
- If resource is null.EtpException
- If the operation fails for some reason.public List<EtpResource> getResources(String parentUri) throws EtpException
parentUri
- Parent URI to get resources from. Null for root.EtpException
public List<EtpResource> getResources(EtpResource parent) throws EtpException
This method is defined by the ETP protocol 3 (Discovery).
parent
- Parent resource. Null if at top level.EtpException
- If the operation fails for some reason.public EtpObject getObject(EtpResource resource) throws EtpException
This method is defined by the ETP protocol 4 (Store).
resource
- Resource to get. Non-null.IllegalArgumentException
- If resource is null.EtpException
- If the operation fails for some reason.public void putObject(EtpObject etpObject) throws EtpException
This method is defined by the ETP protocol 4 (Store).
etpObject
- ETP object to insert or update. Non-null.IllegalArgumentException
- If etpObject is null.EtpException
- If the operation fails for some reason.public void deleteObject(String uri) throws EtpException
This method is defined by the ETP protocol 4 (Store).
uri
- URI of object to delete. Non-null.IllegalArgumentException
- If uri is null.EtpException
- If the operation fails for some reason.public void notificationRequest(String uri, EtpStoreNotificationListener listener)
This method is defined by the ETP protocol 5 (StoreNotification).
uri
- URI of instance to request notifications for,listener
- Associated listener. Non-null.IllegalArgumentException
- If uri or listener is null.public void cancelNotification(String uri)
This method is defined by the ETP protocol 5 (StoreNotification).
uri
- URI of instance to cancel notifications on. Non-null.IllegalArgumentException
- If uri is null.public void growingObjectDelete(String parentUri, String uid)
This method is defined by the ETP protocol 6 (GrowingObject).
parentUri
- URI of the parent object to delete. Non-null.uid
- UID of the object to delete. Non-null.IllegalArgumentException
- If parentUri or uid is null.public void growingObjectDeleteRange(String uri, GrowingObjectIndex startIndex, GrowingObjectIndex endIndex)
This method is defined by the ETP protocol 6 (GrowingObject).
uri
- URI of the parent object to delete. Non-null.startIndex
- Starting index for the delete range. Non-null.endIndex
- Ending index for the delete range. Non-null.IllegalArgumentException
- If any of the arguments are null or indices are out of bounds.public void growingObjectGet(String parentUri, String uid)
This method is defined by the ETP protocol 6 (GrowingObject).
parentUri
- URI of the parent object to get. Non-null.uid
- UID of the object to get. Non-null.IllegalArgumentException
- If uid is null.public void growingObjectGetRange(String parentUri, GrowingObjectIndex startIndex, GrowingObjectIndex endIndex, String indexUnit, String depthDatum)
This method is defined by the ETP protocol 6 (GrowingObject).
parentUri
- URI of the parent object to get. Non-null.startIndex
- Starting index for the delete range. Null to start from top.endIndex
- Ending index for the delete range. Null to end at bottom.indexUnit
- Unit of index channel. Null to use stored unit.depthDatum
- Depth datum. TODO: USE ENUM! CHECK null.IllegalArgumentException
- If parentUri is null.public void growingObjectPut(String parentUri, String contentType, byte[] data)
This method is defined by the ETP protocol 6 (GrowingObject).
parentUri
- URI of the parent object to get. Non-null.contentType
- The content type for the parent object. TODO: CHECK DOMAIN, nulldata
- The data to be added to the growing object. Non-null.IllegalArgumentException
- If and of the arguments are null.public List<List<Object>> getDataArray(String uri) throws EtpException
This method is defined by the ETP protocol 7 (DataArray).
uri
- URI for the data array to get. Non-null.EtpException
- If the operation failes for some reason.public List<List<Object>> getDataArraySlice(String uri, long[] start, long[] count) throws EtpException
This method is defined by the ETP protocol 7 (DataArray).
uri
- URI for the data array to get slice of. Non-null.start
- Start values.count
- Count values.EtpException
- If the operation failes for some reason.public void putDataArray(String uri, List<List<Object>> data)
This method is defined by the ETP protocol 7 (DataArray).
uri
- URI for the data array to put. Non-null.data
- Data array. Non-null.IllegalArgumentException
- If any of the aruments are null.public void putDataArraySlice(String uri, List<List<Object>> data, long[] start)
This method is defined by the ETP protocol 7 (DataArray).
uri
- URI for the data array to put. Non-null.data
- Data array. Non-null.start
- Location of where to put in destination data.IllegalArgumentException
- If any of the aruments are null.public String wmlsGetVersion() throws EtpException
This method is defined by the ETP protocol 8 (WitsmlSoap).
EtpException
- If the operation fails for some reason.public long wmlsGetCap(String version)
public long wmlsGetBaseMsg(int statusCode)
Copyright © 2023 Petroware AS - https://petroware.no