public final class StoreSessionImpl extends ExportedSessionImpl implements StoreSession, NoticeListener
Session.ConnectionMode
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the session.
|
void |
commit()
Commits the pending notices.
|
StoreValues |
deliver(int limit,
long timeout)
Delivers point value events.
|
protected void |
finalize() |
PointBinding[] |
getPointBindings(PointBinding.Request[] bindingRequests)
Gets point binding informations on selected points.
|
State.Group[] |
getStateGroups()
Gets the state groups.
|
protected Optional<String> |
getUser()
Gets the user.
|
void |
impersonate(String user)
Impersonates an other user.
|
void |
interrupt()
Interrupts the current delivery.
|
boolean |
interrupted()
Asks if this session has been interrupted.
|
void |
notify(PointValue pointValue)
Notifies of a new Point value.
|
boolean |
probe()
Probes the state of a session.
|
StoreValues |
pull(StoreValuesQuery query,
long timeout)
Pulls points values.
|
int |
purge(UUID[] pointUUIDs,
TimeInterval timeInterval)
Purges point values.
|
State |
resolve(State state,
UUID pointUUID)
Resolves a state for a point.
|
StoreValues[] |
select(StoreValuesQuery[] queries)
Selects point values.
|
protected void |
setUser(Optional<String> user)
Sets the user.
|
boolean |
sleep(long millis)
Sleeps for the specified number of milliseconds.
|
StoreValues[] |
subscribe(UUID[] pointUUIDs)
Subscribes to point values events.
|
String |
supportedValueTypeCodes()
Returns a string of supported value type codes.
|
boolean |
supportsCount()
Asks if the server supports count.
|
boolean |
supportsDelete()
Asks if the server supports delete.
|
boolean |
supportsDeliver()
Asks if the server supports deliver.
|
boolean |
supportsPull()
Asks if the server supports pull.
|
boolean |
supportsPurge()
Asks if the server supports purge.
|
boolean |
supportsSubscribe()
Asks if the server supports subscribe.
|
Exception[] |
unsubscribe(UUID[] pointUUIDs)
Unsubscribes from point values events.
|
Exception[] |
update(PointValue[] updates)
Updates point values.
|
void |
wakeUp()
Wakes up.
|
equals, hashCode, open
getClientName, getConnectionMode, getIdentity, getSessionFactory, getThisLogger, isClosed, login, logout, open, securityCheck, setLogID, toString, unreferenced
getConnectionMode, login, logout
public void close()
close
in class ExportedSessionImpl
public void commit() throws InterruptedException
commit
in interface NoticeListener
InterruptedException
- When the Service is stopped.public StoreValues deliver(int limit, long timeout) throws SessionException
deliver
in interface StoreSession
limit
- A limit for the number of values.timeout
- A time limit in millis to wait for the first message
(negative for infinite).SessionException
- From session security check.Store.deliver(int, long)
public PointBinding[] getPointBindings(PointBinding.Request[] bindingRequests) throws SessionException
getPointBindings
in interface StoreSession
bindingRequests
- Selection specifications.SessionException
- From session security check.public State.Group[] getStateGroups() throws SessionException
getStateGroups
in interface StoreSession
SessionException
- From session security check.public void impersonate(String user) throws SessionException
impersonate
in interface StoreSession
user
- The other user (empty for anonymous, null to cancel).SessionException
- From session security check.public void interrupt()
interrupt
in interface StoreSession
public boolean interrupted()
public void notify(PointValue pointValue) throws InterruptedException
notify
in interface NoticeListener
pointValue
- The Point value.InterruptedException
- When the Service is stopped.public boolean probe() throws RemoteException, SessionException
probe
in interface StoreSession
RemoteException
- From RMI RunTime.SessionException
- On session problems.public StoreValues pull(StoreValuesQuery query, long timeout) throws ServiceNotAvailableException
pull
in interface StoreSession
query
- The store query.timeout
- A time limit in millis to wait for the first value
(negative for infinite).ServiceNotAvailableException
- When the service is not available.Store.pull(StoreValuesQuery, long)
public int purge(UUID[] pointUUIDs, TimeInterval timeInterval) throws SessionException
purge
in interface StoreSession
pointUUIDs
- The UUID of the points to purge.timeInterval
- A time interval.SessionException
- From session security check.Store.purge(UUID[], TimeInterval)
public State resolve(State state, UUID pointUUID) throws SessionException
resolve
in interface StoreSession
state
- The state.pointUUID
- The optional point UUID.SessionException
- From session security check.public StoreValues[] select(StoreValuesQuery[] queries) throws SessionException
select
in interface StoreSession
queries
- An array of store queries.SessionException
- On session exception.public boolean sleep(long millis)
millis
- The number of milliseconds.public StoreValues[] subscribe(UUID[] pointUUIDs) throws SessionException
subscribe
in interface StoreSession
pointUUIDs
- The point UUIDs.SessionException
- From session security check.public String supportedValueTypeCodes() throws ServiceNotAvailableException
supportedValueTypeCodes
in interface StoreSession
ServiceNotAvailableException
- When the service is not available.public boolean supportsCount() throws SessionException
supportsCount
in interface StoreSession
SessionException
- From session security check.public boolean supportsDelete() throws SessionException
supportsDelete
in interface StoreSession
SessionException
- From session security check.public boolean supportsDeliver() throws SessionException
supportsDeliver
in interface StoreSession
SessionException
- From session security check.public boolean supportsPull() throws SessionException
supportsPull
in interface StoreSession
SessionException
- From session security check.public boolean supportsPurge() throws RemoteException, SessionException
supportsPurge
in interface StoreSession
RemoteException
- From RMI RunTime.SessionException
- From session security check.public boolean supportsSubscribe() throws SessionException
supportsSubscribe
in interface StoreSession
SessionException
- From session security check.public Exception[] unsubscribe(UUID[] pointUUIDs) throws SessionException
unsubscribe
in interface StoreSession
pointUUIDs
- The point UUIDs.SessionException
- From session security check.public Exception[] update(PointValue[] updates) throws ServiceNotAvailableException
update
in interface StoreSession
updates
- The point values.ServiceNotAvailableException
- When the service is not available.public void wakeUp()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
protected Optional<String> getUser()
getUser
in class SessionImpl
protected void setUser(Optional<String> user)
setUser
in class SessionImpl
user
- The optional user identifier.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.