public class IPCommunicationAutoBinding extends IPAutoInterfaceCommons implements CommunicationAutoBinding
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
fixedPath |
protected int |
fixedPort |
protected HashMap |
ipv4Interface2CommunicationBindingContainer |
protected HashMap |
ipv6Interface2CommunicationBindingContainer |
protected boolean |
isDiscoveryAutoBinding |
protected HashMap |
listener2IPv4ToCommunicationBindingContainer |
protected HashMap |
listener2IPv6ToCommunicationBindingContainer |
protected HashMap |
listener2Path |
addressFamilies, comManId, credentialInfo, interfaceNames, interfaces, IPADDRESS_FAMILY_IPV4, IPADDRESS_FAMILY_IPV6, ipv4, ipv6, listenerList, loopbackInterfaces, suppressLoopbackIfPossible, suppressMulticastDisabledInterfaces| Constructor and Description |
|---|
IPCommunicationAutoBinding(java.lang.String comManId,
boolean suppressLoopbackIfPossibleString,
java.lang.String path,
int port,
boolean isDiscoveryAutoBinding,
IPCommunicationBindingFactory communicationBindingFactory) |
IPCommunicationAutoBinding(java.lang.String comManId,
java.lang.String[] interfaceNames,
java.lang.String[] addressFamilies,
boolean suppressLoopbackIfPossible,
boolean suppressMulticastDisabledInterfaces,
java.lang.String fixedPath,
int fixedPort,
boolean isDiscoveryAutoBinding,
IPCommunicationBindingFactory communicationBindingFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAutoBindingListener(AutoBindingAndOutgoingDiscoveryInfoListener bindingListener,
NetworkChangeListener networkListener)
Add a
AutoBindingAndOutgoingDiscoveryInfoListener to the AutoBinding. |
void |
announceAddressesAdded(NetworkInterface iface,
IPAddress[] addedIPv4Addresses,
IPAddress[] addedIPv6Addresses)
Will be called if addresses of a
NetworkInterface are added. |
void |
announceAddressesChanged(NetworkInterface iface,
HashMap changedIPv4Addresses,
HashMap changedIPv6Addresses)
Will be called if addresses of a
NetworkInterface are changed. |
void |
announceAddressesDeleted(NetworkInterface iface,
IPAddress[] deletedIPv4Addresses,
IPAddress[] deletedIPv6Addresses)
Will be called if addresses of a
NetworkInterface are removed. |
void |
announceInterfaceDown(NetworkInterface iface)
Will be called if the status of a
NetworkInterface changed from up to down. |
void |
announceInterfaceNotAvailable(NetworkInterface iface)
Will be called if a
NetworkInterface is not available. |
void |
announceInterfaceUp(NetworkInterface iface)
Will be called if the status of a
NetworkInterface changed from down to up. |
void |
announceNewInterfaceAvailable(java.lang.Object iface)
Will be called if a new NetworkInterface is available.
|
void |
announceSupportsMulticastChanged(NetworkInterface iface)
Will be called if the status of multicast support of a
NetworkInterface changed. |
CommunicationAutoBinding |
duplicate(java.lang.String path)
Creates a duplicate of the
CommunicationAutoBinding. |
ArrayList |
getCommunicationBindings(AutoBindingAndOutgoingDiscoveryInfoListener listener)
If it's first call new
CommunicationBindings for AutoBindingAndOutgoingDiscoveryInfoListener will created and an Iterator will be
returned. |
int |
getCommunicationBindingsCount(AutoBindingAndOutgoingDiscoveryInfoListener listener)
Returns count of
CommunicationBindings. |
java.lang.String |
getFixedPath()
Returns the fixed path.
|
java.lang.Integer |
getKey()
Returns the unique key of a
AutoBinding. |
java.lang.String |
getPath(AutoBindingAndOutgoingDiscoveryInfoListener listener)
Returns the path for given
AutoBindingAndOutgoingDiscoveryInfoListener. |
int |
getPort() |
boolean |
isDiscoveryAutoBinding() |
void |
readFromMemento(Memento m) |
void |
removeAutoBindingListener(AutoBindingAndOutgoingDiscoveryInfoListener bindingListener,
NetworkChangeListener networkListener)
Remove
AutoBindingAndOutgoingDiscoveryInfoListener from the AutoBinding. |
void |
saveToMemento(Memento m) |
void |
setFixedPath(java.lang.String path)
Sets the fixed path if no
CommunicationBindings are created before. |
void |
setPort(int port) |
java.lang.String |
toString() |
addInterface, equals, getAddressFamilies, getAllInterfaces, getCommunicationManagerId, getCredentialInfo, getInterfaceNames, getInterfaces, getLoopbackInterfaces, hashCode, initAutoBinding, interfaceNamesContainsIfaceName, isIpv4, isIpv6, isSuppressLoopbackIfPossible, isSuppressMulticastDisabledInterfaces, setCredentialInfo, startUpdates, stopUpdatesclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCommunicationManagerId, getCredentialInfo, setCredentialInfoprotected java.lang.String fixedPath
protected HashMap listener2Path
protected int fixedPort
protected boolean isDiscoveryAutoBinding
protected HashMap listener2IPv4ToCommunicationBindingContainer
protected HashMap listener2IPv6ToCommunicationBindingContainer
protected HashMap ipv4Interface2CommunicationBindingContainer
protected HashMap ipv6Interface2CommunicationBindingContainer
public IPCommunicationAutoBinding(java.lang.String comManId,
boolean suppressLoopbackIfPossibleString,
java.lang.String path,
int port,
boolean isDiscoveryAutoBinding,
IPCommunicationBindingFactory communicationBindingFactory)
public IPCommunicationAutoBinding(java.lang.String comManId,
java.lang.String[] interfaceNames,
java.lang.String[] addressFamilies,
boolean suppressLoopbackIfPossible,
boolean suppressMulticastDisabledInterfaces,
java.lang.String fixedPath,
int fixedPort,
boolean isDiscoveryAutoBinding,
IPCommunicationBindingFactory communicationBindingFactory)
public java.lang.String getPath(AutoBindingAndOutgoingDiscoveryInfoListener listener)
CommunicationAutoBindingAutoBindingAndOutgoingDiscoveryInfoListener. If fixed path
is set this path is returned, else the special path just for this listener will returned.getPath in interface CommunicationAutoBindingpublic java.lang.String getFixedPath()
CommunicationAutoBindingCommunicationBindings.getFixedPath in interface CommunicationAutoBindingpublic void setFixedPath(java.lang.String path)
CommunicationAutoBindingCommunicationBindings are created before. After creating
CommunicationBindings its not possible to change fixed path.setFixedPath in interface CommunicationAutoBindingpublic int getPort()
public void setPort(int port)
public boolean isDiscoveryAutoBinding()
public java.lang.Integer getKey()
AutoBindingAutoBinding.getKey in interface AutoBindingpublic void addAutoBindingListener(AutoBindingAndOutgoingDiscoveryInfoListener bindingListener, NetworkChangeListener networkListener)
AutoBindingAutoBindingAndOutgoingDiscoveryInfoListener to the AutoBinding. This
listener will be announced if changes for bindings are performed.addAutoBindingListener in interface AutoBindingpublic void removeAutoBindingListener(AutoBindingAndOutgoingDiscoveryInfoListener bindingListener, NetworkChangeListener networkListener)
AutoBindingAutoBindingAndOutgoingDiscoveryInfoListener from the AutoBinding.removeAutoBindingListener in interface AutoBindingpublic ArrayList getCommunicationBindings(AutoBindingAndOutgoingDiscoveryInfoListener listener)
CommunicationAutoBindingCommunicationBindings for AutoBindingAndOutgoingDiscoveryInfoListener will created and an Iterator will be
returned. After first call the CommunicationAutoBinding is fixed. Other calls then
first call will just return Iterator.getCommunicationBindings in interface CommunicationAutoBindingIteratorpublic int getCommunicationBindingsCount(AutoBindingAndOutgoingDiscoveryInfoListener listener)
CommunicationAutoBindingCommunicationBindings.getCommunicationBindingsCount in interface CommunicationAutoBindingCommunicationBindingspublic CommunicationAutoBinding duplicate(java.lang.String path)
CommunicationAutoBindingCommunicationAutoBinding.duplicate in interface CommunicationAutoBindingCommunicationAutoBindingpublic void announceNewInterfaceAvailable(java.lang.Object iface)
NetworkChangeListenerannounceNewInterfaceAvailable in interface NetworkChangeListenerpublic void announceInterfaceNotAvailable(NetworkInterface iface)
NetworkInterfaceChangeListenerNetworkInterface is not available.announceInterfaceNotAvailable in interface NetworkInterfaceChangeListenerpublic void announceInterfaceUp(NetworkInterface iface)
NetworkInterfaceChangeListenerNetworkInterface changed from down to up.announceInterfaceUp in interface NetworkInterfaceChangeListenerpublic void announceInterfaceDown(NetworkInterface iface)
NetworkInterfaceChangeListenerNetworkInterface changed from up to down.announceInterfaceDown in interface NetworkInterfaceChangeListenerpublic void announceAddressesDeleted(NetworkInterface iface, IPAddress[] deletedIPv4Addresses, IPAddress[] deletedIPv6Addresses)
NetworkInterfaceChangeListenerNetworkInterface are removed.announceAddressesDeleted in interface NetworkInterfaceChangeListenerpublic void announceAddressesAdded(NetworkInterface iface, IPAddress[] addedIPv4Addresses, IPAddress[] addedIPv6Addresses)
NetworkInterfaceChangeListenerNetworkInterface are added.announceAddressesAdded in interface NetworkInterfaceChangeListenerpublic void announceAddressesChanged(NetworkInterface iface, HashMap changedIPv4Addresses, HashMap changedIPv6Addresses)
NetworkInterfaceChangeListenerNetworkInterface are changed.announceAddressesChanged in interface NetworkInterfaceChangeListenerpublic void announceSupportsMulticastChanged(NetworkInterface iface)
NetworkInterfaceChangeListenerNetworkInterface changed.announceSupportsMulticastChanged in interface NetworkInterfaceChangeListenerpublic void saveToMemento(Memento m)
saveToMemento in interface MementoSupportsaveToMemento in class IPAutoInterfaceCommonspublic void readFromMemento(Memento m) throws java.io.IOException
readFromMemento in interface MementoSupportreadFromMemento in class IPAutoInterfaceCommonsjava.io.IOExceptionpublic java.lang.String toString()
toString in class IPAutoInterfaceCommons