All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.seccomm.basic.BasicServices

java.lang.Object
   |
   +----semper.seccomm.basic.BasicServices

public class BasicServices
extends Object
implements SecComPoint
This class defines a basic service module to be used by the SecComManager.

Version:
$Revision: 1.32 $ $Date: 1998/07/14 07:41:24 $

Variable Index

 o _attributeSetFromPeerToMe
 o WITH_CERTIFICATE_AND_STATEMENT
If this variable is set to false, no Certificate- or StatementMan operations will be done.

Constructor Index

 o BasicServices()
Creates a BasicServices ComPoint
 o BasicServices(int, BasicServicesAddress)
Creates a BasicServices ComPoint
 o BasicServices(int, ComPoint, BasicServicesAddress)
Creates a BasicServices ComPoint, based on a Communication Block CommPoint and a secAddress.

Method Index

 o accept()
For responder SecComPoints, accept an incoming connection.
 o close()
Closes the Secure ComPoint
 o comPoint(int, ComPointAddress)
 o getAddress()
 o getComSocket()
 o getLocalAddress()
 o getMyCertificateContext()
 o getPeerCertificateContext()
 o getProtocol()
 o getRemoteAddress()
 o getSecAttributesFromMeToPeer()
Get the security attributes that are applied to data that is sent from us to the peer.
 o getSecAttributesFromPeerToMe()
Get the security attributes that are applied to data that is sent from the peer to us.
 o getSupportedAttributes()
Get all attributes that this service module can handle.
 o getType()
 o openInitiatorChannel(String)
Open an initiator channel.
 o read()
Reads and processes an object.
 o secComPoint(int, SecComPointAddress)
Create a SecComPoint.
 o servicePointThread(SecComPointAddress, long)
Start a SecChannelServicePointThread to listen for incoming connection requests.
 o setSecAttributesFromMeToPeer(AttributeSet)
Set the security attributes that are applied to data that is sent from us to the peer.
 o setSecAttributesFromPeerToMe(AttributeSet)
Set the security attributes that are applied to data that is sent from the peer to us.
 o write(Serializable)
Writes an object.

Variables

 o WITH_CERTIFICATE_AND_STATEMENT
 public static boolean WITH_CERTIFICATE_AND_STATEMENT
If this variable is set to false, no Certificate- or StatementMan operations will be done. Useful if you have no certificates or an unstable version of these blocks. Default-value is true.

 o _attributeSetFromPeerToMe
 public AttributeSet _attributeSetFromPeerToMe

Constructors

 o BasicServices
 public BasicServices()
Creates a BasicServices ComPoint

 o BasicServices
 public BasicServices(int type,
                      ComPoint c,
                      BasicServicesAddress secAddress) throws SecComPointException
Creates a BasicServices ComPoint, based on a Communication Block CommPoint and a secAddress. This method only opens a statement session, based on the type of the ComPoint.

Parameters:
c - An already opened ComPoint.
secAddress - A BasicServicesAddress, containing security attributes.
Throws: SecComPointException
Possible due to several sources: Comm-errors, StatementMan-errors etc.
 o BasicServices
 public BasicServices(int type,
                      BasicServicesAddress secaddress) throws SecComPointException
Creates a BasicServices ComPoint

Parameters:
type - The type of ComPoint to create. Valid values are SECCOMPOINT_INITIATOR, SECCOMPOINT_CHANNELINITIATOR, SECCOMPOINT_RESPONDER, SECCOMPOINT_SERVER.
secaddress - A BasicServicesAddress
Throws: SecComPointException
Possible due to several sources: Comm-errors, StatementMan-errors etc.

Methods

 o close
 public void close() throws SecComPointException
Closes the Secure ComPoint

Throws: SecComPointException
if encountered an error while closing the SecComPoint
 o accept
 public ComPoint accept() throws SecComPointException
For responder SecComPoints, accept an incoming connection.

Returns:
A secComPoint on which to perform further actions.
Throws: SecComPointException
if encountered an error while accepting an incoming connection
 o read
 public synchronized Serializable read() throws SecComPointException
Reads and processes an object. If necessary, the object is deciphered and the MAC is checked. If deciphering or verifying the MAC fails, an SecComPointException is thrown.

Returns:
The read and processed object.
Throws: SecComPointException
if encountered an error while internalizing the object.
 o write
 public synchronized void write(Serializable message) throws SecComPointException
Writes an object. According to the set security attributes, a MAC is attached to the object and it's enciphered. When something fails in this process (e.g. the StatementMan has difficulties), a SecComPointException is thrown.

Throws: SecComPointException
if encountered an error while externalizing the object
 o getSecAttributesFromPeerToMe
 public AttributeSet getSecAttributesFromPeerToMe()
Get the security attributes that are applied to data that is sent from the peer to us.

Returns:
A vector with the set security attributes.
 o setSecAttributesFromPeerToMe
 public void setSecAttributesFromPeerToMe(AttributeSet secAttributes)
Set the security attributes that are applied to data that is sent from the peer to us.

Parameters:
A - vector with attributes that are to be applied
 o getSecAttributesFromMeToPeer
 public AttributeSet getSecAttributesFromMeToPeer()
Get the security attributes that are applied to data that is sent from us to the peer.

Returns:
A vector with the set security attributes.
 o setSecAttributesFromMeToPeer
 public void setSecAttributesFromMeToPeer(AttributeSet secAttributes)
Set the security attributes that are applied to data that is sent from us to the peer.

Parameters:
A - vector with attributes that are to be applied
 o getMyCertificateContext
 public CertificateContext getMyCertificateContext()
Returns:
A clone of my own certificates that are used in the connection. Might be null if there is no connection.
 o getPeerCertificateContext
 public CertificateContext getPeerCertificateContext()
Returns:
The peers certificates that are used in the connection. Might be null if there is no conection.
 o getSupportedAttributes
 public static AttributeSet getSupportedAttributes()
Get all attributes that this service module can handle.

Returns:
A AttributeSet with all supported security attributes. The BasicServices module supports confidentiality and integrity.
 o openInitiatorChannel
 public void openInitiatorChannel(String correlator) throws SecComPointException
Open an initiator channel.

Parameters:
correlator - The channel correlator
Throws: SecComPointException
Possible due to several sources: Comm-errors, StatementMan-errors etc.
 o servicePointThread
 public SecChannelServicePointThread servicePointThread(SecComPointAddress secAddress,
                                                        long timeOut) throws SecComPointException
Start a SecChannelServicePointThread to listen for incoming connection requests.

Parameters:
secAddress - The address to which to listen.
timeOut - The time in millisecs after that not responded incoming initiator requests are discarded.
Returns:
A SecChannelServicePointThread
Throws: SecComPointException
When the servicePointThread could not be started.
 o secComPoint
 public SecComPoint secComPoint(int type,
                                SecComPointAddress address) throws SecComPointException
Create a SecComPoint. This method is called by the SecComManager to create a BasicServices SecComPoint with the parameters type and address.

Parameters:
type - The type of the SecComPoint (SECCOMPOINT_INITIATOR, SECCOMPOINT_CHANNELINITIATOR, SECCOMPOINT_RESPONDER, SECCOMPOINT_SERVER.)
address - The address to which to open the SecComPoint to.
Returns:
An open SecComPoint
Throws: SecComPointException
Possible due to several sources: Comm-errors, StatementMan-errors etc.
 o comPoint
 public ComPoint comPoint(int type,
                          ComPointAddress a) throws SecComPointException
 o getProtocol
 public String getProtocol()
 o getType
 public int getType()
 o getAddress
 public ComPointAddress getAddress()
Returns:
The address that was used to create this seccompoint.
 o getLocalAddress
 public ComPointAddress getLocalAddress()
Returns:
A BasicServicesAddress that contains the our own address.
 o getRemoteAddress
 public ComPointAddress getRemoteAddress()
Returns:
A BasicServicesAddress that contains the address of the peer in a form that is suitable to build a return address from. TODO: The situationDescription fixes myName and the name of the peer. It is unclear how this can be build into a return address... .
 o getComSocket
 public Object getComSocket()

All Packages  Class Hierarchy  This Package  Previous  Next  Index