Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## madkit.netcomm
Class ProtocolInformationImpl

    java.lang.Object
      madkit.netcomm.ProtocolInformationImpl

All Implemented Interfaces:
  java.io.Serializable, Protocollnformation

    public class ProtocolInformationImpl

extends java.lang.Object
implements Protocollnformation, java.io.Serializable

Version:
  $Revision: 1.1 $
Author:
  Sebastian Rodriguez - sebastian.rodriguez@utbm.fr
See Also:
  Serialized Form

Constructor Summary
`ProtocolInformationImpl()` Creates a ProtcolInformationImpl with all the KnownProtocols
`ProtocolInformationImpl(java.util.Collection protocolsToUse)` Creates a ProtcolInformationImpl with `protos` as the set of acceptable protocols.
`ProtocolInformationImpl(java.lang.String reason)` Creates a ProtcolInformationImpl with refuse set to true.

Method Summary
`java.lang.String` | `getBestProtocol(Protocollnformation info)` Searches for the best protocol to use from the receivers point of view.
`java.util.Collection` | `getExtraParameters()` Returns a Collection of parameters to further configure a the protocols
`java.util.Collection` | `getProtocols()` Gets the known protocols.
`java.lang.String` | `getVersion()` Returns the version of the the Protocol information
`boolean` | `refused()` Is the Connection refused??
`java.lang.String` | `refuseReason()` Reason of the distant Kernel to refuse the connection.
`void` | `setExtraParameters(java.util.Collection ep)` Sets the extra Parameters.
`void` | `setRefuse(boolean r)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ProtocolInformationImpl

    public ProtocolInformationImpl()

  Creates a ProtcolInformationImpl with all the KnownProtocols

### ProtocolInformationImpl

    public ProtocolInformationImpl(java.lang.String reason)

  Creates a ProtcolInformationImpl with refuse set to true.

  Parameters:
    `reason` -

### ProtocolInformationImpl

    public ProtocolInformationImpl(java.util.Collection protocolsToUse)

  Creates a ProtcolInformationImpl with `protos` as the set of acceptable protocols.

  Parameters:
    `protos` -

Method Detail

### getBestProtocol

    public java.lang.String getBestProtocol(Protocollnformation info)

  Description copied from interface: `Protocollnformation`
  Searches for the best protocol to use from the receivers point of view. It must take the first protocol of the local protocols as search it among the protocols in `info`. If found this is the protocol that will be used.

  Specified by:
    `getBestProtocol` in interface `Protocollnformation`
  Parameters:
    `info` - distant kernel known protocols
  Returns:
    the best protocol to use or null if no match is found

### getProtocols

    public java.util.Collection getProtocols()

  Description copied from interface: `Protocollnformation`
  Gets the known protocols.

  Specified by:
    `getProtocols` in interface `Protocollnformation`
  Returns:
    a collection of strings with the protocols name.

### refused

    public boolean refused()

  Description copied from interface: `Protocollnformation`
  Is the Connection refused??

  Specified by:
    `refused` in interface `Protocollnformation`
  Returns:

### setRefuse

    public void setRefuse(boolean r)

### refuseReason

    public java.lang.String refuseReason()

  Description copied from interface: `Protocollnformation`
  Reason of the distant Kernel to refuse the connection.

  Specified by:
    `refuseReason` in interface `Protocollnformation`
  Returns:

### getVersion

    public java.lang.String getVersion()

  Description copied from interface: `Protocollnformation`
  Returns the version of the the Protocol information

  Specified by:
    `getVersion` in interface `Protocollnformation`
  Returns:

### getExtraParameters

    public java.util.Collection getExtraParameters()

  Description copied from interface: `Protocollnformation`
  Returns a Collection of parameters to further configure a the protocols

  Specified by:
    `getExtraParameters` in interface `Protocollnformation`
  Returns:

### setExtraParameters

    public void setExtraParameters(java.util.Collection ep)

  Sets the extra Parameters.

  Parameters:
    `ep` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.