com.cosylab.epics.caj.impl.handlers.ChannelDisconnectedResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of caj Show documentation
Show all versions of caj Show documentation
100% pure Java implementation of the EPICS Channel Access library.
/*
* Copyright (c) 2004 by Cosylab
*
* The full license specifying the redistribution, modification, usage and other
* rights and obligations is included with the distribution of this project in
* the file "LICENSE-CAJ". If the license is not included visit Cosylab web site,
* .
*
* THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
* IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
* _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
* OR REDISTRIBUTION OF THIS SOFTWARE.
*/
package com.cosylab.epics.caj.impl.handlers;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import com.cosylab.epics.caj.CAJChannel;
import com.cosylab.epics.caj.CAJContext;
import com.cosylab.epics.caj.impl.Transport;
/**
* CA channel disconnected response.
* @author Matej Sekoranja
* @version $id$
*/
public class ChannelDisconnectedResponse extends AbstractCAJResponseHandler {
/**
* @param context
*/
public ChannelDisconnectedResponse(CAJContext context) {
super(context, "Channel disconnected");
}
/**
* @see com.cosylab.epics.caj.impl.handlers.AbstractCAJResponseHandler#internalHandleResponse(java.net.InetSocketAddress, com.cosylab.epics.caj.impl.Transport, java.nio.ByteBuffer[])
*/
protected void internalHandleResponse(
InetSocketAddress responseFrom,
Transport transport,
ByteBuffer[] response) {
CAJChannel channel = context.getChannel(parameter1);
if (channel != null)
channel.disconnect(true);
}
}