|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.mac.MacHandler
MacHandler. Responsible for checking message authenticity and
initializing 'first contact' with another OceanStore instance. The result
being
(1) a MAC relationship established between both parties,
(2) a GUID exchange, and
(3) the source of your machine's GUID.
Additional details are implementation specific.
Note:There is to be only one MacHandler per instance of sandstorm.
Nested Class Summary | |
---|---|
class |
MacHandler.GuidNotEstablished
Thrown when a request for action (such as authenticate(ostore.util.QuickSerializable, ostore.util.QSByteArray, ostore.util.SecureHash) or
is called on a guid that doesn't have an
established connection yet. |
class |
MacHandler.HandshakeFailed
Announcement that after multiple retries, we were still unable to successfully establish a connection with the guid. |
class |
MacHandler.KeyEstablished
Announcement that we have established a connection with the guid and are ready to call authenticate(ostore.util.QuickSerializable, ostore.util.QSByteArray, ostore.util.SecureHash)
on that guid. |
Field Summary | |
---|---|
static boolean |
DEBUG
|
Constructor Summary | |
---|---|
MacHandler()
|
Method Summary | |
---|---|
abstract boolean |
authenticate(QuickSerializable user_data,
QSByteArray mac,
SecureHash guid)
|
abstract void |
destroy()
|
abstract void |
establish(SecureHash guid)
Establish a connection between the guid and this instance of sandstorm Once a connection is established, the MacHandler will broadcast a MacHandler.KeyEstablished announcement. |
abstract void |
handle_dh_message(DHMessage dhmsg)
Need these to happen before processing subsequent messages, so we call it from the Router directly now. |
abstract void |
handleEvent(QueueElementIF item)
|
void |
handleEvents(QueueElementIF[] item)
|
abstract String |
idString()
Id String |
abstract void |
init(ConfigDataIF config)
|
abstract SecureHash |
myGuid()
My GUID |
abstract int |
profileSize()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean DEBUG
Constructor Detail |
public MacHandler()
Method Detail |
public abstract void handleEvent(QueueElementIF item) throws EventHandlerException
handleEvent
in interface EventHandlerIF
EventHandlerException
public void handleEvents(QueueElementIF[] item) throws EventHandlerException
handleEvents
in interface EventHandlerIF
EventHandlerException
public abstract void handle_dh_message(DHMessage dhmsg)
public abstract String idString()
public abstract SecureHash myGuid()
public abstract void establish(SecureHash guid)
MacHandler.KeyEstablished
announcement. If a connection is pending
this will be ignored. If a connection to this guid is already
established, a MacHandler.KeyEstablished
will be broadcasted.
public abstract boolean authenticate(QuickSerializable user_data, QSByteArray mac, SecureHash guid) throws MacHandler.GuidNotEstablished
true
iff this message is authentic, i.e.
verified by the internal MAC
MacHandler.GuidNotEstablished
public abstract void init(ConfigDataIF config) throws Exception
init
in interface EventHandlerIF
Exception
public abstract void destroy() throws Exception
destroy
in interface EventHandlerIF
Exception
public abstract int profileSize()
profileSize
in interface ProfilableIF
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |