com.opera.core.systems.runner.launcher
Class OperaLauncherProtocol

java.lang.Object
  extended by com.opera.core.systems.runner.launcher.OperaLauncherProtocol

public class OperaLauncherProtocol
extends java.lang.Object

Implements the Opera launcher protocol.

Author:
Jan Vidar Krey

Nested Class Summary
static class OperaLauncherProtocol.MessageType
           
 class OperaLauncherProtocol.ResponseEncapsulation
           
 
Constructor Summary
OperaLauncherProtocol(java.net.Socket socket)
           
 
Method Summary
 OperaLauncherProtocol.ResponseEncapsulation sendRequest(OperaLauncherProtocol.MessageType type, byte[] body)
          Send a request and receive a result.
 void sendRequestWithoutResponse(OperaLauncherProtocol.MessageType type, byte[] body)
          Send a request without a response.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperaLauncherProtocol

public OperaLauncherProtocol(java.net.Socket socket)
                      throws java.net.SocketException
Throws:
java.net.SocketException
Method Detail

shutdown

public void shutdown()
              throws java.io.IOException
Throws:
java.io.IOException

sendRequest

public OperaLauncherProtocol.ResponseEncapsulation sendRequest(OperaLauncherProtocol.MessageType type,
                                                               byte[] body)
                                                        throws java.io.IOException
Send a request and receive a result.

Parameters:
type - the request type to be sent
body - the serialized request payload
Returns:
the response
Throws:
java.io.IOException

sendRequestWithoutResponse

public void sendRequestWithoutResponse(OperaLauncherProtocol.MessageType type,
                                       byte[] body)
                                throws java.io.IOException
Send a request without a response. Used for shutdown.

Parameters:
type - the request type to be sent
body - the serialized request payload
Throws:
java.io.IOException


Copyright © 2011. All Rights Reserved.