Class ServerChannelImpl
- java.lang.Object
-
- org.epics.pvaccess.server.impl.remote.ServerChannelImpl
-
- All Implemented Interfaces:
ServerChannel
public class ServerChannelImpl extends Object implements ServerChannel
Server channel (client connection to local channel). This (default) implementation grants all access rights.- Version:
- $Id$
- Author:
- Matej Sekoranja
-
-
Field Summary
Fields Modifier and Type Field Description protected Channel
channel
Local channel.protected SecurityPlugin.ChannelSecuritySession
channelSecuritySession
Channel secutiry session.protected int
cid
Channel CID.protected boolean
destroyed
Destroy state.protected Map<Integer,org.epics.pvdata.misc.Destroyable>
requests
Requests.protected int
sid
Channel SID.
-
Constructor Summary
Constructors Constructor Description ServerChannelImpl(Channel channel, int cid, int sid, SecurityPlugin.ChannelSecuritySession css)
Create server channel for given process variable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Destroy server channel.protected void
destroyAllRequests()
Destroy all registered requests.Channel
getChannel()
Get local channel.SecurityPlugin.ChannelSecuritySession
getChannelSecuritySession()
int
getCID()
Get channel CID.org.epics.pvdata.misc.Destroyable
getRequest(int id)
Get request by its ID.org.epics.pvdata.misc.Destroyable[]
getRequests()
int
getSID()
Get channel SID.void
printInfo()
Prints detailed information about the process variable to the standard output stream.void
printInfo(PrintStream out)
Prints detailed information about the process variable to the specified output stream.void
registerRequest(int id, org.epics.pvdata.misc.Destroyable request)
Register requestvoid
unregisterRequest(int id)
Unregister request.
-
-
-
Field Detail
-
channel
protected final Channel channel
Local channel.
-
sid
protected final int sid
Channel SID.
-
cid
protected final int cid
Channel CID.
-
channelSecuritySession
protected final SecurityPlugin.ChannelSecuritySession channelSecuritySession
Channel secutiry session.
-
destroyed
protected boolean destroyed
Destroy state.
-
-
Constructor Detail
-
ServerChannelImpl
public ServerChannelImpl(Channel channel, int cid, int sid, SecurityPlugin.ChannelSecuritySession css)
Create server channel for given process variable.- Parameters:
channel
- local channel.cid
- channel CID.sid
- channel SID.css
- channel security session.
-
-
Method Detail
-
getChannel
public Channel getChannel()
Get local channel.- Specified by:
getChannel
in interfaceServerChannel
- Returns:
- local channel.
-
getCID
public int getCID()
Get channel CID.- Returns:
- channel CID.
-
getSID
public int getSID()
Description copied from interface:ServerChannel
Get channel SID.- Specified by:
getSID
in interfaceServerChannel
- Returns:
- channel SID.
-
getChannelSecuritySession
public SecurityPlugin.ChannelSecuritySession getChannelSecuritySession()
-
registerRequest
public void registerRequest(int id, org.epics.pvdata.misc.Destroyable request)
Register request- Parameters:
id
- request ID.request
- request to be registered.
-
unregisterRequest
public void unregisterRequest(int id)
Unregister request.- Parameters:
id
- request ID.
-
getRequest
public org.epics.pvdata.misc.Destroyable getRequest(int id)
Get request by its ID.- Parameters:
id
- request ID.- Returns:
- request with given ID,
null
if there is no request with such ID.
-
getRequests
public org.epics.pvdata.misc.Destroyable[] getRequests()
- Specified by:
getRequests
in interfaceServerChannel
-
destroyAllRequests
protected void destroyAllRequests()
Destroy all registered requests.
-
destroy
public void destroy()
Description copied from interface:ServerChannel
Destroy server channel. This method MUST BE called if overriden.- Specified by:
destroy
in interfaceServerChannel
-
printInfo
public void printInfo() throws IllegalStateException
Prints detailed information about the process variable to the standard output stream.- Throws:
IllegalStateException
- if the context has been destroyed.
-
printInfo
public void printInfo(PrintStream out)
Prints detailed information about the process variable to the specified output stream.- Parameters:
out
- the output stream.- Throws:
IllegalStateException
- if the context has been destroyed.
-
-