Package org.epics.pvaccess.server
Interface ServerContext
-
- All Known Implementing Classes:
ServerContextImpl
public interface ServerContextThe class representing a PVA Server context.- Version:
- $Id$
- Author:
- Matej Sekoranja
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddestroy()Clear all resources attached to this context.voiddispose()Dispose (destroy) server context.VersiongetVersion()Get context implementation version.voidinitialize(ChannelProvider channelProvider)SetChannelProviderimplementation and initialize server.voidinitialize(ChannelProviderRegistry providerRegistry)SetChannelAccessimplementation and initialize server.voidprintInfo()Prints detailed information about the context to the standard output stream.voidprintInfo(PrintStream out)Prints detailed information about the context to the specified output stream.voidrun(int seconds)Run server (process events).voidsetBeaconServerStatusProvider(BeaconServerStatusProvider beaconServerStatusProvider)Set beacon server status provider.voidshutdown()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
SetChannelAccessimplementation 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
SetChannelProviderimplementation 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), if0the method would block untildestroy()is called.- Throws:
IllegalStateException- if server is already destroyed.PVAException- any other PVA exception.
-
shutdown
void shutdown() throws PVAException, IllegalStateExceptionShutdown (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, IllegalStateExceptionClear 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-BeaconServerStatusProviderimplementation to set.
-
-