Package org.epics.pvaccess.server
Interface ServerContext
-
- All Known Implementing Classes:
ServerContextImpl
public interface ServerContext
The class representing a PVA Server context.- Version:
- $Id$
- Author:
- Matej Sekoranja
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroy()
Clear all resources attached to this context.void
dispose()
Dispose (destroy) server context.Version
getVersion()
Get context implementation version.void
initialize(ChannelProvider channelProvider)
SetChannelProvider
implementation and initialize server.void
initialize(ChannelProviderRegistry providerRegistry)
SetChannelAccess
implementation and initialize server.void
printInfo()
Prints detailed information about the context to the standard output stream.void
printInfo(PrintStream out)
Prints detailed information about the context to the specified output stream.void
run(int seconds)
Run server (process events).void
setBeaconServerStatusProvider(BeaconServerStatusProvider beaconServerStatusProvider)
Set beacon server status provider.void
shutdown()
Shutdown (stop executing run() method) of this context.
-
-
-
Method Detail
-
getVersion
Version getVersion()
Get context implementation version.- Returns:
- version of the context implementation.
-
initialize
void initialize(ChannelProviderRegistry providerRegistry) throws PVAException, IllegalStateException
SetChannelAccess
implementation and initialize server. ServedChannelProvider
(s) is read from configuration.- Parameters:
providerRegistry
- channel provider registry to use.- Throws:
PVAException
- any other PVA exception.IllegalStateException
- thrown in instance is in illegal state (e.g. destroyed).
-
initialize
void initialize(ChannelProvider channelProvider) throws PVAException, IllegalStateException
SetChannelProvider
implementation and initialize server.- Parameters:
channelProvider
- provider to be served.- Throws:
PVAException
- any other PVA exception.IllegalStateException
- thrown in instance is in illegal state (e.g. destroyed).
-
run
void run(int seconds) throws PVAException, IllegalStateException
Run server (process events).- Parameters:
seconds
- time in seconds the server will process events (method will block), if0
the method would block untildestroy()
is called.- Throws:
IllegalStateException
- if server is already destroyed.PVAException
- any other PVA exception.
-
shutdown
void shutdown() throws PVAException, IllegalStateException
Shutdown (stop executing run() method) of this context. After shutdown Context cannot be rerun again, destroy() has to be called to clear all used resources.- Throws:
PVAException
- any other PVA exception.IllegalStateException
- if the context has been destroyed.
-
destroy
void destroy() throws PVAException, IllegalStateException
Clear all resources attached to this context.- Throws:
PVAException
- any other PVA exception.IllegalStateException
- if the context has been destroyed.
-
printInfo
void printInfo()
Prints detailed information about the context to the standard output stream.
-
printInfo
void printInfo(PrintStream out)
Prints detailed information about the context to the specified output stream.- Parameters:
out
- output stream.
-
dispose
void dispose()
Dispose (destroy) server context. This callsdestroy()
and silently handles all exceptions.
-
setBeaconServerStatusProvider
void setBeaconServerStatusProvider(BeaconServerStatusProvider beaconServerStatusProvider)
Set beacon server status provider.- Parameters:
beaconServerStatusProvider
-BeaconServerStatusProvider
implementation to set.
-
-