Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 jdk.management.agent.jmod - Management Agent Module
JDK 17 jdk.management.agent.jmod is the JMOD file for JDK 17 Management Agent module.
JDK 17 Management Agent module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.management.agent.jmod.
JDK 17 Management Agent module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Management Agent module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.management.agent.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/management/jdp/JdpBroadcaster.java
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.management.jdp;
import java.io.IOException;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.NetworkInterface;
import java.net.ProtocolFamily;
import java.net.StandardProtocolFamily;
import java.net.StandardSocketOptions;
import java.nio.ByteBuffer;
import java.nio.channels.DatagramChannel;
import java.nio.channels.UnsupportedAddressTypeException;
import java.util.Enumeration;
/**
* JdpBroadcaster is responsible for sending pre-built JDP packet across a Net
*
* <p> Multicast group address, port number and ttl have to be chosen on upper
* level and passed to broadcaster constructor. Also it's possible to specify
* source address to broadcast from. </p>
*
* <p>JdpBradcaster doesn't perform any validation on a supplied {@code port} and {@code ttl} because
* the allowed values depend on an operating system setup</p>
*
*/
public final class JdpBroadcaster {
private final InetAddress addr;
private final int port;
private final DatagramChannel channel;
/**
* Create a new broadcaster
*
* @param address - multicast group address
* @param srcAddress - address of interface we should use to broadcast.
* @param port - udp port to use
* @param ttl - packet ttl
* @throws IOException
*/
public JdpBroadcaster(InetAddress address, InetAddress srcAddress, int port, int ttl)
throws IOException, JdpException {
this.addr = address;
this.port = port;
ProtocolFamily family = (address instanceof Inet6Address)
? StandardProtocolFamily.INET6 : StandardProtocolFamily.INET;
channel = DatagramChannel.open(family);
channel.setOption(StandardSocketOptions.SO_REUSEADDR, true);
channel.setOption(StandardSocketOptions.IP_MULTICAST_TTL, ttl);
// with srcAddress equal to null, this constructor do exactly the same as
// if srcAddress is not passed
if (srcAddress != null) {
// User requests particular interface to bind to
NetworkInterface interf = NetworkInterface.getByInetAddress(srcAddress);
if (interf == null) {
throw new JdpException("Unable to get network interface for " + srcAddress.toString());
}
if (!interf.isUp()) {
throw new JdpException(interf.getName() + " is not up.");
}
if (!interf.supportsMulticast()) {
throw new JdpException(interf.getName() + " does not support multicast.");
}
try {
channel.bind(new InetSocketAddress(srcAddress, 0));
} catch (UnsupportedAddressTypeException ex) {
throw new JdpException("Unable to bind to source address");
}
channel.setOption(StandardSocketOptions.IP_MULTICAST_IF, interf);
}
}
/**
* Create a new broadcaster
*
* @param address - multicast group address
* @param port - udp port to use
* @param ttl - packet ttl
* @throws IOException
*/
public JdpBroadcaster(InetAddress address, int port, int ttl)
throws IOException, JdpException {
this(address, null, port, ttl);
}
/**
* Broadcast pre-built packet
*
* @param packet - instance of JdpPacket
* @throws IOException
*/
public void sendPacket(JdpPacket packet)
throws IOException {
byte[] data = packet.getPacketData();
// Unlike allocate/put wrap don't need a flip afterward
ByteBuffer b = ByteBuffer.wrap(data);
channel.send(b, new InetSocketAddress(addr, port));
}
/**
* Shutdown broadcaster and close underlying socket channel
*
* @throws IOException
*/
public void shutdown() throws IOException {
channel.close();
}
}
⏎ sun/management/jdp/JdpBroadcaster.java
Or download all of them as a single archive file:
File name: jdk.management.agent-17.0.5-src.zip File size: 41948 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.management.jfr.jmod - Management JFR Module
2023-07-29, ∼5460🔥, 0💬
Popular Posts:
JDK 11 jdk.crypto.mscapi.jmod is the JMOD file for JDK 11 Crypto MSCAPI module. JDK 11 Crypto MSCAPI...
JDK 17 jdk.javadoc.jmod is the JMOD file for JDK 17 Java Document tool, which can be invoked by the ...
JDK 17 java.naming.jmod is the JMOD file for JDK 17 Naming module. JDK 17 Naming module compiled cla...
JDK 17 jdk.xml.dom.jmod is the JMOD file for JDK 17 XML DOM module. JDK 17 XML DOM module compiled c...
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.5.0-src.zip...