public class TcpipNetBIOSHostAnnouncer extends HostAnnouncer
TCP/IP NetBIOS host announcer implementation. Periodically broadcasts a host announcement datagram to inform other Windows networking hosts of the local hosts existence and capabilities.
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
static int |
INTERVAL |
static int |
PORT |
SHUTDOWN_COUNT, SHUTDOWN_WAIT, STARTING_INTERVALMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
TcpipNetBIOSHostAnnouncer()
Default constructor.
|
TcpipNetBIOSHostAnnouncer(String name,
String domain,
int intval,
int port)
Create a host announcer.
|
| Modifier and Type | Method and Description |
|---|---|
InetAddress |
getBindAddress()
Get the local address that the announcer should bind to.
|
int |
getPort()
Return the socket/port number that the announcer is using.
|
boolean |
hasBindAddress()
Check if the announcer should bind to a particular local address, or all
local addresses.
|
protected void |
initialize()
Initialize the host announcer.
|
boolean |
isNetworkEnabled()
Determine if the network connection used for the host announcement is valid
|
protected void |
sendAnnouncement(String hostName,
byte[] buf,
int offset,
int len)
Send an announcement broadcast.
|
void |
setBindAddress(InetAddress addr)
Set the local address to bind to.
|
void |
setBroadcastAddress(String addr)
Set the broadcast address
|
void |
setBroadcastAddress(String addr,
int port)
Set the broadcast address and port
|
void |
setPort(int port)
Set the socket/port number to use.
|
addHostName, addHostNames, getComment, getDomain, getHostName, getInterval, getServerType, hasDebug, initHostAnnounceSMB, numberOfNames, run, setComment, setDebug, setDomain, setInterval, setServerType, shutdownAnnouncer, startAnnounceractiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic static final int PORT
public static final int INTERVAL
public TcpipNetBIOSHostAnnouncer()
public final InetAddress getBindAddress()
public final int getPort()
public final boolean hasBindAddress()
public final void setBroadcastAddress(String addr) throws UnknownHostException
addr - StringUnknownHostExceptionpublic final void setBroadcastAddress(String addr, int port) throws UnknownHostException
addr - Stringport - intUnknownHostExceptionprotected void initialize()
throws Exception
initialize in class HostAnnouncerExceptionpublic boolean isNetworkEnabled()
isNetworkEnabled in class HostAnnouncerprotected void sendAnnouncement(String hostName, byte[] buf, int offset, int len) throws Exception
sendAnnouncement in class HostAnnouncerhostName - Host name being announcedbuf - Buffer containing the host announcement mailslot message.offset - Offset to the start of the host announcement message.len - Host announcement message length.Exceptionpublic final void setBindAddress(InetAddress addr)
addr - java.net.InetAddresspublic final void setPort(int port)
port - intCopyright © 2005–2020 Alfresco Software. All rights reserved.