Search in sources :

Example 1 with XrootdDoorAdressInfoMessage

use of org.dcache.vehicles.XrootdDoorAdressInfoMessage in project dcache by dCache.

the class XrootdTransferService method sendAddressToDoor.

/**
 * Sends our address to the door. Copied from the old xrootd mover.
 */
@Override
protected void sendAddressToDoor(NettyMover<XrootdProtocolInfo> mover, int port) throws SocketException, CacheException {
    XrootdProtocolInfo protocolInfo = mover.getProtocolInfo();
    InetAddress localIP = NetworkUtils.getLocalAddress(protocolInfo.getSocketAddress().getAddress());
    CellPath cellpath = protocolInfo.getXrootdDoorCellPath();
    XrootdDoorAdressInfoMessage doorMsg = new XrootdDoorAdressInfoMessage(protocolInfo.getXrootdFileHandle(), new InetSocketAddress(localIP, port));
    doorStub.notify(cellpath, doorMsg);
    LOGGER.debug("sending redirect {} to Xrootd-door {}", localIP, cellpath);
}
Also used : CellPath(dmg.cells.nucleus.CellPath) XrootdDoorAdressInfoMessage(org.dcache.vehicles.XrootdDoorAdressInfoMessage) InetSocketAddress(java.net.InetSocketAddress) XrootdProtocolInfo(org.dcache.vehicles.XrootdProtocolInfo) InetAddress(java.net.InetAddress)

Aggregations

CellPath (dmg.cells.nucleus.CellPath)1 InetAddress (java.net.InetAddress)1 InetSocketAddress (java.net.InetSocketAddress)1 XrootdDoorAdressInfoMessage (org.dcache.vehicles.XrootdDoorAdressInfoMessage)1 XrootdProtocolInfo (org.dcache.vehicles.XrootdProtocolInfo)1