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 $
-
_attributeSetFromPeerToMe
-
-
WITH_CERTIFICATE_AND_STATEMENT
- If this variable is set to false,
no Certificate- or StatementMan operations
will be done.
-
BasicServices()
- Creates a BasicServices ComPoint
-
BasicServices(int, BasicServicesAddress)
- Creates a BasicServices ComPoint
-
BasicServices(int, ComPoint, BasicServicesAddress)
- Creates a BasicServices ComPoint, based on a Communication
Block CommPoint and a secAddress.
-
accept()
- For responder SecComPoints, accept an
incoming connection.
-
close()
- Closes the Secure ComPoint
-
comPoint(int, ComPointAddress)
-
-
getAddress()
-
-
getComSocket()
-
-
getLocalAddress()
-
-
getMyCertificateContext()
-
-
getPeerCertificateContext()
-
-
getProtocol()
-
-
getRemoteAddress()
-
-
getSecAttributesFromMeToPeer()
- Get the security attributes that are applied to data that is sent
from us to the peer.
-
getSecAttributesFromPeerToMe()
- Get the security attributes that are applied to data that is sent
from the peer to us.
-
getSupportedAttributes()
-
Get all attributes that this service module can handle.
-
getType()
-
-
openInitiatorChannel(String)
- Open an initiator channel.
-
read()
- Reads and processes an object.
-
secComPoint(int, SecComPointAddress)
-
Create a SecComPoint.
-
servicePointThread(SecComPointAddress, long)
- Start a SecChannelServicePointThread to listen for incoming
connection requests.
-
setSecAttributesFromMeToPeer(AttributeSet)
- Set the security attributes that are applied to data that is sent
from us to the peer.
-
setSecAttributesFromPeerToMe(AttributeSet)
- Set the security attributes that are applied to data that is sent
from the peer to us.
-
write(Serializable)
- Writes an object.
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.
_attributeSetFromPeerToMe
public AttributeSet _attributeSetFromPeerToMe
BasicServices
public BasicServices()
- Creates a BasicServices ComPoint
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.
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.
close
public void close() throws SecComPointException
- Closes the Secure ComPoint
- Throws: SecComPointException
- if encountered an error
while closing the SecComPoint
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
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.
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
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.
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
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.
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
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.
getPeerCertificateContext
public CertificateContext getPeerCertificateContext()
- Returns:
- The peers certificates that are used in the
connection. Might be null if there is no conection.
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.
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.
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.
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.
comPoint
public ComPoint comPoint(int type,
ComPointAddress a) throws SecComPointException
getProtocol
public String getProtocol()
getType
public int getType()
getAddress
public ComPointAddress getAddress()
- Returns:
- The address that was used to create this seccompoint.
getLocalAddress
public ComPointAddress getLocalAddress()
- Returns:
- A BasicServicesAddress that contains the
our own address.
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... .
getComSocket
public Object getComSocket()
All Packages Class Hierarchy This Package Previous Next Index