001package org.xbib.elasticsearch.action.cluster.admin.websocket; 002 003import org.elasticsearch.action.support.nodes.NodeOperationResponse; 004import org.elasticsearch.cluster.node.DiscoveryNode; 005import org.elasticsearch.common.io.stream.StreamInput; 006import org.elasticsearch.common.transport.InetSocketTransportAddress; 007 008import java.io.IOException; 009 010public class WebsocketInfo extends NodeOperationResponse { 011 012 private InetSocketTransportAddress address; 013 014 WebsocketInfo() { 015 } 016 017 public WebsocketInfo(DiscoveryNode node, InetSocketTransportAddress address) { 018 super(node); 019 this.address = address; 020 } 021 022 public InetSocketTransportAddress getAddress() { 023 return address; 024 } 025 026 public static WebsocketInfo readInfo(StreamInput in) throws IOException { 027 WebsocketInfo info = new WebsocketInfo(); 028 info.readFrom(in); 029 return info; 030 } 031 032 @Override 033 public void readFrom(StreamInput in) throws IOException { 034 super.readFrom(in); 035 address = InetSocketTransportAddress.readInetSocketTransportAddress(in); 036 } 037 038}