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 ChannelchannelLocal channel.protected SecurityPlugin.ChannelSecuritySessionchannelSecuritySessionChannel secutiry session.protected intcidChannel CID.protected booleandestroyedDestroy state.protected Map<Integer,org.epics.pvdata.misc.Destroyable>requestsRequests.protected intsidChannel 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 voiddestroy()Destroy server channel.protected voiddestroyAllRequests()Destroy all registered requests.ChannelgetChannel()Get local channel.SecurityPlugin.ChannelSecuritySessiongetChannelSecuritySession()intgetCID()Get channel CID.org.epics.pvdata.misc.DestroyablegetRequest(int id)Get request by its ID.org.epics.pvdata.misc.Destroyable[]getRequests()intgetSID()Get channel SID.voidprintInfo()Prints detailed information about the process variable to the standard output stream.voidprintInfo(PrintStream out)Prints detailed information about the process variable to the specified output stream.voidregisterRequest(int id, org.epics.pvdata.misc.Destroyable request)Register requestvoidunregisterRequest(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:
getChannelin interfaceServerChannel- Returns:
- local channel.
-
getCID
public int getCID()
Get channel CID.- Returns:
- channel CID.
-
getSID
public int getSID()
Description copied from interface:ServerChannelGet channel SID.- Specified by:
getSIDin 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,
nullif there is no request with such ID.
-
getRequests
public org.epics.pvdata.misc.Destroyable[] getRequests()
- Specified by:
getRequestsin interfaceServerChannel
-
destroyAllRequests
protected void destroyAllRequests()
Destroy all registered requests.
-
destroy
public void destroy()
Description copied from interface:ServerChannelDestroy server channel. This method MUST BE called if overriden.- Specified by:
destroyin interfaceServerChannel
-
printInfo
public void printInfo() throws IllegalStateExceptionPrints 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.
-
-