當前位置: 首頁>>代碼示例>>Java>>正文


Java TException.printStackTrace方法代碼示例

本文整理匯總了Java中org.apache.thrift.TException.printStackTrace方法的典型用法代碼示例。如果您正苦於以下問題:Java TException.printStackTrace方法的具體用法?Java TException.printStackTrace怎麽用?Java TException.printStackTrace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.thrift.TException的用法示例。


在下文中一共展示了TException.printStackTrace方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: listAlgorithms

import org.apache.thrift.TException; //導入方法依賴的package包/類
public Set<String> listAlgorithms(){
	Set<String> ret = null;
	try {
		ret = newClient().listAlgorithms();
		transport.close();
	} catch (TException x) {
		x.printStackTrace();
	}
	return ret;
}
 
開發者ID:kaichao,項目名稱:algorithm.annotation,代碼行數:11,代碼來源:AlgorithmClient.java

示例2: describeAlgorithm

import org.apache.thrift.TException; //導入方法依賴的package包/類
public List<String> describeAlgorithm(String name){
	List<String> ret = null;
	try {
		ret = newClient().describeAlgorithm(name);
		transport.close();
	} catch (TException x) {
		x.printStackTrace();
	}
	return ret;
}
 
開發者ID:kaichao,項目名稱:algorithm.annotation,代碼行數:11,代碼來源:AlgorithmClient.java

示例3: performAlgorithm

import org.apache.thrift.TException; //導入方法依賴的package包/類
public Object performAlgorithm(String name, Object... params) {
	Object ret = null;
	try {
		ret = KryoTool.toObject(newClient().performAlgorithm(name, KryoTool.toByteBuffer(params)));
		transport.close();
	} catch (TException x) {
		x.printStackTrace();
	}
	return ret;
}
 
開發者ID:kaichao,項目名稱:algorithm.annotation,代碼行數:11,代碼來源:AlgorithmClient.java

示例4: getActorMessage

import org.apache.thrift.TException; //導入方法依賴的package包/類
public ActorMessage getActorMessage(byte[] buffer) {
    BaseByteArrayPacket packet = new BaseByteArrayPacket();
    packet.fromBinary(buffer);
    ActorMessage actorMessage = new ActorMessage();
    try {
        deserializer.deserialize(actorMessage, packet.toBinary());
    } catch (TException e) {
        e.printStackTrace();
    }
    return actorMessage;
}
 
開發者ID:zerosoft,項目名稱:CodeBroker,代碼行數:12,代碼來源:ThriftSerializerFactory.java

示例5: getEventMessage

import org.apache.thrift.TException; //導入方法依賴的package包/類
public RemoteEventMessage getEventMessage(byte[] buffer) {
    RemoteEventMessage event = new RemoteEventMessage();
    try {
        deserializer.deserialize(event, buffer);
    } catch (TException e) {
        e.printStackTrace();
    }
    return event;
}
 
開發者ID:zerosoft,項目名稱:CodeBroker,代碼行數:10,代碼來源:ThriftSerializerFactory.java

示例6: deserializeEventMessage

import org.apache.thrift.TException; //導入方法依賴的package包/類
public byte[] deserializeEventMessage(RemoteEventMessage event) {
    try {
        return serializer.serialize(event);
    } catch (TException e) {
        e.printStackTrace();
        return null;
    }
}
 
開發者ID:zerosoft,項目名稱:CodeBroker,代碼行數:9,代碼來源:ThriftSerializerFactory.java

示例7: getActorMessageByteArray

import org.apache.thrift.TException; //導入方法依賴的package包/類
public byte[] getActorMessageByteArray(Operation operation, TBase<?, ?> base) {
    byte[] tbaseMessage = null;
    ActorMessage actorMessage = new ActorMessage();
    actorMessage.op = operation;
    try {
        actorMessage.messageRaw = getTbaseByteBuffer(base);
        tbaseMessage = getOnlySerializerByteArray(actorMessage);
    } catch (TException e) {
        e.printStackTrace();
    }
    return tbaseMessage;
}
 
開發者ID:zerosoft,項目名稱:CodeBroker,代碼行數:13,代碼來源:ThriftSerializerFactory.java

示例8: send2SessionActor

import org.apache.thrift.TException; //導入方法依賴的package包/類
/**
 * 發送消息
 *
 * @param msg
 */
private void send2SessionActor(Object msg) {
    if (msg instanceof BaseByteArrayPacket) {
        ActorMessage message = new ActorMessage();

        byte[] binary = ((BaseByteArrayPacket) msg).toBinary();
        ByteBuffer buffer = ByteBuffer.allocate(binary.length);
        buffer.put(binary);
        buffer.flip();

        message.messageRaw = buffer;
        message.op = Operation.SESSION_RECIVE_PACKET;
        byte[] actorMessage;
        try {
            actorMessage = thriftSerializerFactory.getActorMessage(message);
            actorRef.tell(actorMessage, ActorRef.noSender());

            CObject newInstance = CObject.newInstance();
            newInstance.putInt(MonitorEventType.KEY, MonitorEventType.SESSEION_RECIVE_FLOW);
            newInstance.putLong(MonitorEventType.SESSION_ID, sessionId);
            newInstance.putDouble(MonitorEventType.SESSION_FLOW, binary.length);
            newInstance.putLong(MonitorEventType.SESSION_TIME, System.currentTimeMillis());
            AkkaUtil.getInbox().send(CodeBrokerSystem.getInstance().getMonitorManager(), newInstance);
        } catch (TException e) {
            e.printStackTrace();
        }

    }
}
 
開發者ID:zerosoft,項目名稱:CodeBroker,代碼行數:34,代碼來源:NettyIoSession.java


注:本文中的org.apache.thrift.TException.printStackTrace方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。